diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2003-03-31 20:56:14 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2003-03-31 20:56:14 +0000 |
commit | a604e2b4575b02713b63ff6336d2f55725e0f19f (patch) | |
tree | 1bdf2b82a4845e7e1293e499c486f356528c14b7 /lisp/reveal.el | |
parent | 2731a0ade1c67811317ff9bb961999c50e352e7c (diff) | |
download | emacs-a604e2b4575b02713b63ff6336d2f55725e0f19f.tar.gz |
(reveal-post-command): Better error handling and debugging.
Diffstat (limited to 'lisp/reveal.el')
-rw-r--r-- | lisp/reveal.el | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lisp/reveal.el b/lisp/reveal.el index 245c7a3c4a0..c30686e4e27 100644 --- a/lisp/reveal.el +++ b/lisp/reveal.el @@ -61,6 +61,8 @@ ;; Actual code +(defvar reveal-backtrace nil) + (defun reveal-post-command () ;; Refresh the spots that might have changed. ;; `Refreshing' here means to try and re-hide the corresponding text. @@ -107,7 +109,11 @@ (setq repeat t) (condition-case err (funcall open ol nil) - (error (message "!!Reveal-show: %s !!" err)))))))) + (error (setq reveal-backtrace (backtrace)) + (message "!!Reveal-show: %s !!" err) + ;; Let's default to a meaningful behavior to avoid + ;; getting stuck in an infinite loop. + (overlay-put ol 'invisible nil)))))))) ;; Close old overlays. (dolist (ol old-ols) (when (and (eq (current-buffer) (overlay-buffer ol)) @@ -128,9 +134,11 @@ (get ol 'isearch-open-invisible-temporary))))) (condition-case err (funcall open ol t) - (error (message "!!Reveal-hide: %s !!" err))) + (error (setq reveal-backtrace (backtrace)) + (message "!!Reveal-hide: %s !!" err))) (overlay-put ol 'invisible inv))))))) - (error (message "Reveal: %s" err))))) + (error (setq reveal-backtrace (backtrace)) + (message "Reveal: %s" err))))) ;;;###autoload (define-minor-mode reveal-mode |