diff options
author | Richard M. Stallman <rms@gnu.org> | 2001-12-25 22:02:33 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2001-12-25 22:02:33 +0000 |
commit | 5a97a3c2dbb289bb4a97cc68e5713b370f32f6af (patch) | |
tree | 91364da57216e59b31dbea3c1dfb1231360f2e6c /lisp/help-mode.el | |
parent | 2a7c85e3f8eb46c11c27fb5ebc659b156f716ea2 (diff) | |
download | emacs-5a97a3c2dbb289bb4a97cc68e5713b370f32f6af.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.el | 32 |
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)))) |