summaryrefslogtreecommitdiff
path: root/lisp/help-mode.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2001-12-25 22:02:25 +0000
committerRichard M. Stallman <rms@gnu.org>2001-12-25 22:02:25 +0000
commitdfea75839de5139e9dd80261ad6c45ca6b2b6e0f (patch)
tree34f83d5d7697200ded8f1c4b514574d87aef947e /lisp/help-mode.el
parentdec004aff4e398f9d36bba8739044c77569ed195 (diff)
downloademacs-dfea75839de5139e9dd80261ad6c45ca6b2b6e0f.tar.gz
(help-xref-on-pp): Catch and ignore errors in scanning the buffer.
Diffstat (limited to 'lisp/help-mode.el')
-rw-r--r--lisp/help-mode.el32
1 files changed, 17 insertions, 15 deletions
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 78210284602..e40cb600d82 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -463,21 +463,23 @@ See `help-make-xrefs'."
(set-syntax-table emacs-lisp-mode-syntax-table)
(narrow-to-region from to)
(goto-char (point-min))
- (while (not (eobp))
- (cond
- ((looking-at "\"") (forward-sexp 1))
- ((looking-at "#<") (search-forward ">" nil 'move))
- ((looking-at "\\(\\(\\sw\\|\\s_\\)+\\)")
- (let* ((sym (intern-soft (match-string 1)))
- (type (cond ((fboundp sym) 'help-function)
- ((or (memq sym '(t nil))
- (keywordp sym))
- nil)
- ((and sym (boundp sym))
- 'help-variable))))
- (when type (help-xref-button 1 type sym)))
- (goto-char (match-end 1)))
- (t (forward-char 1))))))
+ (condition-case nil
+ (while (not (eobp))
+ (cond
+ ((looking-at "\"") (forward-sexp 1))
+ ((looking-at "#<") (search-forward ">" nil 'move))
+ ((looking-at "\\(\\(\\sw\\|\\s_\\)+\\)")
+ (let* ((sym (intern-soft (match-string 1)))
+ (type (cond ((fboundp sym) 'help-function)
+ ((or (memq sym '(t nil))
+ (keywordp sym))
+ nil)
+ ((and sym (boundp sym))
+ 'help-variable))))
+ (when type (help-xref-button 1 type sym)))
+ (goto-char (match-end 1)))
+ (t (forward-char 1))))
+ (error nil))))
(set-syntax-table ost))))