More conservative electric-indent-local-mode
Prevent them from propagating to derived modes (I'm looking at you c modes!)
This commit is contained in:
parent
da9c4802eb
commit
6d3df42352
1 changed files with 6 additions and 5 deletions
|
@ -17,9 +17,10 @@ Enables `electric-indent-local-mode' in MODES.
|
||||||
(unintern fn nil))
|
(unintern fn nil))
|
||||||
((fset fn
|
((fset fn
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
(when (eq major-mode mode)
|
||||||
(setq-local electric-indent-inhibit nil)
|
(setq-local electric-indent-inhibit nil)
|
||||||
(cl-destructuring-bind (&key chars words) plist
|
(cl-destructuring-bind (&key chars words) plist
|
||||||
(electric-indent-local-mode +1)
|
(electric-indent-local-mode +1)
|
||||||
(if chars (setq electric-indent-chars chars))
|
(if chars (setq electric-indent-chars chars))
|
||||||
(if words (setq +electric-indent-words words)))))
|
(if words (setq +electric-indent-words words))))))
|
||||||
(add-hook hook fn))))))
|
(add-hook hook fn))))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue