emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 a1ef911: * lisp/emacs-lisp/smie.el (smie-indent-k


From: Stefan Monnier
Subject: [Emacs-diffs] emacs-25 a1ef911: * lisp/emacs-lisp/smie.el (smie-indent-keyword): Don't burp in strings
Date: Thu, 17 Mar 2016 02:56:00 +0000

branch: emacs-25
commit a1ef911f31b81a47482dca4ea01f2c90442c0724
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    * lisp/emacs-lisp/smie.el (smie-indent-keyword): Don't burp in strings
    
    (bug#22960).
---
 lisp/emacs-lisp/smie.el |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el
index 495ba7c..1d8f0cb 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]