]> code.delx.au - gnu-emacs-elpa/commitdiff
hydra.el (defhydra): Re-throw a caught error when debug-on-error
authorOleh Krehel <ohwoeowho@gmail.com>
Wed, 15 Apr 2015 08:07:24 +0000 (10:07 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Wed, 15 Apr 2015 08:45:54 +0000 (10:45 +0200)
* hydra.el (defhydra): Update.

hydra.el

index d81ac2aecb1d701ed81aa83bb028e174b3591204..50eb901717cac5464be293230cbf939c3edd954b 100644 (file)
--- 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)