summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/lisp-mode-tests.el
diff options
context:
space:
mode:
authorStephen Gildea <stepheng+emacs@gildea.com>2018-07-31 22:34:35 -0700
committerStephen Gildea <stepheng+emacs@gildea.com>2018-07-31 22:34:35 -0700
commit1804fece02691798394c9e9bd519cd4a53776018 (patch)
tree9d5d441db29404f04417332be3507ba968eec42f /test/lisp/emacs-lisp/lisp-mode-tests.el
parent17205d361795eaaa8e09ae62875c7439bb57a078 (diff)
parent82d6416a28dc5b4ab65b8081f035679bec4e3604 (diff)
downloademacs-1804fece02691798394c9e9bd519cd4a53776018.tar.gz
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Diffstat (limited to 'test/lisp/emacs-lisp/lisp-mode-tests.el')
-rw-r--r--test/lisp/emacs-lisp/lisp-mode-tests.el23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/lisp-mode-tests.el b/test/lisp/emacs-lisp/lisp-mode-tests.el
index 8598d419788..30f606d3816 100644
--- a/test/lisp/emacs-lisp/lisp-mode-tests.el
+++ b/test/lisp/emacs-lisp/lisp-mode-tests.el
@@ -113,6 +113,29 @@ 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 indent-sexp-cant-go ()
+ "`indent-sexp' shouldn't error before a sexp."
+ ;; See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31984#32.
+ (with-temp-buffer
+ (emacs-lisp-mode)
+ (insert "(())")
+ (goto-char (1+ (point-min)))
+ ;; Paredit calls `indent-sexp' from this position.
+ (indent-sexp)
+ (should (equal (buffer-string) "(())"))))
+
(ert-deftest lisp-indent-region ()
"Test basics of `lisp-indent-region'."
(with-temp-buffer