Function: majutsu-completing-read-multiple-payload
majutsu-completing-read-multiple-payload is a natively compiled
function defined in majutsu-base.el.
Signature
(majutsu-completing-read-multiple-payload PROMPT PAYLOAD &optional PREDICATE REQUIRE-MATCH INITIAL-INPUT HIST DEF CATEGORY CONTEXT DIRECTORY)
Documentation
Read multiple values from structured completion PAYLOAD.
PAYLOAD may provide :category and richer completion metadata. CONTEXT is
bound as majutsu-completion-context while the reader is active. DIRECTORY
is bound as default-directory, allowing completion actions to operate in the
repository that produced the candidates.
REQUIRE-MATCH follows majutsu-completing-read-multiple.
Source Code
;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-base.el
(defun majutsu-completing-read-multiple-payload
(prompt payload &optional predicate require-match initial-input hist def category context directory)
"Read multiple values from structured completion PAYLOAD.
PAYLOAD may provide :category and richer completion metadata. CONTEXT is
bound as `majutsu-completion-context' while the reader is active. DIRECTORY
is bound as `default-directory', allowing completion actions to operate in the
repository that produced the candidates.
REQUIRE-MATCH follows `majutsu-completing-read-multiple'."
(let* ((default-directory (or directory default-directory))
(majutsu-completion-context context)
(completion-extra-properties
(majutsu-completion-payload-properties payload category))
(collection (plist-get payload :candidates))
(values (completing-read-multiple (format-prompt prompt def)
collection predicate
(if (eq require-match 'any) nil require-match)
initial-input hist def)))
(when (and (eq require-match 'any) (null values))
(user-error "Nothing selected"))
values))