[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vertico ff63d35: vertico-repeat: Do not automatically r
From: |
ELPA Syncer |
Subject: |
[elpa] externals/vertico ff63d35: vertico-repeat: Do not automatically register vertico-repeat-save |
Date: |
Tue, 26 Oct 2021 04:57:42 -0400 (EDT) |
branch: externals/vertico
commit ff63d353bef62a7c66834200a564a00d1a92c833
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
vertico-repeat: Do not automatically register vertico-repeat-save
---
extensions/vertico-repeat.el | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/extensions/vertico-repeat.el b/extensions/vertico-repeat.el
index 9f90635..e75ae26 100644
--- a/extensions/vertico-repeat.el
+++ b/extensions/vertico-repeat.el
@@ -30,6 +30,11 @@
;; Vertico session via the `vertico-repeat' command.
;;
;; (global-set-key "\M-r" #'vertico-repeat)
+;;
+;; It is necessary to register a minibuffer setup hook, which saves the
+;; Vertico state for repetition.
+;;
+;; (add-hook 'minibuffer-setup-hook #'vertico-repeat-save)
;;; Code:
@@ -64,19 +69,6 @@
vertico--lock-candidate t)
(vertico--exhibit))))))
-;;;###autoload
-(defun vertico-repeat--save ()
- "Save Vertico status for `vertico-repeat'."
- (when vertico--input
- (unless vertico-repeat--restore
- (setq vertico-repeat--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)
@@ -87,7 +79,17 @@
(command-execute (setq this-command vertico-repeat--command))))
;;;###autoload
-(add-hook 'minibuffer-setup-hook #'vertico-repeat--save)
+(defun vertico-repeat-save ()
+ "Save Vertico status for `vertico-repeat'.
+This function must be registered as `minibuffer-setup-hook'."
+ (when vertico--input
+ (unless vertico-repeat--restore
+ (setq vertico-repeat--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)))
(provide 'vertico-repeat)
;;; vertico-repeat.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/vertico ff63d35: vertico-repeat: Do not automatically register vertico-repeat-save,
ELPA Syncer <=