949 |
@samp{*Completions*}. |
@samp{*Completions*}. |
950 |
@end deffn |
@end deffn |
951 |
|
|
952 |
@defun display-completion-list completions |
@defun display-completion-list completions &optional common-substring |
953 |
This function displays @var{completions} to the stream in |
This function displays @var{completions} to the stream in |
954 |
@code{standard-output}, usually a buffer. (@xref{Read and Print}, for more |
@code{standard-output}, usually a buffer. (@xref{Read and Print}, for more |
955 |
information about streams.) The argument @var{completions} is normally |
information about streams.) The argument @var{completions} is normally |
960 |
the two strings is the actual completion, the second string serves as |
the two strings is the actual completion, the second string serves as |
961 |
annotation. |
annotation. |
962 |
|
|
963 |
This function is called by @code{minibuffer-completion-help}. The |
@var{common-substring} represents a string common prefix between all |
964 |
|
completions. @var{common-substring} is used to put faces on |
965 |
|
@samp{*Completions*} to enhance visual feedback of the buffer; |
966 |
|
@code{display-completion-list} use faces to highlight what all completions |
967 |
|
have in common and where they begin to differ. @var{common-substring} |
968 |
|
specifies the common part. |
969 |
|
|
970 |
|
This function is called by @code{minibuffer-completion-help}. The |
971 |
most common way to use it is together with |
most common way to use it is together with |
972 |
@code{with-output-to-temp-buffer}, like this: |
@code{with-output-to-temp-buffer}, like this: |
973 |
|
|
974 |
@example |
@example |
975 |
(with-output-to-temp-buffer "*Completions*" |
(with-output-to-temp-buffer "*Completions*" |
976 |
(display-completion-list |
(display-completion-list |
977 |
(all-completions (buffer-string) my-alist))) |
(all-completions (buffer-string) my-alist) |
978 |
|
(buffer-string))) |
979 |
@end example |
@end example |
980 |
@end defun |
@end defun |
981 |
|
|