diff options
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/lisp.el | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index bffaee57487..9cd267a76f4 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -228,12 +228,13 @@ or properties are considered." (interactive) (let* ((end (point)) (buffer-syntax (syntax-table)) - (beg (save-excursion - (set-syntax-table lisp-mode-syntax-table) - (backward-sexp 1) - (while (= (char-syntax (following-char)) ?\') - (forward-char 1)) - (point) + (beg (unwind-protect + (save-excursion + (set-syntax-table emacs-lisp-mode-syntax-table) + (backward-sexp 1) + (while (= (char-syntax (following-char)) ?\') + (forward-char 1)) + (point)) (set-syntax-table buffer-syntax))) (pattern (buffer-substring beg end)) (predicate |