* lisp/minibuffer.el (completion-pcm--optimize-pattern): Remove
unused variable.
(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
'(("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