diff options
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/electric.el | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5131fa112a7..d89818e836e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-04-19 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * electric.el (electric-indent-post-self-insert-function): Check that | ||
| 4 | electric-indent-mode is enabled in current buffer. | ||
| 5 | |||
| 1 | 2012-04-19 Juanma Barranquero <lekktu@gmail.com> | 6 | 2012-04-19 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * imenu.el (imenu-progress-message): Restore; it is "used" in | 8 | * imenu.el (imenu-progress-message): Restore; it is "used" in |
diff --git a/lisp/electric.el b/lisp/electric.el index 50c9010a74e..6a31ba1f1d3 100644 --- a/lisp/electric.el +++ b/lisp/electric.el | |||
| @@ -215,6 +215,7 @@ point right after that char, and it should return t to cause indentation, | |||
| 215 | ;; it looks challenging. | 215 | ;; it looks challenging. |
| 216 | (let (pos) | 216 | (let (pos) |
| 217 | (when (and | 217 | (when (and |
| 218 | electric-indent-mode | ||
| 218 | ;; Don't reindent while inserting spaces at beginning of line. | 219 | ;; Don't reindent while inserting spaces at beginning of line. |
| 219 | (or (not (memq last-command-event '(?\s ?\t))) | 220 | (or (not (memq last-command-event '(?\s ?\t))) |
| 220 | (save-excursion (skip-chars-backward " \t") (not (bolp)))) | 221 | (save-excursion (skip-chars-backward " \t") (not (bolp)))) |