From: Eshel Yaron Date: Sat, 13 Jul 2024 16:03:09 +0000 (+0200) Subject: (minibuffer-add-completion-predicate): Add minibuffer action X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6335cc25aeb04a4aad4128375d87490d6f1923b2;p=emacs.git (minibuffer-add-completion-predicate): Add minibuffer action --- 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,