branch: externals/minuet commit 951676962d01f7ccbdd6c0f61470e680fb9547b9 Author: Milan Glacier <d...@milanglacier.com> Commit: Milan Glacier <d...@milanglacier.com>
refactor: use `seq-uniq` instead of `-distinct` for dedup. 1. `seq-uniq` is a built-in function and `-distinct` relies on the `dash` library. 2. `seq-uniq` offers better performance, as `-distinct` internally utilizes a hash table, which is a less efficient method for this operation. --- minuet.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/minuet.el b/minuet.el index 9b548d2626..1b83e39bba 100644 --- a/minuet.el +++ b/minuet.el @@ -529,7 +529,7 @@ Also cancel any pending requests unless NO-CANCEL is t." (funcall complete-fn context (lambda (items) - (setq items (-distinct items)) + (setq items (seq-uniq items)) (with-current-buffer current-buffer (when (and items (not (minuet--cursor-moved-p))) (minuet--display-suggestion items 0))))))) @@ -827,7 +827,7 @@ many lines. Without a prefix argument, accept only the first line." (setq items (if minuet-add-single-line-entry (minuet--add-single-line-entry items) items) - items (-distinct items)) + items (seq-uniq items)) ;; close current minibuffer session, if any (when (active-minibuffer-window) (abort-recursive-edit))