emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102602: * lisp/electric.el (electric-indent-post-self-insert-function):
Date: Tue, 07 Dec 2010 10:36:08 -0500
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102602
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Tue 2010-12-07 10:36:08 -0500
message:
  * lisp/electric.el (electric-indent-post-self-insert-function):
  Delete trailing newlines even if we don't reindent.
modified:
  lisp/ChangeLog
  lisp/electric.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-12-06 18:21:42 +0000
+++ b/lisp/ChangeLog    2010-12-07 15:36:08 +0000
@@ -1,5 +1,15 @@
+2010-12-07  Stefan Monnier  <address@hidden>
+
+       * electric.el (electric-indent-post-self-insert-function):
+       Delete trailing newlines even if we don't reindent.
+
 2010-12-06  Stefan Monnier  <address@hidden>
 
+       * minibuffer.el (completion-at-point): Remove the `arg'.
+       * bindings.el (complete-symbol): Move back from minibuffer.el.
+
+2010-12-06  Deniz Dogan  <address@hidden>
+
        * simple.el (just-one-space): Delete newlines for negative arg.
 
 2010-12-06  Stefan Monnier  <address@hidden>

=== modified file 'lisp/electric.el'
--- a/lisp/electric.el  2010-11-18 02:43:42 +0000
+++ b/lisp/electric.el  2010-12-07 15:36:08 +0000
@@ -217,15 +217,15 @@
                (not (nth 8 (save-excursion (syntax-ppss pos)))))
       ;; For newline, we want to reindent both lines and basically behave like
       ;; reindent-then-newline-and-indent (whose code we hence copied).
-      (when (and (< (1- pos) (line-beginning-position))
-                 ;; 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))))
+      (when (< (1- pos) (line-beginning-position))
         (let ((before (copy-marker (1- pos) t)))
           (save-excursion
-            (goto-char before)
-            (indent-according-to-mode)
+            (unless (memq indent-line-function
+                          '(indent-relative indent-relative-maybe))
+              ;; Don't reindent the previous line if the indentation function
+              ;; is not a real one.
+              (goto-char before)
+              (indent-according-to-mode))
             ;; We are at EOL before the call to indent-according-to-mode, and
             ;; after it we usually are as well, but not always.  We tried to
             ;; address it with `save-excursion' but that uses a normal marker


reply via email to

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