Function: treemacs--pre-sorted-list
treemacs--pre-sorted-list is a byte-compiled function defined in
treemacs-core-utils.el.
Signature
(treemacs--pre-sorted-list ITEMS)
Documentation
Return a lambda that includes sorting metadata for completing-read.
Ensures that the order of ITEMS is not changed during completion.
Source Code
;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-core-utils.el
(defun treemacs--pre-sorted-list (items)
"Return a lambda that includes sorting metadata for `completing-read'.
Ensures that the order of ITEMS is not changed during completion."
(lambda (string pred action)
(pcase action
('metadata `(metadata (display-sort-function . ,#'identity)))
(_ (complete-with-action action items string pred)))))