]> git.eshelyaron.com Git - emacs.git/commitdiff
(help-xref-on-pp): Catch and ignore errors in scanning the buffer.
authorRichard M. Stallman <rms@gnu.org>
Tue, 25 Dec 2001 22:02:33 +0000 (22:02 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 25 Dec 2001 22:02:33 +0000 (22:02 +0000)
lisp/ChangeLog
lisp/help-mode.el

index 13edc1723bea699d2fc090fedb8e7008bc724798..84e414ec738bfeaad28b37c6b676a387d934d42c 100644 (file)
@@ -1,5 +1,8 @@
 2001-12-25  Richard M. Stallman  <rms@gnu.org>
 
+       * help-mode.el (help-xref-on-pp): Catch and ignore errors in scanning
+       the buffer.
+
        * startup.el (command-line): Convert command line args
        to Emacs internal representation using locale-coding-system.
 
index 7821028460242ff6e197f1d7565412e93595b0bf..e40cb600d8286f02f7384e8943d20da329aa1426 100644 (file)
@@ -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))))
 
 \f