aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/external-completion.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/external-completion.el b/lisp/external-completion.el
index a1aa7ec9cb6..5fd29f801fe 100644
--- a/lisp/external-completion.el
+++ b/lisp/external-completion.el
@@ -5,6 +5,7 @@
5;; Version: 0.1 5;; Version: 0.1
6;; Author: Stefan Monnier <monnier@iro.umontreal.ca> 6;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
7;; Maintainer: João Távora <joaotavora@gmail.com> 7;; Maintainer: João Távora <joaotavora@gmail.com>
8;; Package-Requires: ((emacs "26.1"))
8;; Keywords: 9;; Keywords:
9 10
10;; This is a GNU ELPA :core package. Avoid functionality that is not 11;; This is a GNU ELPA :core package. Avoid functionality that is not
@@ -117,10 +118,11 @@ EXPANDED-PATTERN."
117 completion-category-defaults))) 118 completion-category-defaults)))
118 (let ((cache (make-hash-table :test #'equal))) 119 (let ((cache (make-hash-table :test #'equal)))
119 (cl-flet ((lookup-internal (string point) 120 (cl-flet ((lookup-internal (string point)
120 (let ((key (cons string point))) 121 (let* ((key (cons string point))
121 (if (hash-table-contains-p key cache) 122 (probe (gethash key cache 'external--notfound)))
122 (gethash key cache) 123 (if (eq probe 'external--notfound)
123 (puthash key (funcall lookup string point) cache))))) 124 (puthash key (funcall lookup string point) cache)
125 probe))))
124 (lambda (string pred action) 126 (lambda (string pred action)
125 (pcase action 127 (pcase action
126 (`metadata 128 (`metadata