# HG changeset patch # User Richard M. Stallman # Date 1009317745 0 # Node ID 516cc19cfff21e90d0cc6237c9610ceb8b6b3f60 # Parent 27e95b67fefb5cf528eca47dc5d448187816c6bc (help-xref-on-pp): Catch and ignore errors in scanning the buffer. diff -r 27e95b67fefb -r 516cc19cfff2 lisp/help-mode.el --- 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))))