# HG changeset patch # User Masatake YAMATO # Date 1130391817 0 # Node ID 448890268bf7c3c3a4e2b8d9cc0bfc29460e302d # Parent 3487cbe8476377af51e7513dab292187447d142f Write about new optional argument for `display-completion-list'. diff -r 3487cbe84763 -r 448890268bf7 lispref/ChangeLog --- a/lispref/ChangeLog Thu Oct 27 01:56:54 2005 +0000 +++ b/lispref/ChangeLog Thu Oct 27 05:43:37 2005 +0000 @@ -1,3 +1,8 @@ +2005-10-27 Masatake YAMATO + + * minibuf.texi (Completion Commands): + Write about new optional argument for `display-completion-list'. + 2005-10-23 Richard M. Stallman * display.texi (Overlay Arrow): Clarify about local bindings of diff -r 3487cbe84763 -r 448890268bf7 lispref/minibuf.texi --- a/lispref/minibuf.texi Thu Oct 27 01:56:54 2005 +0000 +++ b/lispref/minibuf.texi Thu Oct 27 05:43:37 2005 +0000 @@ -949,7 +949,7 @@ @samp{*Completions*}. @end deffn -@defun display-completion-list completions +@defun display-completion-list completions &optional common-substring This function displays @var{completions} to the stream in @code{standard-output}, usually a buffer. (@xref{Read and Print}, for more information about streams.) The argument @var{completions} is normally @@ -960,14 +960,22 @@ the two strings is the actual completion, the second string serves as annotation. -This function is called by @code{minibuffer-completion-help}. The +@var{common-substring} represents a string common prefix between all +completions. @var{common-substring} is used to put faces on +@samp{*Completions*} to enhance visual feedback of the buffer; +@code{display-completion-list} use faces to highlight what all completions +have in common and where they begin to differ. @var{common-substring} +specifies the common part. + +This function is called by @code{minibuffer-completion-help}. The most common way to use it is together with @code{with-output-to-temp-buffer}, like this: @example (with-output-to-temp-buffer "*Completions*" (display-completion-list - (all-completions (buffer-string) my-alist))) + (all-completions (buffer-string) my-alist) + (buffer-string))) @end example @end defun