diff options
author | Noam Postavsky <npostavs@gmail.com> | 2017-06-10 09:50:48 -0400 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2017-06-13 07:19:12 -0400 |
commit | cc8aa484cdab6b2f33a8c95a5778193c762412b9 (patch) | |
tree | 4a9c6ab5286a5bfdf0a53b7e688cb09e4555d4f9 /test/lisp/emacs-lisp/lisp-mode-tests.el | |
parent | 9af2ab68caf7a0bf3bda521729ac0376489cce19 (diff) | |
download | emacs-cc8aa484cdab6b2f33a8c95a5778193c762412b9.tar.gz |
Fix wrong indentation after string literal (Bug#27306)
* lisp/emacs-lisp/lisp-mode.el (lisp-indent-state)
(lisp-indent-calc-next): Remove `depth' field, use (car ppss) instead.
* test/lisp/emacs-lisp/lisp-mode-tests.el
(lisp-indent-region-after-string-literal): New test.
Diffstat (limited to 'test/lisp/emacs-lisp/lisp-mode-tests.el')
-rw-r--r-- | test/lisp/emacs-lisp/lisp-mode-tests.el | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/lisp-mode-tests.el b/test/lisp/emacs-lisp/lisp-mode-tests.el index f2fe7a6cf41..582041cfc2d 100644 --- a/test/lisp/emacs-lisp/lisp-mode-tests.el +++ b/test/lisp/emacs-lisp/lisp-mode-tests.el @@ -185,6 +185,19 @@ Test indentation in emacs-lisp-mode\" (indent-region (point) (point-max)) (should (equal (buffer-string) correct))))) +(ert-deftest lisp-indent-region-after-string-literal () + (with-temp-buffer + (insert "\ +\(user-error \"Unexpected initialization file: `%s' +Expected initialization file: `%s'\" + (abbreviate-file-name user-init-file) + (abbreviate-file-name this-init-file))") + (let ((indent-tabs-mode nil) + (correct (buffer-string))) + (emacs-lisp-mode) + (indent-region (point-min) (point-max)) + (should (equal (buffer-string) correct))))) + (provide 'lisp-mode-tests) ;;; lisp-mode-tests.el ends here |