]> git.eshelyaron.com Git - emacs.git/commitdiff
(minibuffer-add-completion-predicate): Add minibuffer action
authorEshel Yaron <me@eshelyaron.com>
Sat, 13 Jul 2024 16:03:09 +0000 (18:03 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 13 Jul 2024 16:03:09 +0000 (18:03 +0200)
lisp/minibuffer.el

index 630e50b89599f8c60259a8ead96b8de65c99133e..8558a1d63ca18aa388e08a335e8bbff024046ae9 100644 (file)
@@ -5989,6 +5989,12 @@ predicates together."
   (when (stringp pred) (setq pred (read pred)))
   (minibuffer--add-completions-predicate pred (prin1-to-string pred)))
 
+(put 'minibuffer-add-completion-predicate 'minibuffer-action
+     (cons (lambda (p)
+             (with-current-buffer minibuffer--original-buffer
+               (minibuffer-add-completion-predicate p)))
+            "add"))
+
 (defun minibuffer-narrow-completions-to-current (arg)
   "Restrict completion candidates according to current minibuffer input.
 ARG is the numeric prefix argument.  When ARG is negative,