summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/lisp-mode-tests.el
diff options
context:
space:
mode:
authorNoam Postavsky <npostavs@gmail.com>2017-03-12 23:59:19 -0400
committerNoam Postavsky <npostavs@gmail.com>2017-04-22 14:09:57 -0400
commit43c84577a3055d5ddf1f5d1b999e6ecca6139f60 (patch)
treed3f238890e53cbd719bf8b1b73cd6971cd494e98 /test/lisp/emacs-lisp/lisp-mode-tests.el
parent66dc8dd6d13d37ef23b52873293d95d87dca497f (diff)
downloademacs-43c84577a3055d5ddf1f5d1b999e6ecca6139f60.tar.gz
emacs-43c84577a3055d5ddf1f5d1b999e6ecca6139f60.tar.bz2
emacs-43c84577a3055d5ddf1f5d1b999e6ecca6139f60.zip
Don't reparse the sexp in indent-sexp (Bug#25122)
* lisp/emacs-lisp/lisp-mode.el (calculate-lisp-indent): Let PARSE-START be a parse state that can be reused. (indent-sexp): Pass the running parse state to calculate-lisp-indent instead of the sexp beginning position. Saving the CONTAINING-SEXP-START returned by `calculate-lisp-indent' is no longer needed. Don't bother stopping if we don't descend below init-depth, since we now alway scan the whole buffer (via syntax-ppss) anyway. * test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp): Add blank line to test case.
Diffstat (limited to 'test/lisp/emacs-lisp/lisp-mode-tests.el')
-rw-r--r--test/lisp/emacs-lisp/lisp-mode-tests.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/lisp/emacs-lisp/lisp-mode-tests.el b/test/lisp/emacs-lisp/lisp-mode-tests.el
index 8e3f2e185cf..27f0bb5ec13 100644
--- a/test/lisp/emacs-lisp/lisp-mode-tests.el
+++ b/test/lisp/emacs-lisp/lisp-mode-tests.el
@@ -31,6 +31,9 @@
1
2)
2)
+ (fun arg1
+
+ arg2)
(1
\"string
noindent\" (\"string2
@@ -58,7 +61,7 @@ noindent\" 3
(save-excursion
(let ((n 0))
(while (not (eobp))
- (unless (looking-at "noindent")
+ (unless (looking-at "noindent\\|^[[:blank:]]*$")
(insert (make-string n ?\s)))
(cl-incf n)
(forward-line))))