aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2012-10-05 15:48:25 +0800
committerChong Yidong2012-10-05 15:48:25 +0800
commit379acb951495d947ff42da6fc79b39f2e5f2f623 (patch)
tree18afac31f34fd6e4c3e380744429bf94ebb46302
parente8757f091a502b858912a4c267210e009227d6e6 (diff)
downloademacs-379acb951495d947ff42da6fc79b39f2e5f2f623.tar.gz
emacs-379acb951495d947ff42da6fc79b39f2e5f2f623.zip
* minibuf.texi (Basic Completion): Clarify list form of completion table.
Fixes: debbugs:12564
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/minibuf.texi29
2 files changed, 18 insertions, 16 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 8568b024f67..7609efb8ac9 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
12012-10-05 Chong Yidong <cyd@gnu.org>
2
3 * minibuf.texi (Basic Completion): Clarify list form of completion
4 table (Bug#12564).
5
12012-10-05 Bruno Félix Rezende Ribeiro <oitofelix@gmail.com> (tiny change) 62012-10-05 Bruno Félix Rezende Ribeiro <oitofelix@gmail.com> (tiny change)
2 7
3 * functions.texi (Function Safety): Copyedit. (Bug#12562) 8 * functions.texi (Function Safety): Copyedit. (Bug#12562)
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index 3d6e80bf3f0..39b4fca3b25 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -664,25 +664,22 @@ This function returns the longest common substring of all possible
664completions of @var{string} in @var{collection}. 664completions of @var{string} in @var{collection}.
665 665
666@cindex completion table 666@cindex completion table
667The @var{collection} argument is called the @dfn{completion table}. 667@var{collection} is called the @dfn{completion table}. Its value must
668Its value must be a list of strings, an alist whose keys are strings 668be a list of strings or cons cells, an obarray, a hash table, or a
669or symbols, an obarray, a hash table, or a completion function. 669completion function.
670 670
671Completion compares @var{string} against each of the permissible 671@code{try-completion} compares @var{string} against each of the
672completions specified by @var{collection}. If no permissible 672permissible completions specified by the completion table. If no
673completions match, @code{try-completion} returns @code{nil}. If there 673permissible completions match, it returns @code{nil}. If there is
674is just one matching completion, and the match is exact, it returns 674just one matching completion, and the match is exact, it returns
675@code{t}. Otherwise, it returns the longest initial sequence common 675@code{t}. Otherwise, it returns the longest initial sequence common
676to all possible matching completions. 676to all possible matching completions.
677 677
678If @var{collection} is an alist (@pxref{Association Lists}), the 678If @var{collection} is an list, the permissible completions are
679permissible completions are the elements of the alist that are either 679specified by the elements of the list, each of which should be either
680strings, or conses whose @sc{car} is a string or symbol. 680a string, or a cons cell whose @sc{car} is either a string or a symbol
681Symbols are converted to strings using @code{symbol-name}. Other 681(a symbol is converted to a string using @code{symbol-name}). If the
682elements of the alist are ignored. (Remember that in Emacs Lisp, the 682list contains elements of any other type, those are ignored.
683elements of alists do not @emph{have} to be conses.) In particular, a
684list of strings is allowed, even though we usually do not
685think of such lists as alists.
686 683
687@cindex obarray in completion 684@cindex obarray in completion
688If @var{collection} is an obarray (@pxref{Creating Symbols}), the names 685If @var{collection} is an obarray (@pxref{Creating Symbols}), the names