diff options
| author | Noam Postavsky | 2019-08-16 07:26:40 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2019-08-17 09:42:34 -0400 |
| commit | bcd0115e4db49791a77566b80fabc4384d9ebf57 (patch) | |
| tree | eb5024d4e633eb5e21c83f3ca1e50a9dd46ac6f9 /test/lisp | |
| parent | 5f992d1990d9f351cf907dcf2066f573e0fe9407 (diff) | |
| download | emacs-bcd0115e4db49791a77566b80fabc4384d9ebf57.tar.gz 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')
| -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'\" | |||
| 284 | (lisp-indent-line) | 284 | (lisp-indent-line) |
| 285 | (should (equal (buffer-string) "prompt> foo")))) | 285 | (should (equal (buffer-string) "prompt> foo")))) |
| 286 | 286 | ||
| 287 | 287 | (ert-deftest lisp-indent-unfinished-string () | |
| 288 | "Don't infloop on unfinished string (Bug#37045)." | ||
| 289 | (with-temp-buffer | ||
| 290 | (insert "\"\n") | ||
| 291 | (lisp-indent-region (point-min) (point-max)))) | ||
| 288 | 292 | ||
| 289 | (provide 'lisp-mode-tests) | 293 | (provide 'lisp-mode-tests) |
| 290 | ;;; lisp-mode-tests.el ends here | 294 | ;;; lisp-mode-tests.el ends here |