]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/electric.el (electric-indent-post-self-insert-function):
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 4 Sep 2010 22:54:58 +0000 (00:54 +0200)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 4 Sep 2010 22:54:58 +0000 (00:54 +0200)
Don't reindent with a sloppy indentation function.

lisp/ChangeLog
lisp/electric.el

index 020f3237e3360be0c2f42749a54a96c418d444e1..988a584599ec66d0b45e10a1972860637b43ce80 100644 (file)
@@ -1,5 +1,8 @@
 2010-09-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * electric.el (electric-indent-post-self-insert-function):
+       Don't reindent with a sloppy indentation function.
+
        * emacs-lisp/syntax.el (syntax-ppss): More sanity check to catch
        border case in change-log-mode.
 
@@ -12,7 +15,7 @@
 
 2010-09-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 
-       Avoid global recursive calls to kill-buffer-hooks, and fit into 80 cols.
+       Avoid global recursive calls to kill-buffer-hooks; fit into 80 cols.
        * textmodes/ispell.el (ispell-process-buffer-name): Remove.
        (ispell-start-process): Avoid setq and simplify logic.
        (ispell-init-process): Setup kill-buffer-hook locally when needed.
index 48d865d895739b2658ccb45f21039670557d091a..8e9d23be231500ce99abea7b4b96ca78c48989e5 100644 (file)
     ;; 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)))