Function: electric-layout-mode
electric-layout-mode is an interactive and byte-compiled function
defined in electric.el.gz.
Signature
(electric-layout-mode &optional ARG)
Documentation
Automatically insert newlines around some chars.
The variable electric-layout-rules says when and how to insert newlines.
This is a global minor mode. If called interactively, toggle the
Electric-Layout mode mode. If the prefix argument is positive, enable
the mode, and if it is zero or negative, disable the mode.
If called from Lisp, toggle the mode if ARG is toggle. Enable the
mode if ARG is nil, omitted, or is a positive number. Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate (default-value \=electric-layout-mode)'.
The mode's hook is called both when the mode is enabled and when it is disabled.
Probably introduced at or before Emacs version 24.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/electric.el.gz
;;;###autoload
(define-minor-mode electric-layout-mode
"Automatically insert newlines around some chars.
The variable `electric-layout-rules' says when and how to insert newlines."
:global t :group 'electricity
(cond (electric-layout-mode
(add-hook 'post-self-insert-hook
#'electric-layout-post-self-insert-function
40))
(t
(remove-hook 'post-self-insert-hook
#'electric-layout-post-self-insert-function))))