Function: projectile--sort-prioritized-first
projectile--sort-prioritized-first is a byte-compiled function defined
in projectile.el.
Signature
(projectile--sort-prioritized-first PRIORITIZED FILES)
Documentation
Return FILES with the members of PRIORITIZED first, in order.
Membership is tracked in a hash set, so the cost stays linear in the length of FILES.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--sort-prioritized-first (prioritized files)
"Return FILES with the members of PRIORITIZED first, in order.
Membership is tracked in a hash set, so the cost stays linear in
the length of FILES."
(let ((seen (make-hash-table :test 'equal :size (length prioritized))))
(dolist (file prioritized)
(puthash file t seen))
(append prioritized
(seq-remove (lambda (file) (gethash file seen)) files))))