From 6842731f08637dfd9e30324547e06e99e14b1a30 Mon Sep 17 00:00:00 2001 From: Oleh Krehel Date: Mon, 8 Apr 2019 12:06:07 +0200 Subject: [PATCH] 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 8aca43e..6da21a2 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))