1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-19 10:22:27 +00:00
emacs/test/lisp/emacs-lisp
Noam Postavsky e7b6751c0a Fix lisp-indent-region and indent-sexp (Bug#26619)
The new lisp-indent-region introduced in 2017-04-22 "Add new
`lisp-indent-region' that doesn't reparse the code." is broken because
it doesn't save the calculated indent amounts for already seen sexp
depths.  Fix this by unifying the indent-sexp and lisp-indent-region
code.  Furthermore, only preserve position 2 of the running parse
when the depth doesn't change.
* lisp/emacs-lisp/lisp-mode.el (lisp-ppss): Use an OLDSTATE that
corresponds with the start point when calling parse-partial-sexp.
(lisp-indent-state): New struct.
(lisp-indent-calc-next): New function, extracted from indent-sexp.
(indent-sexp, lisp-indent-region): Use it.
(lisp-indent-line): Take indentation, instead of parse state.
* test/lisp/emacs-lisp/lisp-mode-tests.el
(lisp-mode-tests--correctly-indented-sexp): New constant.
(lisp-indent-region, lisp-indent-region-defun-with-docstring):
(lisp-indent-region-open-paren, lisp-indent-region-in-sexp): New
tests.
2017-05-09 20:50:19 -04:00
..
eieio-tests Suppress intermittent test failure on hydra 2017-04-25 16:20:38 -04:00
package-resources Don't use IP 0.0.0.0 for package test server (Bug#22582) 2017-02-25 12:56:09 -05:00
testcover-resources Add tests for lisp/emacs-lisp/testcover.el 2017-02-04 11:43:50 +02:00
benchmark-tests.el Use lexical binding in benchmark.el 2017-03-03 18:26:30 +09:00
bytecomp-tests.el Warn about missing backslashes during load 2017-05-01 20:39:10 +02:00
checkdoc-tests.el
cl-extra-tests.el Prevent for consing in cl-mapc and cl-mapl 2017-02-27 16:32:10 +09:00
cl-generic-tests.el
cl-lib-tests.el * lisp/emacs-lisp/cl-macs.el: Fix symbol-macrolet 2017-04-21 12:12:42 -04:00
cl-print-tests.el Add record objects with user-defined types. 2017-04-04 08:23:46 +02:00
cl-seq-tests.el test/*.el: Avoid byte-compiler warnings 2017-01-28 04:40:36 +01:00
ert-tests.el
ert-x-tests.el
generator-tests.el
let-alist-tests.el test/*.el: Avoid byte-compiler warnings 2017-01-28 04:40:36 +01:00
lisp-mode-tests.el Fix lisp-indent-region and indent-sexp (Bug#26619) 2017-05-09 20:50:19 -04:00
lisp-tests.el
map-tests.el
nadvice-tests.el
package-tests.el Update a package test for hydra 2017-04-11 08:42:54 -07:00
pcase-tests.el
pp-tests.el Switch pp.el to lexical binding 2017-03-02 23:03:20 -05:00
regexp-opt-tests.el
ring-tests.el
rx-tests.el
seq-tests.el Add seq-set-equal-p to test for set equality 2017-05-04 11:32:58 +02:00
subr-x-tests.el
tabulated-list-test.el
testcover-tests.el Add tests for lisp/emacs-lisp/testcover.el 2017-02-04 11:43:50 +02:00
thunk-tests.el
timer-tests.el