Don't reparse the sexp in indent-sexp (Bug#25122)
commit43c84577a3055d5ddf1f5d1b999e6ecca6139f60
authorNoam Postavsky <npostavs@gmail.com>
Mon, 13 Mar 2017 03:59:19 +0000 (12 23:59 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Sat, 22 Apr 2017 18:09:57 +0000 (22 14:09 -0400)
treed3f238890e53cbd719bf8b1b73cd6971cd494e98
parent66dc8dd6d13d37ef23b52873293d95d87dca497f
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.
lisp/emacs-lisp/lisp-mode.el
test/lisp/emacs-lisp/lisp-mode-tests.el