]> git.eshelyaron.com Git - emacs.git/commit
Rework electric-layout-post-self-insert-function (bug#33794)
authorJoão Távora <joaotavora@gmail.com>
Sat, 22 Dec 2018 01:52:08 +0000 (01:52 +0000)
committerJoão Távora <joaotavora@gmail.com>
Sun, 23 Dec 2018 20:42:17 +0000 (20:42 +0000)
commit6deb668e727cb7f2666b19461adfb4814bd32556
treebd9df1476d0237adbe5b93b83b555e35b62e0074
parentcb1b4a8c01900191790e3a2c745cd86d5a3d4639
Rework electric-layout-post-self-insert-function (bug#33794)

This should now fix more problems reported in (bug#33794) regarding
insertion of newlines before and after the opening brace.  Write two
automated tests.

Also provide a new electric-layout-local-mode for testing.

* lisp/electric.el (electric-layout-post-self-insert-function-1):
New function that does the work for
electric-layout-post-self-insert-function-1.
(electric-layout-local-mode): New minor mode.

* test/lisp/electric-tests.el (electric-layout-int-main-kernel-style)
(electric-layout-int-main-allman-style): Add two tests.
lisp/electric.el
test/lisp/electric-tests.el