# HG changeset patch # User Stefan Monnier # Date 1192547919 0 # Node ID 84eaa97c1d654706e1cfbfb4801e1f65b6a7a077 # Parent d4cb1ed6569fc8098be241f51b85d0c824e3a4c1 (reindent-then-newline-and-indent): Don't assume that indent-according-to-mode preserves point. diff -r d4cb1ed6569f -r 84eaa97c1d65 lisp/ChangeLog --- a/lisp/ChangeLog Tue Oct 16 10:40:02 2007 +0000 +++ b/lisp/ChangeLog Tue Oct 16 15:18:39 2007 +0000 @@ -1,3 +1,8 @@ +2007-10-16 Stefan Monnier + + * simple.el (reindent-then-newline-and-indent): Don't assume that + indent-according-to-mode preserves point. + 2007-10-16 Juanma Barranquero * bs.el (bs--make-header-match-string, bs-show-in-buffer) diff -r d4cb1ed6569f -r 84eaa97c1d65 lisp/simple.el --- a/lisp/simple.el Tue Oct 16 10:40:02 2007 +0000 +++ b/lisp/simple.el Tue Oct 16 15:18:39 2007 +0000 @@ -633,7 +633,9 @@ (newline) (save-excursion (goto-char pos) - (indent-according-to-mode) + ;; 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)) (delete-horizontal-space t)) (indent-according-to-mode)))