diff options
author | Kim F. Storm <storm@cua.dk> | 2005-02-22 20:50:05 +0000 |
---|---|---|
committer | Kim F. Storm <storm@cua.dk> | 2005-02-22 20:50:05 +0000 |
commit | a41c174fd4a43ab3e6a84eecc91b93f1cdada7de (patch) | |
tree | c603195f767a8add0d89a17c9dc4646c757e62a9 /lispref/minibuf.texi | |
parent | 3809648a7632e22bd9168b094eed89a40c0aae59 (diff) | |
download | emacs-a41c174fd4a43ab3e6a84eecc91b93f1cdada7de.tar.gz |
(Basic Completion): Allow symbols in addition to
strings in try-completion and all-completions.
Diffstat (limited to 'lispref/minibuf.texi')
-rw-r--r-- | lispref/minibuf.texi | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lispref/minibuf.texi b/lispref/minibuf.texi index 0e855b499ae..eb60d99fa62 100644 --- a/lispref/minibuf.texi +++ b/lispref/minibuf.texi @@ -595,9 +595,9 @@ the higher-level completion features that do use the minibuffer. @defun try-completion string collection &optional predicate This function returns the longest common substring of all possible completions of @var{string} in @var{collection}. The value of -@var{collection} must be a list of strings, an alist, an obarray, a -hash table, or a function that implements a virtual set of strings -(see below). +@var{collection} must be a list of strings or symbols, an alist, an +obarray, a hash table, or a function that implements a virtual set of +strings (see below). Completion compares @var{string} against each of the permissible completions specified by @var{collection}; if the beginning of the @@ -610,11 +610,13 @@ match. If @var{collection} is an alist (@pxref{Association Lists}), the permissible completions are the elements of the alist that are either -strings or conses whose @sc{car} is a string. Other elements of the -alist are ignored. (Remember that in Emacs Lisp, the elements of -alists do not @emph{have} to be conses.) As all elements of the alist -can be strings, this case actually includes lists of strings, even -though we usually do not think of such lists as alists. +strings, symbols, or conses whose @sc{car} is a string or symbol. +Symbols are converted to strings using @code{symbol-name}. +Other elements of the alist are ignored. (Remember that in Emacs Lisp, +the elements of alists do not @emph{have} to be conses.) As all +elements of the alist can be strings, this case actually includes +lists of strings or symbols, even though we usually do not think of +such lists as alists. @cindex obarray in completion If @var{collection} is an obarray (@pxref{Creating Symbols}), the names |