From: Stefan Monnier Date: Thu, 19 Apr 2012 22:02:25 +0000 (-0400) Subject: * lisp/electric.el (electric-indent-post-self-insert-function): Check that X-Git-Tag: emacs-24.2.90~471^2~339 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cfc7d5da20fbfe33c1d2e6d2f3c215e324446d87;p=emacs.git * lisp/electric.el (electric-indent-post-self-insert-function): Check that electric-indent-mode is enabled in current buffer. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5131fa112a7..d89818e836e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-04-19 Stefan Monnier + + * electric.el (electric-indent-post-self-insert-function): Check that + electric-indent-mode is enabled in current buffer. + 2012-04-19 Juanma Barranquero * 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, ;; it looks challenging. (let (pos) (when (and + electric-indent-mode ;; Don't reindent while inserting spaces at beginning of line. (or (not (memq last-command-event '(?\s ?\t))) (save-excursion (skip-chars-backward " \t") (not (bolp))))