Function: projection-completion--completion-table
projection-completion--completion-table is a natively compiled
function defined in projection-core-completion.el.
Signature
(projection-completion--completion-table &key CANDIDATES CATEGORY ANNOTATION-FUNCTION GROUP-FUNCTION CYCLE-SORT-FUNCTION DISPLAY-SORT-FUNCTION)
Documentation
Construct a completion-table for CANDIDATES.
CATEGORY, ANNOTATION-FUNCTION, GROUP-FUNCTION, CYCLE-SORT-FUNCTION, and DISPLAY-SORT-FUNCTION are optional metadata for the completion-table.
Source Code
;; Defined in /nix/store/j6y921qbdmdqxjnd43iibapbig3p4hai-emacs-packages-deps/share/emacs/site-lisp/elpa/projection-20260614.1822/projection-core-completion.el
(cl-defun projection-completion--completion-table
(&key candidates category annotation-function group-function
cycle-sort-function display-sort-function)
"Construct a completion-table for CANDIDATES.
CATEGORY, ANNOTATION-FUNCTION, GROUP-FUNCTION, CYCLE-SORT-FUNCTION, and
DISPLAY-SORT-FUNCTION are optional metadata for the completion-table."
(let ((metadata
`(metadata
,@(when category `((category . ,category)))
,@(when annotation-function `((annotation-function . ,annotation-function)))
,@(when group-function `((group-function . ,group-function)))
,@(when cycle-sort-function `((cycle-sort-function . ,cycle-sort-function)))
,@(when display-sort-function `((display-sort-function . ,display-sort-function))))))
(lambda (string predicate action)
(if (eq action 'metadata)
metadata
(complete-with-action action candidates string predicate)))))