From 6335cc25aeb04a4aad4128375d87490d6f1923b2 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sat, 13 Jul 2024 18:03:09 +0200 Subject: [PATCH] (minibuffer-add-completion-predicate): Add minibuffer action --- lisp/minibuffer.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 630e50b8959..8558a1d63ca 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -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, -- 2.39.2