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.
This commit is contained in:
Noam Postavsky 2017-06-10 09:50:48 -04:00
parent 9af2ab68ca
commit cc8aa484cd
2 changed files with 26 additions and 14 deletions

View file

@ -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