From dfea75839de5139e9dd80261ad6c45ca6b2b6e0f Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 25 Dec 2001 22:02:25 +0000 Subject: (help-xref-on-pp): Catch and ignore errors in scanning the buffer. --- lisp/help-mode.el | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'lisp/help-mode.el') 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)))) -- cgit v1.2.1