branch: master
commit aeaabd3c8a76920e839ce05add7278e575f201e6
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    hydra.el (defhydra): Re-throw a caught error when debug-on-error
    
    * hydra.el (defhydra): Update.
---
 hydra.el |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/hydra.el b/hydra.el
index d81ac2a..50eb901 100644
--- a/hydra.el
+++ b/hydra.el
@@ -941,7 +941,9 @@ result of `defhydra'."
                (or body-body-pre body-pre) body-before-exit
                '(setq prefix-arg current-prefix-arg)))))
     (error
-     (message "Error in defhydra %S: %s" name (cdr err))
+     (if debug-on-error
+         (signal (car err) (cdr err))
+       (message "Error in defhydra %S: %s" name (cdr err)))
      nil)))
 
 (defmacro defhydradio (name _body &rest heads)

Reply via email to