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:
parent
9af2ab68ca
commit
cc8aa484cd
2 changed files with 26 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue