Function: multi-prompt-key-value
multi-prompt-key-value is an autoloaded and byte-compiled function
defined in multi-prompt.el.
Signature
(multi-prompt-key-value PROMPT TABLE &optional PREDICATE REQUIRE-MATCH INITIAL-INPUT HIST DEF INHERIT-INPUT-METHOD)
Documentation
Read multiple strings, with completion and key=value support.
PROMPT is a string to prompt with, usually ending with a colon and a space.
TABLE is an alist where each entry is a list. The first element of each list is a string representing a key and the optional second element is a list with strings to be used as values for the key. The second element can also be a variable returning a list of strings.
See the documentation for completing-read for details on the
other arguments: PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST,
DEF, and INHERIT-INPUT-METHOD.
The return value is the string as entered in the minibuffer.
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/multi-prompt.el
;;;###autoload
(defun multi-prompt-key-value
(prompt table &optional predicate require-match initial-input
hist def inherit-input-method)
"Read multiple strings, with completion and key=value support.
PROMPT is a string to prompt with, usually ending with a colon
and a space.
TABLE is an alist where each entry is a list. The first element
of each list is a string representing a key and the optional
second element is a list with strings to be used as values for
the key. The second element can also be a variable returning a
list of strings.
See the documentation for `completing-read' for details on the
other arguments: PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST,
DEF, and INHERIT-INPUT-METHOD.
The return value is the string as entered in the minibuffer."
(let* ((minibuffer-completion-table #'multi-prompt-key-value-collection-fn)
(minibuffer-completion-predicate predicate)
(minibuffer-completion-confirm
(unless (eq require-match t) require-match))
(multi-prompt-completion-table
;; Expand the table here because completion would otherwise
;; interpret symbols in the table as functions. However, it
;; would be nicer if this could be done during the actual
;; completion in order to avoid walking through the whole
;; table.
(multi-prompt-expand-completion-table table))
(map (if require-match
crm-local-must-match-map
crm-local-completion-map))
(input (read-from-minibuffer
prompt initial-input map
nil hist def inherit-input-method)))
(and def (string-equal input "") (setq input def))
input))