summaryrefslogtreecommitdiff
path: root/lisp/simple.el
diff options
context:
space:
mode:
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 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)))