1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-11 09:20:51 +00:00

(reindent-then-newline-and-indent): Don't assume that

indent-according-to-mode preserves point.
This commit is contained in:
Stefan Monnier 2007-10-16 15:18:39 +00:00
parent e749f5762b
commit 4144e15e96
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2007-10-16 Stefan Monnier <monnier@iro.umontreal.ca>
* simple.el (reindent-then-newline-and-indent): Don't assume that
indent-according-to-mode preserves point.
2007-10-16 Juanma Barranquero <lekktu@gmail.com>
* bs.el (bs--make-header-match-string, bs-show-in-buffer)

View File

@ -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)))