Fix blunder in labeled_narrow_to_region

* src/editfns.c (labeled_narrow_to_region): Record point before,
instead of after, calling narrow-to-region; otherwise point may
already have been changed.  Fixes bug#66764.
This commit is contained in:
Gregory Heytings 2024-01-11 23:38:22 +00:00
parent 78ddb32fad
commit 5bb5590dec

View file

@ -2870,9 +2870,9 @@ void
labeled_narrow_to_region (Lisp_Object begv, Lisp_Object zv,
Lisp_Object label)
{
Finternal__labeled_narrow_to_region (begv, zv, label);
record_unwind_protect (restore_point_unwind, Fpoint_marker ());
record_unwind_protect (unwind_labeled_narrow_to_region, label);
Finternal__labeled_narrow_to_region (begv, zv, label);
}
DEFUN ("widen", Fwiden, Swiden, 0, 0, "",