1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

external-completion: specify a required Emacs version

* lisp/external-completion.el: Require 26.1 (picked out of thin air).
(external-completion-table): Undo use of the hash-table-contains-p,
recently introduced.
This commit is contained in:
Mattias Engdegård 2025-08-06 12:53:06 +02:00
parent ca07819af7
commit f0da94e2c2

View file

@ -5,6 +5,7 @@
;; Version: 0.1
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Maintainer: João Távora <joaotavora@gmail.com>
;; Package-Requires: ((emacs "26.1"))
;; Keywords:
;; This is a GNU ELPA :core package. Avoid functionality that is not
@ -117,10 +118,11 @@ EXPANDED-PATTERN."
completion-category-defaults)))
(let ((cache (make-hash-table :test #'equal)))
(cl-flet ((lookup-internal (string point)
(let ((key (cons string point)))
(if (hash-table-contains-p key cache)
(gethash key cache)
(puthash key (funcall lookup string point) cache)))))
(let* ((key (cons string point))
(probe (gethash key cache 'external--notfound)))
(if (eq probe 'external--notfound)
(puthash key (funcall lookup string point) cache)
probe))))
(lambda (string pred action)
(pcase action
(`metadata