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

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

[elpa] externals/vertico-posframe e76a8e4 4/8: * vertico-posframe.el (ve


From: ELPA Syncer
Subject: [elpa] externals/vertico-posframe e76a8e4 4/8: * vertico-posframe.el (vertico-posframe-mode): Add and remove post-command-hook: vertico-posframe-post-command-function
Date: Thu, 28 Oct 2021 05:57:42 -0400 (EDT)

branch: externals/vertico-posframe
commit e76a8e4ed3712d4ef14b982e0b7d8810c152dd0d
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>

    * vertico-posframe.el (vertico-posframe-mode): Add and remove 
post-command-hook: vertico-posframe-post-command-function
---
 vertico-posframe.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/vertico-posframe.el b/vertico-posframe.el
index b02894d..5c1df0d 100644
--- a/vertico-posframe.el
+++ b/vertico-posframe.el
@@ -217,8 +217,6 @@ Optional argument FRAME ."
     (posframe-hide vertico-posframe--buffer)
     (posframe-hide vertico-posframe--minibuffer-cover)))
 
-(add-hook 'post-command-hook #'vertico-posframe-post-command-function)
-
 (defun vertico-posframe-post-command-function ()
   "`post-command-hook' function used by vertico-posframe."
   (while-no-input
@@ -257,12 +255,14 @@ Optional argument FRAME ."
     (advice-add #'vertico--display-candidates :override 
#'vertico-posframe--display)
     (advice-add #'vertico--setup :after #'vertico-posframe--setup)
     (advice-add #'completing-read-default :before #'vertico-posframe--advice)
-    (advice-add #'completing-read-multiple :before #'vertico-posframe--advice))
+    (advice-add #'completing-read-multiple :before #'vertico-posframe--advice)
+    (add-hook 'post-command-hook #'vertico-posframe-post-command-function))
    (t
     (advice-remove #'vertico--display-candidates #'vertico-posframe--display)
     (advice-remove #'vertico--setup #'vertico-posframe--setup)
     (advice-remove #'completing-read-default #'vertico-posframe--advice)
     (advice-remove #'completing-read-multiple #'vertico-posframe--advice)
+    (remove-hook 'post-command-hook #'vertico-posframe-post-command-function)
     (posframe-delete vertico-posframe--buffer))))
 
 (provide 'vertico-posframe)



reply via email to

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