summaryrefslogtreecommitdiff
path: root/lisp/simple.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2007-10-16 15:18:39 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2007-10-16 15:18:39 +0000
commit4144e15e96e7d67ff0ebbed15ecc14154ba68da2 (patch)
tree29622a4427202964999b967199870a8633846d2e /lisp/simple.el
parente749f5762b6c8a7e531918a3c0e771609d1ba016 (diff)
downloademacs-4144e15e96e7d67ff0ebbed15ecc14154ba68da2.tar.gz
(reindent-then-newline-and-indent): Don't assume that
indent-according-to-mode preserves point.
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index b5ca79de027..3d5f6bfab10 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -633,7 +633,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)))