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/play/bubbles.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/play/bubbles.el')
-rw-r--r-- | lisp/play/bubbles.el | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/lisp/play/bubbles.el b/lisp/play/bubbles.el index 665e98a69b2..ca7a4013796 100644 --- a/lisp/play/bubbles.el +++ b/lisp/play/bubbles.el @@ -1108,25 +1108,24 @@ Set `bubbles--col-offset' and `bubbles--row-offset'." Use optional parameter POS instead of point if given." (when bubbles--playing (unless pos (setq pos (point))) - (condition-case err - (let ((char (char-after pos)) - (inhibit-read-only t) - (row (bubbles--row (point))) - (col (bubbles--col (point)))) - (add-text-properties (point-min) (point-max) - '(face default active nil)) - (let ((count 0)) - (when (and row col (not (eq char (bubbles--empty-char)))) - (setq count (bubbles--mark-direct-neighbours row col char)) - (unless (> count 1) - (add-text-properties (point-min) (point-max) - '(face default active nil)) - (setq count 0))) - (bubbles--update-neighbourhood-score count)) - (put-text-property (point-min) (point-max) 'pointer 'arrow) - (bubbles--update-faces-or-images) - (sit-for 0)) - (error (message "Bubbles: Internal error %s" err))))) + (with-demoted-errors "Bubbles: Internal error %s" + (let ((char (char-after pos)) + (inhibit-read-only t) + (row (bubbles--row (point))) + (col (bubbles--col (point)))) + (add-text-properties (point-min) (point-max) + '(face default active nil)) + (let ((count 0)) + (when (and row col (not (eq char (bubbles--empty-char)))) + (setq count (bubbles--mark-direct-neighbours row col char)) + (unless (> count 1) + (add-text-properties (point-min) (point-max) + '(face default active nil)) + (setq count 0))) + (bubbles--update-neighbourhood-score count)) + (put-text-property (point-min) (point-max) 'pointer 'arrow) + (bubbles--update-faces-or-images) + (sit-for 0))))) (defun bubbles--neighbourhood-available () "Return t if another valid neighborhood is available." |