]> git.eshelyaron.com Git - emacs.git/commitdiff
(find-tag-default): Catch errors in forward-sexp.
authorRichard M. Stallman <rms@gnu.org>
Wed, 23 Feb 2005 21:04:14 +0000 (21:04 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 23 Feb 2005 21:04:14 +0000 (21:04 +0000)
lisp/subr.el

index 252154c7b0f3f39ee56fc04166e148347f0b4666..4046b9153685c0a36042c1bc490637462682cae3 100644 (file)
@@ -1969,13 +1969,16 @@ If there is no plausible default, return nil."
            (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)