Function: completion-table-with-metadata

completion-table-with-metadata is a byte-compiled function defined in minibuffer.el.gz.

Signature

(completion-table-with-metadata TABLE METADATA)

Documentation

Return new completion TABLE with METADATA.

METADATA should be an alist of completion metadata. See completion-metadata for a list of supported metadata.

View in manual

Probably introduced at or before Emacs version 31.1.

Source Code

;; Defined in /usr/src/emacs/lisp/minibuffer.el.gz
(defun completion-table-with-metadata (table metadata)
  "Return new completion TABLE with METADATA.
METADATA should be an alist of completion metadata.  See
`completion-metadata' for a list of supported metadata."
  (lambda (string pred action)
    (if (eq action 'metadata)
        `(metadata . ,metadata)
      (complete-with-action action table string pred))))