From: Eli Zaretskii Date: Fri, 16 Oct 2015 09:38:36 +0000 (+0300) Subject: Improve documentation of COLLECTION in completion functions X-Git-Tag: emacs-25.0.90~1111 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d05410f349661768845a8c16a9d473b175d6a1de;p=emacs.git Improve documentation of COLLECTION in completion functions * doc/lispref/minibuf.texi (Minibuffer Completion): Add a cross-reference to "Programmed Completion". * src/minibuf.c (Fcompleting_read): Improve the doc string. (Bug#21644) --- diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 96c1020d748..0b1a4a90ba9 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -975,6 +975,9 @@ Thus, if @var{predicate} is non-@code{nil}, it should be compatible with @var{collection} and @code{completion-ignore-case}. @xref{Definition of test-completion}. +@xref{Programmed Completion}, for detailed requirements when +@var{collection} is a function. + The value of the optional argument @var{require-match} determines how the user may exit the minibuffer: diff --git a/src/minibuf.c b/src/minibuf.c index 2cde8b097be..e149e819413 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1595,8 +1595,11 @@ PROMPT is a string to prompt with; normally it ends in a colon and a space. COLLECTION can be a list of strings, an alist, an obarray or a hash table. COLLECTION can also be a function to do the completion itself. PREDICATE limits completion to a subset of COLLECTION. -See Info node `(elisp)Basic Completion' for more details - on completion, COLLECTION, and PREDICATE. +See `try-completion', `all-completions', `test-completion', +and `completion-boundaries', for more details on completion, +COLLECTION, and PREDICATE. See also Info nodes `(elisp)Basic Completion' +for the details about completion, and `(elisp)Programmed Completion' for +expectations from COLLECTION when it's a function. REQUIRE-MATCH can take the following values: - t means that the user is not allowed to exit unless