branch: externals/vertico commit 9f024fec906680cd3adee01e6b8ad87fa1f2ace3 Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@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)