Mercurial > emacs
diff lisp/electric.el @ 110188:92e4fa270c92
* lisp/electric.el (electric-indent-post-self-insert-function):
Don't reindent with a sloppy indentation function.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sun, 05 Sep 2010 00:54:58 +0200 |
parents | c9b982e5aefd |
children | e6399f46aefa |
line wrap: on
line diff
--- a/lisp/electric.el Sun Sep 05 00:51:39 2010 +0200 +++ b/lisp/electric.el Sun Sep 05 00:54:58 2010 +0200 @@ -198,6 +198,10 @@ ;; For newline, we want to reindent both lines and basically behave like ;; reindent-then-newline-and-indent (whose code we hence copied). (when (and (eq last-command-event ?\n) + ;; Don't reindent the previous line if the indentation function + ;; is not a real one. + (not (memq indent-line-function + '(indent-relative indent-relative-maybe))) ;; Sanity check. (eq (char-before) last-command-event)) (let ((pos (copy-marker (1- (point)) t)))