aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 6ddee0840c2..85f7739df07 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -2684,7 +2684,7 @@ DEFUN ("delete-and-extract-region", Fdelete_and_extract_region,
2684 labeled restriction was entered (which may be a narrowing that was 2684 labeled restriction was entered (which may be a narrowing that was
2685 set by the user and is visible on display). This alist is used 2685 set by the user and is visible on display). This alist is used
2686 internally by narrow-to-region, internal--labeled-narrow-to-region, 2686 internally by narrow-to-region, internal--labeled-narrow-to-region,
2687 widen, internal--unlabel-restriction and save-restriction. For 2687 widen, internal--labeled-widen and save-restriction. For
2688 efficiency reasons, an alist is used instead of a buffer-local 2688 efficiency reasons, an alist is used instead of a buffer-local
2689 variable: otherwise reset_outermost_restrictions, which is called 2689 variable: otherwise reset_outermost_restrictions, which is called
2690 during each redisplay cycle, would have to loop through all live 2690 during each redisplay cycle, would have to loop through all live
@@ -2860,8 +2860,7 @@ labeled_restrictions_restore (Lisp_Object buf_and_restrictions)
2860static void 2860static void
2861unwind_labeled_narrow_to_region (Lisp_Object label) 2861unwind_labeled_narrow_to_region (Lisp_Object label)
2862{ 2862{
2863 Finternal__unlabel_restriction (label); 2863 Finternal__labeled_widen (label);
2864 Fwiden ();
2865} 2864}
2866 2865
2867/* Narrow current_buffer to BEGV-ZV with a restriction labeled with 2866/* Narrow current_buffer to BEGV-ZV with a restriction labeled with
@@ -2984,7 +2983,7 @@ argument. To gain access to other portions of the buffer, use
2984 2983
2985DEFUN ("internal--labeled-narrow-to-region", Finternal__labeled_narrow_to_region, 2984DEFUN ("internal--labeled-narrow-to-region", Finternal__labeled_narrow_to_region,
2986 Sinternal__labeled_narrow_to_region, 3, 3, 0, 2985 Sinternal__labeled_narrow_to_region, 3, 3, 0,
2987 doc: /* Restrict editing in this buffer to START-END, and label the restriction with LABEL. 2986 doc: /* Restrict this buffer to START-END, and label the restriction with LABEL.
2988 2987
2989This is an internal function used by `with-restriction'. */) 2988This is an internal function used by `with-restriction'. */)
2990 (Lisp_Object start, Lisp_Object end, Lisp_Object label) 2989 (Lisp_Object start, Lisp_Object end, Lisp_Object label)
@@ -3002,9 +3001,9 @@ This is an internal function used by `with-restriction'. */)
3002 return Qnil; 3001 return Qnil;
3003} 3002}
3004 3003
3005DEFUN ("internal--unlabel-restriction", Finternal__unlabel_restriction, 3004DEFUN ("internal--labeled-widen", Finternal__labeled_widen,
3006 Sinternal__unlabel_restriction, 1, 1, 0, 3005 Sinternal__labeled_widen, 1, 1, 0,
3007 doc: /* If the current restriction is labeled with LABEL, remove its label. 3006 doc: /* Remove the current restriction if it is labeled with LABEL, and widen.
3008 3007
3009This is an internal function used by `without-restriction'. */) 3008This is an internal function used by `without-restriction'. */)
3010 (Lisp_Object label) 3009 (Lisp_Object label)
@@ -3012,6 +3011,7 @@ This is an internal function used by `without-restriction'. */)
3012 Lisp_Object buf = Fcurrent_buffer (); 3011 Lisp_Object buf = Fcurrent_buffer ();
3013 if (EQ (labeled_restrictions_peek_label (buf), label)) 3012 if (EQ (labeled_restrictions_peek_label (buf), label))
3014 labeled_restrictions_pop (buf); 3013 labeled_restrictions_pop (buf);
3014 Fwiden ();
3015 return Qnil; 3015 return Qnil;
3016} 3016}
3017 3017
@@ -4951,7 +4951,7 @@ it to be non-nil. */);
4951 defsubr (&Swiden); 4951 defsubr (&Swiden);
4952 defsubr (&Snarrow_to_region); 4952 defsubr (&Snarrow_to_region);
4953 defsubr (&Sinternal__labeled_narrow_to_region); 4953 defsubr (&Sinternal__labeled_narrow_to_region);
4954 defsubr (&Sinternal__unlabel_restriction); 4954 defsubr (&Sinternal__labeled_widen);
4955 defsubr (&Ssave_restriction); 4955 defsubr (&Ssave_restriction);
4956 defsubr (&Stranspose_regions); 4956 defsubr (&Stranspose_regions);
4957} 4957}