summaryrefslogtreecommitdiff
path: root/lisp/minibuffer.el
diff options
context:
space:
mode:
authorGerd Möllmann <gerd@gnu.org>2022-10-16 16:35:56 +0200
committerGerd Möllmann <gerd@gnu.org>2022-10-17 06:46:16 +0200
commit856166712438166741933e76b948c825a7661b21 (patch)
tree6dea772c6b1045afaca5ca938937f16233443ea8 /lisp/minibuffer.el
parentaaf12c12b637dadf48aa5d76d76e045e4fd75a81 (diff)
downloademacs-856166712438166741933e76b948c825a7661b21.tar.gz
Handle packages in completion
* lisp/minibuffer.el (completion-table-with-context): Add packagep case. * src/minibuf.c (Ftry_completion, Fall_completions), Ftest_completion): Take into account that predicate functions used with packages are the same that were used for obarrays.
Diffstat (limited to 'lisp/minibuffer.el')
-rw-r--r--lisp/minibuffer.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 9f26e4f7f98..bf9321c5fa6 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -313,6 +313,8 @@ the form (concat S2 S)."
;; Predicates are called differently depending on the nature of
;; the completion table :-(
(cond
+ ((packagep table)
+ (lambda (sym) (funcall pred (concat prefix (symbol-name sym)))))
((vectorp table) ;Obarray.
(lambda (sym) (funcall pred (concat prefix (symbol-name sym)))))
((hash-table-p table)