From 03b1a68c4f953202e20ceea82f3a96c40e211095 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 28 May 2007 14:10:50 +0000 Subject: [PATCH] (sgml-point-entered): Use condition-case. --- lisp/textmodes/sgml-mode.el | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 5e599ea10e6..5ac9d3fb63e 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -897,16 +897,19 @@ With prefix argument ARG, repeat this ARG times." ;; Show preceding or following hidden tag, depending of cursor direction. (let ((inhibit-point-motion-hooks t)) (save-excursion - (message "Invisible tag: %s" - ;; Strip properties, otherwise, the text is invisible. - (buffer-substring-no-properties - (point) - (if (or (and (> x y) - (not (eq (following-char) ?<))) - (and (< x y) - (eq (preceding-char) ?>))) - (backward-list) - (forward-list))))))) + (condition-case nil + (message "Invisible tag: %s" + ;; Strip properties, otherwise, the text is invisible. + (buffer-substring-no-properties + (point) + (if (or (and (> x y) + (not (eq (following-char) ?<))) + (and (< x y) + (eq (preceding-char) ?>))) + (backward-list) + (forward-list)))) + (error nil))))) + (defun sgml-validate (command) -- 2.39.5