diff options
| author | Stefan Monnier | 2007-10-16 15:18:39 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-10-16 15:18:39 +0000 |
| commit | 4144e15e96e7d67ff0ebbed15ecc14154ba68da2 (patch) | |
| tree | 29622a4427202964999b967199870a8633846d2e | |
| parent | e749f5762b6c8a7e531918a3c0e771609d1ba016 (diff) | |
| download | emacs-4144e15e96e7d67ff0ebbed15ecc14154ba68da2.tar.gz emacs-4144e15e96e7d67ff0ebbed15ecc14154ba68da2.zip | |
(reindent-then-newline-and-indent): Don't assume that
indent-according-to-mode preserves point.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/simple.el | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 69919bdec0f..2e5bb8bd790 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-10-16 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * simple.el (reindent-then-newline-and-indent): Don't assume that | ||
| 4 | indent-according-to-mode preserves point. | ||
| 5 | |||
| 1 | 2007-10-16 Juanma Barranquero <lekktu@gmail.com> | 6 | 2007-10-16 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * bs.el (bs--make-header-match-string, bs-show-in-buffer) | 8 | * bs.el (bs--make-header-match-string, bs-show-in-buffer) |
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'." | |||
| 633 | (newline) | 633 | (newline) |
| 634 | (save-excursion | 634 | (save-excursion |
| 635 | (goto-char pos) | 635 | (goto-char pos) |
| 636 | (indent-according-to-mode) | 636 | ;; Usually indent-according-to-mode should "preserve" point, but it is |
| 637 | ;; not guaranteed; e.g. indent-to-left-margin doesn't. | ||
| 638 | (save-excursion (indent-according-to-mode)) | ||
| 637 | (delete-horizontal-space t)) | 639 | (delete-horizontal-space t)) |
| 638 | (indent-according-to-mode))) | 640 | (indent-according-to-mode))) |
| 639 | 641 | ||