summaryrefslogtreecommitdiff
path: root/lisp/textmodes/sgml-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/textmodes/sgml-mode.el')
-rw-r--r--lisp/textmodes/sgml-mode.el23
1 files changed, 13 insertions, 10 deletions
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index 7eabb10a80a..85f6ccff70a 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -894,16 +894,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)