diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2007-10-16 15:18:39 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2007-10-16 15:18:39 +0000 |
commit | 4144e15e96e7d67ff0ebbed15ecc14154ba68da2 (patch) | |
tree | 29622a4427202964999b967199870a8633846d2e /lisp/simple.el | |
parent | e749f5762b6c8a7e531918a3c0e771609d1ba016 (diff) | |
download | emacs-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.el | 4 |
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))) |