[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/simple.el,v
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/simple.el,v |
Date: |
Wed, 24 Oct 2007 01:51:05 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 07/10/24 01:51:04
Index: simple.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/simple.el,v
retrieving revision 1.883
retrieving revision 1.884
diff -u -b -r1.883 -r1.884
--- simple.el 22 Oct 2007 00:17:26 -0000 1.883
+++ simple.el 24 Oct 2007 01:51:02 -0000 1.884
@@ -633,9 +633,16 @@
(newline)
(save-excursion
(goto-char pos)
- ;; Usually indent-according-to-mode should "preserve" point, but it is
- ;; not guaranteed; e.g. indent-to-left-margin doesn't.
- (save-excursion (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
+ ;; whereas we need `move after insertion', so we do the save/restore
+ ;; by hand.
+ (setq pos (copy-marker pos t))
+ (indent-according-to-mode)
+ (goto-char pos)
+ ;; Remove the trailing white-space after indentation because
+ ;; indentation may introduce the whitespace.
(delete-horizontal-space t))
(indent-according-to-mode)))
- [Emacs-diffs] Changes to emacs/lisp/simple.el,v, Glenn Morris, 2007/10/06
- [Emacs-diffs] Changes to emacs/lisp/simple.el,v, Glenn Morris, 2007/10/15
- [Emacs-diffs] Changes to emacs/lisp/simple.el,v, Stefan Monnier, 2007/10/16
- [Emacs-diffs] Changes to emacs/lisp/simple.el,v, Glenn Morris, 2007/10/18
- [Emacs-diffs] Changes to emacs/lisp/simple.el,v, Juri Linkov, 2007/10/21
- [Emacs-diffs] Changes to emacs/lisp/simple.el,v,
Stefan Monnier <=