From: Stefan Monnier Date: Thu, 17 Mar 2016 02:55:56 +0000 (-0400) Subject: * lisp/emacs-lisp/smie.el (smie-indent-keyword): Don't burp in strings X-Git-Tag: emacs-25.0.93~89^2~52^2~5 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a1ef911f31b81a47482dca4ea01f2c90442c0724;p=emacs.git * lisp/emacs-lisp/smie.el (smie-indent-keyword): Don't burp in strings (bug#22960). --- diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el index 495ba7cb859..1d8f0cb8f5d 100644 --- a/lisp/emacs-lisp/smie.el +++ b/lisp/emacs-lisp/smie.el @@ -1493,7 +1493,10 @@ should not be computed on the basis of the following token." (let ((endpos (point))) (goto-char pos) (forward-line 1) - (and (equal res (smie-indent-forward-token)) + ;; As seen in bug#22960, pos may be inside + ;; a string, and forward-token may then stumble. + (and (ignore-errors + (equal res (smie-indent-forward-token))) (eq (point) endpos))))) nil (goto-char pos)