]> git.eshelyaron.com Git - emacs.git/commit
(Freplace_region_contents): Treat point as insert-before marker
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 16 Apr 2025 14:15:16 +0000 (10:15 -0400)
committerEshel Yaron <me@eshelyaron.com>
Thu, 17 Apr 2025 07:08:28 +0000 (09:08 +0200)
commiteafa70ec2a6551ed62bdc7bf4d48d37be79f231a
treec161e82e7f30f143b85e728b7a897781ab58a864
parent9963043a6f56dd5f1e30d6edf91462e1d82f97d4
(Freplace_region_contents): Treat point as insert-before marker

Experience suggests that it's more often useful to keep point
at the end of the replacement than it is to keep point at the
beginning of the replacement.
This also aligns the behavior of `replace-region-contents` with
that of `insert`.

* src/insdel.c (replace_range): Treat PT like an insert-before marker.
* src/editfns.c (Freplace_region_contents): Adjust docstring accordingly.

(cherry picked from commit 4532fbefece210061d01ab9523f3054aadb1c45a)
src/editfns.c
src/insdel.c