Variable: completion-annotate-function

completion-annotate-function is a variable defined in minibuffer.el.gz.

This variable is obsolete since 24.1; use completion-extra-properties instead.

Value

nil

Documentation

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 table and predicates via minibuffer-completion-table and related variables.

Probably introduced at or before Emacs version 23.2.

Source Code

;; Defined in /usr/src/emacs/lisp/minibuffer.el.gz
(defvar completion-annotate-function
  nil
  ;; Note: there's a lot of scope as for when to add annotations and
  ;; what annotations to add.  E.g. completing-help.el allowed adding
  ;; the first line of docstrings to M-x completion.  But there's
  ;; a tension, since such annotations, while useful at times, can
  ;; actually drown the useful information.
  ;; So completion-annotate-function should be used parsimoniously, or
  ;; else only used upon a user's request (e.g. we could add a command
  ;; to completion-list-mode to add annotations to the current
  ;; completions).
  "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 table and predicates via `minibuffer-completion-table' and related
variables.")