diff options
| author | Stefan Monnier | 2016-03-16 22:55:56 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2016-03-16 22:55:56 -0400 |
| commit | a1ef911f31b81a47482dca4ea01f2c90442c0724 (patch) | |
| tree | c4e13ce7454a8185cb089b8891679b575d7f0640 | |
| parent | 79ae7fbe915f761f166a33f791311eab6b8f6713 (diff) | |
| download | emacs-a1ef911f31b81a47482dca4ea01f2c90442c0724.tar.gz emacs-a1ef911f31b81a47482dca4ea01f2c90442c0724.zip | |
* lisp/emacs-lisp/smie.el (smie-indent-keyword): Don't burp in strings
(bug#22960).
| -rw-r--r-- | 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 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." | |||
| 1493 | (let ((endpos (point))) | 1493 | (let ((endpos (point))) |
| 1494 | (goto-char pos) | 1494 | (goto-char pos) |
| 1495 | (forward-line 1) | 1495 | (forward-line 1) |
| 1496 | (and (equal res (smie-indent-forward-token)) | 1496 | ;; As seen in bug#22960, pos may be inside |
| 1497 | ;; a string, and forward-token may then stumble. | ||
| 1498 | (and (ignore-errors | ||
| 1499 | (equal res (smie-indent-forward-token))) | ||
| 1497 | (eq (point) endpos))))) | 1500 | (eq (point) endpos))))) |
| 1498 | nil | 1501 | nil |
| 1499 | (goto-char pos) | 1502 | (goto-char pos) |