emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r101339: * lisp/electric.el (electric


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101339: * lisp/electric.el (electric-indent-post-self-insert-function):
Date: Sun, 05 Sep 2010 00:54:58 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101339
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Sun 2010-09-05 00:54:58 +0200
message:
  * lisp/electric.el (electric-indent-post-self-insert-function):
  Don't reindent with a sloppy indentation function.
modified:
  lisp/ChangeLog
  lisp/electric.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-09-04 22:51:39 +0000
+++ b/lisp/ChangeLog    2010-09-04 22:54:58 +0000
@@ -1,5 +1,8 @@
 2010-09-04  Stefan Monnier  <address@hidden>
 
+       * 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  <address@hidden>
 
-       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.

=== modified file 'lisp/electric.el'
--- a/lisp/electric.el  2010-09-03 13:06:51 +0000
+++ b/lisp/electric.el  2010-09-04 22:54:58 +0000
@@ -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)))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]