emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/vertico b413071021: Opt-out of Vertico in keyboard macr


From: ELPA Syncer
Subject: [elpa] externals/vertico b413071021: Opt-out of Vertico in keyboard macros (See #478)
Date: Sat, 4 May 2024 06:59:22 -0400 (EDT)

branch: externals/vertico
commit b413071021a717bc25f730d2f94ce0740a9b8e34
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Opt-out of Vertico in keyboard macros (See #478)
---
 extensions/vertico-multiform.el | 12 ++++++------
 vertico.el                      |  3 ++-
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/extensions/vertico-multiform.el b/extensions/vertico-multiform.el
index 932fb763aa..0f17c2c5c8 100644
--- a/extensions/vertico-multiform.el
+++ b/extensions/vertico-multiform.el
@@ -155,12 +155,12 @@ The keys in LIST can be symbols or regexps."
     (push `(vertico--input . ,vertico-multiform-map) minor-mode-map-alist)))
 
 (cl-defmethod vertico--advice (&context (vertico-multiform-mode (eql t)) &rest 
app)
-  (unwind-protect
-      (progn
-        (vertico-multiform--toggle -1)
-        (minibuffer-with-setup-hook #'vertico-multiform--setup
-          (apply app)))
-    (vertico-multiform--toggle 1)))
+  (if (or defining-kbd-macro executing-kbd-macro) (apply app)
+    (unwind-protect
+        (progn
+          (vertico-multiform--toggle -1)
+          (minibuffer-with-setup-hook #'vertico-multiform--setup (apply app)))
+      (vertico-multiform--toggle 1))))
 
 (defun vertico-multiform--temporary-mode (mode arg)
   "Enable or disable MODE temporarily in minibuffer given ARG.
diff --git a/vertico.el b/vertico.el
index 4aa145953f..1e395ae2b0 100644
--- a/vertico.el
+++ b/vertico.el
@@ -643,7 +643,8 @@ The function is configured by BY, BSIZE, BINDEX, BPRED and 
PRED."
 
 (cl-defgeneric vertico--advice (&rest app)
   "Advice for completion function, apply APP."
-  (minibuffer-with-setup-hook #'vertico--setup (apply app)))
+  (if (or defining-kbd-macro executing-kbd-macro) (apply app)
+    (minibuffer-with-setup-hook #'vertico--setup (apply app))))
 
 (defun vertico-first ()
   "Go to first candidate, or to the prompt when the first candidate is 
selected."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]