]> git.eshelyaron.com Git - emacs.git/commit
Correctly reindent previous line in electric-indent-mode
authorJoão Távora <joaotavora@gmail.com>
Wed, 15 May 2019 12:10:22 +0000 (13:10 +0100)
committerJoão Távora <joaotavora@gmail.com>
Tue, 2 Jul 2019 15:10:45 +0000 (16:10 +0100)
commit5e88b50d542b6d1c4ff43f8ae0fabe8a647d842e
tree46c5c7e22127d8e6aad017f925514a0fb62c19ca
parent2a2a1bdb8f0f149aaf736a61685feec9380be1b1
Correctly reindent previous line in electric-indent-mode

Fixes: bug#35254
Do this even when electric-indent-inhibit is t, except when the
newline insertion is being performed by electric-layout-mode.

* lisp/electric.el (electric-indent-post-self-insert-function):
Reindent previous line unless operating under
electric-layout-mode.
(electric-layout-post-self-insert-function-1): Bind
electric-indent-inhibit to 'electric-layout-mode.

* test/lisp/electric-tests.el
(electric-layout-control-reindentation): New test.
lisp/electric.el
test/lisp/electric-tests.el