diff options
author | Noam Postavsky <npostavs@gmail.com> | 2019-08-16 07:26:40 -0400 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2019-08-17 09:42:34 -0400 |
commit | bcd0115e4db49791a77566b80fabc4384d9ebf57 (patch) | |
tree | eb5024d4e633eb5e21c83f3ca1e50a9dd46ac6f9 /test/lisp/emacs-lisp | |
parent | 5f992d1990d9f351cf907dcf2066f573e0fe9407 (diff) | |
download | emacs-bcd0115e4db49791a77566b80fabc4384d9ebf57.tar.gz emacs-bcd0115e4db49791a77566b80fabc4384d9ebf57.tar.bz2 emacs-bcd0115e4db49791a77566b80fabc4384d9ebf57.zip |
Fix lisp indent infloop on unfinished strings (Bug#37045)
* lisp/emacs-lisp/lisp-mode.el (lisp-indent-calc-next): Stop trying to
skip over strings if we've hit the end of buffer.
* test/lisp/emacs-lisp/lisp-mode-tests.el
(lisp-indent-unfinished-string): New test.
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r-- | test/lisp/emacs-lisp/lisp-mode-tests.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/lisp/emacs-lisp/lisp-mode-tests.el b/test/lisp/emacs-lisp/lisp-mode-tests.el index 63632449ca5..e4ba929ecbd 100644 --- a/test/lisp/emacs-lisp/lisp-mode-tests.el +++ b/test/lisp/emacs-lisp/lisp-mode-tests.el @@ -284,7 +284,11 @@ Expected initialization file: `%s'\" (lisp-indent-line) (should (equal (buffer-string) "prompt> foo")))) - +(ert-deftest lisp-indent-unfinished-string () + "Don't infloop on unfinished string (Bug#37045)." + (with-temp-buffer + (insert "\"\n") + (lisp-indent-region (point-min) (point-max)))) (provide 'lisp-mode-tests) ;;; lisp-mode-tests.el ends here |