changeset 60224:374bd52dd8b8

(find-tag-default): Catch errors in forward-sexp.
author Richard M. Stallman <rms@gnu.org>
date Wed, 23 Feb 2005 21:04:14 +0000
parents f2ea5deec196
children c467ceeff8c7
files lisp/subr.el
diffstat 1 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/subr.el	Wed Feb 23 17:15:47 2005 +0000
+++ b/lisp/subr.el	Wed Feb 23 21:04:14 2005 +0000
@@ -1969,13 +1969,16 @@
 	    (re-search-forward "\\(\\sw\\|\\s_\\)+"
 			       (save-excursion (end-of-line) (point))
 			       t))
-	(progn (goto-char (match-end 0))
-	       (buffer-substring-no-properties
-                (point)
-                (progn (forward-sexp -1)
-                       (while (looking-at "\\s'")
-                         (forward-char 1))
-                       (point))))
+	(progn
+	  (goto-char (match-end 0))
+	  (condition-case nil
+	      (buffer-substring-no-properties
+	       (point)
+	       (progn (forward-sexp -1)
+		      (while (looking-at "\\s'")
+			(forward-char 1))
+		      (point)))
+	    (error nil)))
       nil)))
 
 (defmacro with-syntax-table (table &rest body)