Mercurial > emacs
changeset 42334:516cc19cfff2
(help-xref-on-pp): Catch and ignore errors in scanning the buffer.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 25 Dec 2001 22:02:25 +0000 |
parents | 27e95b67fefb |
children | f56b709ef9a6 |
files | lisp/help-mode.el |
diffstat | 1 files changed, 17 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/help-mode.el Tue Dec 25 17:20:00 2001 +0000 +++ b/lisp/help-mode.el Tue Dec 25 22:02:25 2001 +0000 @@ -463,21 +463,23 @@ (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))))