Function: vertico--move-to-front

vertico--move-to-front is a byte-compiled function defined in vertico.el.

Signature

(vertico--move-to-front ELEM LIST)

Documentation

Move all ELEM (also duplicates) to front of LIST.

Source Code

;; Defined in ~/.emacs.d/elpa/vertico-20260811.1003/vertico.el
(defun vertico--move-to-front (elem list)
  "Move all ELEM (also duplicates) to front of LIST."
  (if (member elem list)
      (nconc (cl-loop for x in list if (equal x elem) collect x)
             (delete elem list))
    list))