diff options
author | Richard M. Stallman <rms@gnu.org> | 2005-02-23 21:04:14 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2005-02-23 21:04:14 +0000 |
commit | 3e9f9352d44da8942e8ee4d726812bc2dd9528cf (patch) | |
tree | b2e065099c5e89d2d43d95bcc2722b2c0f088731 /lisp/subr.el | |
parent | 91c6626241581dd37ce938e6e45aabc16d252ed4 (diff) | |
download | emacs-3e9f9352d44da8942e8ee4d726812bc2dd9528cf.tar.gz |
(find-tag-default): Catch errors in forward-sexp.
Diffstat (limited to 'lisp/subr.el')
-rw-r--r-- | lisp/subr.el | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 252154c7b0f..4046b915368 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -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) |