# HG changeset patch # User Stefan Monnier # Date 1201838691 0 # Node ID 6f13ddb7d9e9067816dad039b0eeedbe9605a753 # Parent c592638ac9555a62940fac240ec2631ee4220317 (reindent-then-newline-and-indent): Be careful about the unusual case where indent-according-to-mode moves point. diff -r c592638ac955 -r 6f13ddb7d9e9 lisp/ChangeLog --- a/lisp/ChangeLog Fri Feb 01 03:12:44 2008 +0000 +++ b/lisp/ChangeLog Fri Feb 01 04:04:51 2008 +0000 @@ -1,3 +1,8 @@ +2008-02-01 Stefan Monnier + + * simple.el (reindent-then-newline-and-indent): Be careful about the + unusual case where indent-according-to-mode moves point. + 2008-02-01 Dan Nicolaescu * progmodes/verilog-mode.el (verilog-sk-prompt-msb) @@ -13,7 +18,7 @@ 2008-01-31 Martin Rudalics * mail/rmail.el (rmail-highlight): Fix specification. - Reported by: pod . + Reported by: pod . 2008-01-31 Jason Rumney @@ -34,8 +39,8 @@ * progmodes/cc-langs.el (c-specifier-key): Exclude "template" from this regexp; part of same fix as next change to cc-engine.el. - * progmodes/cc-engine.el (c-guess-basic-syntax, CASE 5A.5): Anchor - the "{" of a template function correctly on "template", not the + * progmodes/cc-engine.el (c-guess-basic-syntax, CASE 5A.5): + Anchor the "{" of a template function correctly on "template", not the following "<". * progmodes/cc-defs.el (c-version): Increase to 5.31.5. diff -r c592638ac955 -r 6f13ddb7d9e9 lisp/simple.el --- a/lisp/simple.el Fri Feb 01 03:12:44 2008 +0000 +++ b/lisp/simple.el Fri Feb 01 04:04:51 2008 +0000 @@ -632,7 +632,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)))