1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Document completion-extra-properties in Lisp manual.

* doc/lispref/minibuf.texi (Programmed Completion): Remove obsolete variable
completion-annotate-function.
(Completion Variables): Rename from Completion Styles.  Document
completion-extra-properties.  Document completion-styles-alist
change.

* lisp/minibuffer.el (completion-extra-properties): Doc fix.
This commit is contained in:
Chong Yidong 2012-04-04 17:19:32 +08:00
parent a7972adfd8
commit 321cc491c5
8 changed files with 130 additions and 105 deletions

View file

@ -1269,17 +1269,24 @@ the completions buffer."
(defvar completion-extra-properties nil
"Property list of extra properties of the current completion job.
These include:
`:annotation-function': Function to add annotations in the completions buffer.
The function takes a completion and should either return nil, or a string
that will be displayed next to the completion. The function can access the
completion data via `minibuffer-completion-table' and related variables.
`:annotation-function': Function to annotate the completions buffer.
The function must accept one argument, a completion string,
and return either nil or a string which is to be displayed
next to the completion (but which is not part of the
completion). The function can access the completion data via
`minibuffer-completion-table' and related variables.
`:exit-function': Function to run after completion is performed.
The function takes at least 2 parameters (STRING and STATUS) where STRING
is the text to which the field was completed and STATUS indicates what
kind of operation happened: if text is now complete it's `finished', if text
cannot be further completed but completion is not finished, it's `sole', if
text is a valid completion but may be further completed, it's `exact', and
other STATUSes may be added in the future.")
The function must accept two arguments, STRING and STATUS.
STRING is the text to which the field was completed, and
STATUS indicates what kind of operation happened:
`finished' - text is now complete
`sole' - text cannot be further completed but
completion is not finished
`exact' - text is a valid completion but may be further
completed.")
(defvar completion-annotate-function
nil