@@ -2691,7 +2691,7 @@ DEFUN ("delete-and-extract-region", Fdelete_and_extract_region,
26912691 labeled restriction was entered (which may be a narrowing that was
26922692 set by the user and is visible on display). This alist is used
26932693 internally by narrow-to-region, internal--labeled-narrow-to-region,
2694- widen, internal--unlabel-restriction and save-restriction. For
2694+ widen, internal--labeled-widen and save-restriction. For
26952695 efficiency reasons, an alist is used instead of a buffer-local
26962696 variable: otherwise reset_outermost_restrictions, which is called
26972697 during each redisplay cycle, would have to loop through all live
@@ -2867,8 +2867,7 @@ labeled_restrictions_restore (Lisp_Object buf_and_restrictions)
28672867static void
28682868unwind_labeled_narrow_to_region (Lisp_Object label )
28692869{
2870- Finternal__unlabel_restriction (label );
2871- Fwiden ();
2870+ Finternal__labeled_widen (label );
28722871}
28732872
28742873/* Narrow current_buffer to BEGV-ZV with a restriction labeled with
@@ -2991,7 +2990,7 @@ argument. To gain access to other portions of the buffer, use
29912990
29922991DEFUN ("internal--labeled-narrow-to-region" , Finternal__labeled_narrow_to_region ,
29932992 Sinternal__labeled_narrow_to_region , 3 , 3 , 0 ,
2994- doc : /* Restrict editing in this buffer to START-END, and label the restriction with LABEL.
2993+ doc : /* Restrict this buffer to START-END, and label the restriction with LABEL.
29952994
29962995This is an internal function used by `with-restriction'. */ )
29972996 (Lisp_Object start , Lisp_Object end , Lisp_Object label )
@@ -3009,16 +3008,17 @@ This is an internal function used by `with-restriction'. */)
30093008 return Qnil ;
30103009}
30113010
3012- DEFUN ("internal--unlabel-restriction " , Finternal__unlabel_restriction ,
3013- Sinternal__unlabel_restriction , 1 , 1 , 0 ,
3014- doc : /* If the current restriction is labeled with LABEL, remove its label .
3011+ DEFUN ("internal--labeled-widen " , Finternal__labeled_widen ,
3012+ Sinternal__labeled_widen , 1 , 1 , 0 ,
3013+ doc : /* Remove the current restriction if it is labeled with LABEL, and widen .
30153014
30163015This is an internal function used by `without-restriction'. */ )
30173016 (Lisp_Object label )
30183017{
30193018 Lisp_Object buf = Fcurrent_buffer ();
30203019 if (EQ (labeled_restrictions_peek_label (buf ), label ))
30213020 labeled_restrictions_pop (buf );
3021+ Fwiden ();
30223022 return Qnil ;
30233023}
30243024
@@ -4958,7 +4958,7 @@ it to be non-nil. */);
49584958 defsubr (& Swiden );
49594959 defsubr (& Snarrow_to_region );
49604960 defsubr (& Sinternal__labeled_narrow_to_region );
4961- defsubr (& Sinternal__unlabel_restriction );
4961+ defsubr (& Sinternal__labeled_widen );
49624962 defsubr (& Ssave_restriction );
49634963 defsubr (& Stranspose_regions );
49644964}
0 commit comments