Fix warning in completion-pcm--optimize-pattern
* lisp/minibuffer.el (completion-pcm--optimize-pattern): Remove unused variable.
This commit is contained in:
@@ -3162,7 +3162,7 @@ or a symbol, see `completion-pcm--merge-completions'."
|
||||
(let ((n '()))
|
||||
(while p
|
||||
(pcase p
|
||||
(`(,(or 'any 'any-delim) ,(or 'any 'point) . ,rest)
|
||||
(`(,(or 'any 'any-delim) ,(or 'any 'point))
|
||||
(setq p (cdr p)))
|
||||
;; This is not just a performance improvement: it turns a
|
||||
;; terminating `point' into an implicit `any', which affects
|
||||
|
||||
@@ -125,5 +125,11 @@
|
||||
'(("completion1" "prefix1" #("suffix1" 0 7 (face shadow)))))
|
||||
(should (equal (get-text-property 19 'face) 'shadow))))
|
||||
|
||||
(ert-deftest completion-pcm--optimize-pattern ()
|
||||
(should (equal (completion-pcm--optimize-pattern '("buf" point "f"))
|
||||
'("buf" point "f")))
|
||||
(should (equal (completion-pcm--optimize-pattern '(any "" any))
|
||||
'(any))))
|
||||
|
||||
(provide 'minibuffer-tests)
|
||||
;;; minibuffer-tests.el ends here
|
||||
|
||||
Reference in New Issue
Block a user