diff options
author | Glenn Morris <rgm@gnu.org> | 2013-09-11 22:32:57 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2013-09-11 22:32:57 -0700 |
commit | 30213927b6eebe291cd425d5863f54bffe0b8a83 (patch) | |
tree | a66f7b728c1ba3723a02d2b242cecf3660053bc4 /lisp/reveal.el | |
parent | 170266d096bc4d0952bee907532d14503e882bf6 (diff) | |
download | emacs-30213927b6eebe291cd425d5863f54bffe0b8a83.tar.gz |
Use with-demoted-errors now that it can format any error messages
* dframe.el (dframe-timer-fn):
* files.el (dir-locals-read-from-file):
* mpc.el (mpc--status-timer-run, mpc--status-idle-timer-run, mpc-format):
* reveal.el (reveal-post-command):
* saveplace.el (load-save-place-alist-from-file):
* shell.el (shell-resync-dirs):
* w32-common-fns.el (x-get-selection-value):
* emacs-lisp/copyright.el (copyright-find-copyright):
* emacs-lisp/eldoc.el (eldoc-print-current-symbol-info):
* emulation/tpu-edt.el (tpu-copy-keyfile):
* play/bubbles.el (bubbles--mark-neighbourhood):
* progmodes/executable.el (executable-make-buffer-file-executable-if-script-p):
* term/pc-win.el (x-get-selection-value): Use with-demoted-errors.
Diffstat (limited to 'lisp/reveal.el')
-rw-r--r-- | lisp/reveal.el | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/lisp/reveal.el b/lisp/reveal.el index 92c1178041c..6740f7e923f 100644 --- a/lisp/reveal.el +++ b/lisp/reveal.el @@ -72,27 +72,26 @@ Each element has the form (WINDOW . OVERLAY).") ;; - we only refresh spots in the current window. ;; FIXME: do we actually know that (current-buffer) = (window-buffer) ? (with-local-quit - (condition-case err - (let ((old-ols - (delq nil - (mapcar - (lambda (x) - ;; We refresh any spot in the current window as well - ;; as any spots associated with a dead window or - ;; a window which does not show this buffer any more. - (cond - ((eq (car x) (selected-window)) (cdr x)) - ((not (and (window-live-p (car x)) - (eq (window-buffer (car x)) (current-buffer)))) - ;; Adopt this since it's owned by a window that's - ;; either not live or at least not showing this - ;; buffer any more. - (setcar x (selected-window)) - (cdr x)))) - reveal-open-spots)))) - (setq old-ols (reveal-open-new-overlays old-ols)) - (reveal-close-old-overlays old-ols)) - (error (message "Reveal: %s" err))))) + (with-demoted-errors "Reveal: %s" + (let ((old-ols + (delq nil + (mapcar + (lambda (x) + ;; We refresh any spot in the current window as well + ;; as any spots associated with a dead window or + ;; a window which does not show this buffer any more. + (cond + ((eq (car x) (selected-window)) (cdr x)) + ((not (and (window-live-p (car x)) + (eq (window-buffer (car x)) (current-buffer)))) + ;; Adopt this since it's owned by a window that's + ;; either not live or at least not showing this + ;; buffer any more. + (setcar x (selected-window)) + (cdr x)))) + reveal-open-spots)))) + (setq old-ols (reveal-open-new-overlays old-ols)) + (reveal-close-old-overlays old-ols))))) (defun reveal-open-new-overlays (old-ols) (let ((repeat t)) |