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

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

[elpa] externals/vertico 9f024fe 2/2: Add autoload to vertico-repeat--sa


From: ELPA Syncer
Subject: [elpa] externals/vertico 9f024fe 2/2: Add autoload to vertico-repeat--save
Date: Sun, 11 Jul 2021 10:57:16 -0400 (EDT)

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

    Add autoload to vertico-repeat--save
    
    Thanks, @kljohann
---
 extensions/vertico-repeat.el | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/extensions/vertico-repeat.el b/extensions/vertico-repeat.el
index 19b2fd6..702897f 100644
--- a/extensions/vertico-repeat.el
+++ b/extensions/vertico-repeat.el
@@ -51,19 +51,6 @@
              (>= vertico--index 0)
              (nth vertico--index vertico--candidates))))
 
-(defun vertico-repeat--save ()
-  "Save Vertico status for `vertico-repeat'."
-  (when vertico--input
-    (unless vertico-repeat--restore
-      (setq vertico-repeat--command (if (boundp 'minibuffer-current-command)
-                                        minibuffer-current-command
-                                      this-command)
-            vertico-repeat--input ""
-            vertico-repeat--candidate nil
-            vertico-repeat--restore nil))
-    (add-hook 'post-command-hook #'vertico-repeat--save-input nil 'local)
-    (add-hook 'minibuffer-exit-hook #'vertico-repeat--save-candidate nil 
'local)))
-
 (defun vertico-repeat--restore ()
   "Restore Vertico status for `vertico-repeat'."
   (setq vertico-repeat--restore t)
@@ -78,6 +65,20 @@
                      (vertico--exhibit))))))
 
 ;;;###autoload
+(defun vertico-repeat--save ()
+  "Save Vertico status for `vertico-repeat'."
+  (when vertico--input
+    (unless vertico-repeat--restore
+      (setq vertico-repeat--command (if (boundp 'minibuffer-current-command)
+                                        minibuffer-current-command
+                                      this-command)
+            vertico-repeat--input ""
+            vertico-repeat--candidate nil
+            vertico-repeat--restore nil))
+    (add-hook 'post-command-hook #'vertico-repeat--save-input nil 'local)
+    (add-hook 'minibuffer-exit-hook #'vertico-repeat--save-candidate nil 
'local)))
+
+;;;###autoload
 (defun vertico-repeat ()
   "Repeat last Vertico completion session."
   (interactive)



reply via email to

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