Function: electric-indent-local-mode
electric-indent-local-mode is an interactive and byte-compiled
function defined in electric.el.gz.
Signature
(electric-indent-local-mode &optional ARG)
Documentation
Toggle electric-indent-mode(var)/electric-indent-mode(fun) only in this buffer.
This is a minor mode. If called interactively, toggle the
Electric-Indent-Local 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 the variable electric-indent-mode(var)/electric-indent-mode(fun).
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.4.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/electric.el.gz
;;;###autoload
(define-minor-mode electric-indent-local-mode
"Toggle `electric-indent-mode' only in this buffer."
:variable ( electric-indent-mode .
(lambda (val) (setq-local electric-indent-mode val)))
(cond
((eq electric-indent-mode (default-value 'electric-indent-mode))
(kill-local-variable 'electric-indent-mode))
((not (default-value 'electric-indent-mode))
;; Locally enabled, but globally disabled.
(electric-indent-mode 1) ; Setup the hooks.
(setq-default electric-indent-mode nil) ; But keep it globally disabled.
)))