Function: multi-prompt-key-value-collection-fn
multi-prompt-key-value-collection-fn is a byte-compiled function
defined in multi-prompt.el.
Signature
(multi-prompt-key-value-collection-fn STRING PREDICATE FLAG)
Documentation
Function used by multi-prompt-key-value to compute completion values.
The value of STRING is the string to be completed.
The value of PREDICATE is a function to filter possible matches, or nil if none.
The value of FLAG is used to specify the type of completion operation.
A value of nil specifies try-completion. A value of t specifies
all-completions. A value of lambda specifes a test for an exact match.
For more information on STRING, PREDICATE, and FLAG, see the
Elisp Reference Info node (elisp)Programmed Completion and Info node
(elisp)Basic Completion.
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/multi-prompt.el
(defun multi-prompt-key-value-collection-fn (string predicate flag)
"Function used by `multi-prompt-key-value' to compute completion values.
The value of STRING is the string to be completed.
The value of PREDICATE is a function to filter possible matches, or
nil if none.
The value of FLAG is used to specify the type of completion operation.
A value of nil specifies `try-completion'. A value of t specifies
`all-completions'. A value of lambda specifes a test for an exact match.
For more information on STRING, PREDICATE, and FLAG, see the
Elisp Reference Info node `(elisp)Programmed Completion' and Info node
`(elisp)Basic Completion'."
(let ((beg 0) (last 0) matched)
(while (string-match multi-prompt-key-value-sep string beg)
(setq matched t
last beg
beg (match-end 0)))
(completion-table-with-context
(substring string 0 beg)
(if (not matched)
multi-prompt-completion-table
(cadr (assoc (substring string last (1- beg))
multi-prompt-completion-table)))
(substring string beg)
predicate
flag)))