diff options
| -rw-r--r-- | lisp/minibuffer.el | 2 | ||||
| -rw-r--r-- | test/lisp/minibuffer-tests.el | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index aacb8ab00bb..cd81f0f7286 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -3162,7 +3162,7 @@ or a symbol, see `completion-pcm--merge-completions'." | |||
| 3162 | (let ((n '())) | 3162 | (let ((n '())) |
| 3163 | (while p | 3163 | (while p |
| 3164 | (pcase p | 3164 | (pcase p |
| 3165 | (`(,(or 'any 'any-delim) ,(or 'any 'point) . ,rest) | 3165 | (`(,(or 'any 'any-delim) ,(or 'any 'point)) |
| 3166 | (setq p (cdr p))) | 3166 | (setq p (cdr p))) |
| 3167 | ;; This is not just a performance improvement: it turns a | 3167 | ;; This is not just a performance improvement: it turns a |
| 3168 | ;; terminating `point' into an implicit `any', which affects | 3168 | ;; terminating `point' into an implicit `any', which affects |
diff --git a/test/lisp/minibuffer-tests.el b/test/lisp/minibuffer-tests.el index 7349b191caf..791e51cdcd5 100644 --- a/test/lisp/minibuffer-tests.el +++ b/test/lisp/minibuffer-tests.el | |||
| @@ -125,5 +125,11 @@ | |||
| 125 | '(("completion1" "prefix1" #("suffix1" 0 7 (face shadow))))) | 125 | '(("completion1" "prefix1" #("suffix1" 0 7 (face shadow))))) |
| 126 | (should (equal (get-text-property 19 'face) 'shadow)))) | 126 | (should (equal (get-text-property 19 'face) 'shadow)))) |
| 127 | 127 | ||
| 128 | (ert-deftest completion-pcm--optimize-pattern () | ||
| 129 | (should (equal (completion-pcm--optimize-pattern '("buf" point "f")) | ||
| 130 | '("buf" point "f"))) | ||
| 131 | (should (equal (completion-pcm--optimize-pattern '(any "" any)) | ||
| 132 | '(any)))) | ||
| 133 | |||
| 128 | (provide 'minibuffer-tests) | 134 | (provide 'minibuffer-tests) |
| 129 | ;;; minibuffer-tests.el ends here | 135 | ;;; minibuffer-tests.el ends here |