1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-09 15:50:40 -08:00

Fix indent-sexp of #s(...) (Bug#31984)

* lisp/emacs-lisp/lisp-mode.el (indent-sexp): Look for a sexp that
ends after the current line.
* test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp-go): New test.
This commit is contained in:
Noam Postavsky 2018-07-19 06:40:54 -04:00
parent 59e8533286
commit 1b4b96597c
2 changed files with 20 additions and 2 deletions

View file

@ -113,6 +113,18 @@ noindent\" 3
;; we're indenting ends on the previous line.
(should (equal (buffer-string) original)))))
(ert-deftest indent-sexp-go ()
"Make sure `indent-sexp' doesn't stop after #s."
;; See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31984.
(with-temp-buffer
(emacs-lisp-mode)
(insert "#s(foo\nbar)\n")
(goto-char (point-min))
(indent-sexp)
(should (equal (buffer-string) "\
#s(foo
bar)\n"))))
(ert-deftest lisp-indent-region ()
"Test basics of `lisp-indent-region'."
(with-temp-buffer