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

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

[elpa] externals/hydra 6842731f08 43/46: hydra.el (hydra-lv): Declare ob


From: Stefan Monnier
Subject: [elpa] externals/hydra 6842731f08 43/46: hydra.el (hydra-lv): Declare obsolete
Date: Tue, 25 Oct 2022 22:27:23 -0400 (EDT)

branch: externals/hydra
commit 6842731f08637dfd9e30324547e06e99e14b1a30
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    hydra.el (hydra-lv): Declare obsolete
    
    If you want Hydra to use `message' instead of `lv-message' (the default):
    
        (setq hydra-hint-display-type 'message)
    
    If you want only a specific hydra to use `message':
    
        (hydra-set-property 'hydra-test :verbosity 1)
    
    Remember to add a delay if a head uses `message' too, otherwise the
    hydra hint will erase it:
    
        (defhydra hydra-test ()
          ("t" (progn
                 (message "time %S" (current-time))
                 (sit-for 0.8)) "test"))
    
    Re #313
---
 hydra.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/hydra.el b/hydra.el
index 8aca43e586..6da21a2378 100644
--- a/hydra.el
+++ b/hydra.el
@@ -235,6 +235,10 @@ the body or the head."
           (const posframe))
   :group 'hydra)
 
+(define-obsolete-variable-alias
+    'hydra-lv 'hydra-hint-display-type "0.14.0"
+    "Use either `hydra-hint-display-type' or `hydra-set-property' :verbosity.")
+
 (defcustom hydra-lv t
   "When non-nil, `lv-message' (not `message') will be used to display hints."
   :type 'boolean)
@@ -886,9 +890,7 @@ BODY-AFTER-EXIT is added to the end of the wrapper."
                  `(condition-case err
                       ,(hydra--call-interactively cmd (cadr head))
                     ((quit error)
-                     (message (error-message-string err))
-                     (unless hydra-lv
-                       (sit-for 0.8)))))
+                     (message (error-message-string err)))))
               ,(if (and body-idle (eq (cadr head) 'body))
                    `(hydra-idle-message ,body-idle ,hint ',name)
                  `(hydra-show-hint ,hint ',name))



reply via email to

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