diff options
author | Eli Zaretskii <eliz@gnu.org> | 2022-07-30 16:11:43 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2022-07-30 16:11:43 +0300 |
commit | 76f49943c3baf1fa342889e08c5b6b86c2736437 (patch) | |
tree | ee6f65a45e64a091e64dc38a4c6ed133844a5e58 /src/editfns.c | |
parent | d92fb1592a02f7e34fb82069fc8d61d85dac8a48 (diff) | |
download | emacs-76f49943c3baf1fa342889e08c5b6b86c2736437.tar.gz |
Make sure to preserve point across locked narrowing
* src/editfns.c (Fnarrow_to_region): Save the position of point
when locking the restriction, since this function can move point.
Diffstat (limited to 'src/editfns.c')
-rw-r--r-- | src/editfns.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/editfns.c b/src/editfns.c index d15d4dc68b9..79af27d24da 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -2721,6 +2721,7 @@ the current body form. */) if (BEGV != s || ZV != e) current_buffer->clip_changed = 1; + record_unwind_protect (restore_point_unwind, Fpoint_marker ()); record_unwind_protect (unwind_locked_begv, Fpoint_min ()); record_unwind_protect (unwind_locked_zv, Fpoint_max ()); |