diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-02-01 04:04:51 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-02-01 04:04:51 +0000 |
commit | ba28b64c74e117d79fe289bcf9008891810c65dc (patch) | |
tree | cdb34fd9b8630befbf07cfa86e9fcf8ba78e7afc | |
parent | b40e6922b2cf8f10c1541fb6d3354eb84ec0b394 (diff) | |
download | emacs-ba28b64c74e117d79fe289bcf9008891810c65dc.tar.gz |
(reindent-then-newline-and-indent): Be careful about the
unusual case where indent-according-to-mode moves point.
-rw-r--r-- | lisp/ChangeLog | 11 | ||||
-rw-r--r-- | lisp/simple.el | 4 |
2 files changed, 11 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ea1bba29673..1391a4b6fbb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-02-01 Stefan Monnier <monnier@iro.umontreal.ca> + + * 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 <dann@ics.uci.edu> * progmodes/verilog-mode.el (verilog-sk-prompt-msb) @@ -13,7 +18,7 @@ 2008-01-31 Martin Rudalics <rudalics@gmx.at> * mail/rmail.el (rmail-highlight): Fix specification. - Reported by: pod <pod@herald.ox.ac.uk>. + Reported by: pod <pod@herald.ox.ac.uk>. 2008-01-31 Jason Rumney <jasonr@gnu.org> @@ -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 --git a/lisp/simple.el b/lisp/simple.el index 253e03c23b4..3ca479f45c4 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -632,7 +632,9 @@ column specified by the function `current-left-margin'." (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))) |