aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2023-02-13 20:11:28 +0200
committerEli Zaretskii2023-02-13 20:11:28 +0200
commit3d572ae0d507bba07f3cfc5ae2d2c7dd4937472c (patch)
treeddff8ab3f26f07bcb3694a7a5493871a9410ca85
parentdd8b720ee74e72359eb174aa5a27ab1770a349bd (diff)
downloademacs-3d572ae0d507bba07f3cfc5ae2d2c7dd4937472c.tar.gz
emacs-3d572ae0d507bba07f3cfc5ae2d2c7dd4937472c.zip
Rename with/without-narrowing to with/without-restriction
* doc/lispref/commands.texi: * doc/lispref/display.texi: * doc/lispref/positions.texi: * etc/NEWS: * lisp/subr.el: * src/buffer.c: * src/editfns.c: * src/keyboard.c: * src/xdisp.c: * test/src/buffer-tests.el: Rename with-narrowing and without-narrowing to with-restriction and without-restriction. Likewise with internal--with-narrowing and internal--without-narrowing. All callers and documentation changed.
-rw-r--r--doc/lispref/commands.texi2
-rw-r--r--doc/lispref/display.texi2
-rw-r--r--doc/lispref/positions.texi24
-rw-r--r--etc/NEWS4
-rw-r--r--lisp/subr.el24
-rw-r--r--src/buffer.c4
-rw-r--r--src/editfns.c18
-rw-r--r--src/keyboard.c4
-rw-r--r--src/xdisp.c2
-rw-r--r--test/src/buffer-tests.el32
10 files changed, 58 insertions, 58 deletions
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index 9723c279a45..6fd9377e1de 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -100,7 +100,7 @@ emacs, The GNU Emacs Manual}) runs these two hooks just as a keyboard
100command does. 100command does.
101 101
102 Note that, when the buffer text includes very long lines, these two 102 Note that, when the buffer text includes very long lines, these two
103hooks are called as if they were in a @code{with-narrowing} form 103hooks are called as if they were in a @code{with-restriction} form
104(@pxref{Narrowing}), with a 104(@pxref{Narrowing}), with a
105@code{long-line-optimizations-in-command-hooks} label and with the 105@code{long-line-optimizations-in-command-hooks} label and with the
106buffer narrowed to a portion around point. 106buffer narrowed to a portion around point.
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index f0ca7440c60..a8311f5c9a2 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -3502,7 +3502,7 @@ For efficiency, we recommend writing these functions so that they
3502usually assign faces to around 400 to 600 characters at each call. 3502usually assign faces to around 400 to 600 characters at each call.
3503 3503
3504Note that, when the buffer text includes very long lines, these 3504Note that, when the buffer text includes very long lines, these
3505functions are called as if they were in a @code{with-narrowing} form 3505functions are called as if they were in a @code{with-restriction} form
3506(@pxref{Narrowing}), with a 3506(@pxref{Narrowing}), with a
3507@code{long-line-optimizations-in-fontification-functions} label and 3507@code{long-line-optimizations-in-fontification-functions} label and
3508with the buffer narrowed to a portion around @var{pos}. 3508with the buffer narrowed to a portion around @var{pos}.
diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi
index bad83e1be2d..f6a0cf14476 100644
--- a/doc/lispref/positions.texi
+++ b/doc/lispref/positions.texi
@@ -1037,12 +1037,12 @@ positions.
1037In an interactive call, @var{start} and @var{end} are set to the bounds 1037In an interactive call, @var{start} and @var{end} are set to the bounds
1038of the current region (point and the mark, with the smallest first). 1038of the current region (point and the mark, with the smallest first).
1039 1039
1040However, when the narrowing has been set by @code{with-narrowing} with 1040However, when the narrowing has been set by @code{with-restriction} with
1041a label argument (see below), @code{narrow-to-region} can be used only 1041a label argument (see below), @code{narrow-to-region} can be used only
1042within the limits of that narrowing. If @var{start} or @var{end} are 1042within the limits of that narrowing. If @var{start} or @var{end} are
1043outside these limits, the corresponding limit set by 1043outside these limits, the corresponding limit set by
1044@code{with-narrowing} is used instead. To gain access to other 1044@code{with-restriction} is used instead. To gain access to other
1045portions of the buffer, use @code{without-narrowing} with the same 1045portions of the buffer, use @code{without-restriction} with the same
1046label. 1046label.
1047@end deffn 1047@end deffn
1048 1048
@@ -1068,10 +1068,10 @@ It is equivalent to the following expression:
1068(narrow-to-region 1 (1+ (buffer-size))) 1068(narrow-to-region 1 (1+ (buffer-size)))
1069@end example 1069@end example
1070 1070
1071However, when a narrowing has been set by @code{with-narrowing} with a 1071However, when a narrowing has been set by @code{with-restriction} with a
1072label argument (see below), the limits set by @code{with-narrowing} 1072label argument (see below), the limits set by @code{with-restriction}
1073are restored, instead of canceling the narrowing. To gain access to 1073are restored, instead of canceling the narrowing. To gain access to
1074other portions of the buffer, use @code{without-narrowing} with the 1074other portions of the buffer, use @code{without-restriction} with the
1075same label. 1075same label.
1076@end deffn 1076@end deffn
1077 1077
@@ -1089,7 +1089,7 @@ abnormal exit via @code{throw} or error (@pxref{Nonlocal Exits}).
1089Therefore, this construct is a clean way to narrow a buffer temporarily. 1089Therefore, this construct is a clean way to narrow a buffer temporarily.
1090 1090
1091This construct also saves and restores the narrowings that were set by 1091This construct also saves and restores the narrowings that were set by
1092@code{with-narrowing} with a label argument (see below). 1092@code{with-restriction} with a label argument (see below).
1093 1093
1094The value returned by @code{save-restriction} is that returned by the 1094The value returned by @code{save-restriction} is that returned by the
1095last form in @var{body}, or @code{nil} if no body forms were given. 1095last form in @var{body}, or @code{nil} if no body forms were given.
@@ -1141,7 +1141,7 @@ This is the contents of foo@point{}
1141@end example 1141@end example
1142@end defspec 1142@end defspec
1143 1143
1144@defspec with-narrowing start end [:label label] body 1144@defspec with-restriction start end [:label label] body
1145This special form saves the current bounds of the accessible portion 1145This special form saves the current bounds of the accessible portion
1146of the buffer, sets the accessible portion to start at @var{start} and 1146of the buffer, sets the accessible portion to start at @var{start} and
1147end at @var{end}, evaluates the @var{body} forms, and restores the 1147end at @var{end}, evaluates the @var{body} forms, and restores the
@@ -1164,8 +1164,8 @@ and @code{widen} can be used only within the @var{start} and @var{end}
1164limits. 1164limits.
1165 1165
1166@item 1166@item
1167To lift the restriction introduced by @code{with-narrowing} and gain 1167To lift the restriction introduced by @code{with-restriction} and gain
1168access to other portions of the buffer, use @code{without-narrowing} 1168access to other portions of the buffer, use @code{without-restriction}
1169with the same @var{label} argument. (Another way to gain access to 1169with the same @var{label} argument. (Another way to gain access to
1170other portions of the buffer is to use an indirect buffer 1170other portions of the buffer is to use an indirect buffer
1171(@pxref{Indirect Buffers}).) 1171(@pxref{Indirect Buffers}).)
@@ -1180,7 +1180,7 @@ user.
1180@end itemize 1180@end itemize
1181@end defspec 1181@end defspec
1182 1182
1183@defspec without-narrowing [:label label] body 1183@defspec without-restriction [:label label] body
1184This special form saves the current bounds of the accessible portion 1184This special form saves the current bounds of the accessible portion
1185of the buffer, widens the buffer, evaluates the @var{body} forms, and 1185of the buffer, widens the buffer, evaluates the @var{body} forms, and
1186restores the saved bounds. In that case it is equivalent to 1186restores the saved bounds. In that case it is equivalent to
@@ -1192,6 +1192,6 @@ restores the saved bounds. In that case it is equivalent to
1192@end example 1192@end example
1193 1193
1194When the optional @var{label} argument is present however, the 1194When the optional @var{label} argument is present however, the
1195narrowing set by @code{with-narrowing} with the same @var{label} 1195narrowing set by @code{with-restriction} with the same @var{label}
1196argument is lifted. 1196argument is lifted.
1197@end defspec 1197@end defspec
diff --git a/etc/NEWS b/etc/NEWS
index f2f059119fd..db77fdfbb42 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -620,7 +620,7 @@ In buffers in which these display optimizations are in effect, the
620hooks are executed on a narrowed portion of the buffer, whose size is 620hooks are executed on a narrowed portion of the buffer, whose size is
621controlled by the variables 'long-line-optimizations-region-size' and 621controlled by the variables 'long-line-optimizations-region-size' and
622'long-line-optimizations-bol-search-limit', as if they were in a 622'long-line-optimizations-bol-search-limit', as if they were in a
623'with-narrowing' form. This may, in particular, cause occasional 623'with-restriction form. This may, in particular, cause occasional
624mis-fontifications in these buffers. 624mis-fontifications in these buffers.
625 625
626The new function 'long-line-optimizations-p' returns non-nil when 626The new function 'long-line-optimizations-p' returns non-nil when
@@ -3820,7 +3820,7 @@ The default timeout value can be defined by the new variable
3820'set-transient-map-timeout'. 3820'set-transient-map-timeout'.
3821 3821
3822+++ 3822+++
3823** New forms 'with-narrowing' and 'without-narrowing'. 3823** New forms 'with-restriction' and 'without-restriction'.
3824These forms can be used as enhanced alternatives to the 3824These forms can be used as enhanced alternatives to the
3825'save-restriction' form combined with, respectively, 3825'save-restriction' form combined with, respectively,
3826'narrow-to-region' and 'widen'. They also accept an optional label 3826'narrow-to-region' and 'widen'. They also accept an optional label
diff --git a/lisp/subr.el b/lisp/subr.el
index 58a8e85b61d..c26cbb9a56c 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3941,7 +3941,7 @@ See also `locate-user-emacs-file'.")
3941 "Return non-nil if the current buffer is narrowed." 3941 "Return non-nil if the current buffer is narrowed."
3942 (/= (- (point-max) (point-min)) (buffer-size))) 3942 (/= (- (point-max) (point-min)) (buffer-size)))
3943 3943
3944(defmacro with-narrowing (start end &rest rest) 3944(defmacro with-restriction (start end &rest rest)
3945 "Execute BODY with restrictions set to START and END. 3945 "Execute BODY with restrictions set to START and END.
3946 3946
3947The current restrictions, if any, are restored upon return. 3947The current restrictions, if any, are restored upon return.
@@ -3949,39 +3949,39 @@ The current restrictions, if any, are restored upon return.
3949When the optional :label LABEL argument is present, in which 3949When the optional :label LABEL argument is present, in which
3950LABEL is a symbol, inside BODY, `narrow-to-region' and `widen' 3950LABEL is a symbol, inside BODY, `narrow-to-region' and `widen'
3951can be used only within the START and END limits. To gain access 3951can be used only within the START and END limits. To gain access
3952to other portions of the buffer, use `without-narrowing' with the 3952to other portions of the buffer, use `without-restriction' with the
3953same LABEL argument. 3953same LABEL argument.
3954 3954
3955\(fn START END [:label LABEL] BODY)" 3955\(fn START END [:label LABEL] BODY)"
3956 (if (eq (car rest) :label) 3956 (if (eq (car rest) :label)
3957 `(internal--with-narrowing ,start ,end (lambda () ,@(cddr rest)) 3957 `(internal--with-restriction ,start ,end (lambda () ,@(cddr rest))
3958 ,(cadr rest)) 3958 ,(cadr rest))
3959 `(internal--with-narrowing ,start ,end (lambda () ,@rest)))) 3959 `(internal--with-restriction ,start ,end (lambda () ,@rest))))
3960 3960
3961(defun internal--with-narrowing (start end body &optional label) 3961(defun internal--with-restriction (start end body &optional label)
3962 "Helper function for `with-narrowing', which see." 3962 "Helper function for `with-restriction', which see."
3963 (save-restriction 3963 (save-restriction
3964 (narrow-to-region start end) 3964 (narrow-to-region start end)
3965 (if label (internal--lock-narrowing label)) 3965 (if label (internal--lock-narrowing label))
3966 (funcall body))) 3966 (funcall body)))
3967 3967
3968(defmacro without-narrowing (&rest rest) 3968(defmacro without-restriction (&rest rest)
3969 "Execute BODY without restrictions. 3969 "Execute BODY without restrictions.
3970 3970
3971The current restrictions, if any, are restored upon return. 3971The current restrictions, if any, are restored upon return.
3972 3972
3973When the optional :label LABEL argument is present, the 3973When the optional :label LABEL argument is present, the
3974restrictions set by `with-narrowing' with the same LABEL argument 3974restrictions set by `with-restriction' with the same LABEL argument
3975are lifted. 3975are lifted.
3976 3976
3977\(fn [:label LABEL] BODY)" 3977\(fn [:label LABEL] BODY)"
3978 (if (eq (car rest) :label) 3978 (if (eq (car rest) :label)
3979 `(internal--without-narrowing (lambda () ,@(cddr rest)) 3979 `(internal--without-restriction (lambda () ,@(cddr rest))
3980 ,(cadr rest)) 3980 ,(cadr rest))
3981 `(internal--without-narrowing (lambda () ,@rest)))) 3981 `(internal--without-restriction (lambda () ,@rest))))
3982 3982
3983(defun internal--without-narrowing (body &optional label) 3983(defun internal--without-restriction (body &optional label)
3984 "Helper function for `without-narrowing', which see." 3984 "Helper function for `without-restriction', which see."
3985 (save-restriction 3985 (save-restriction
3986 (if label (internal--unlock-narrowing label)) 3986 (if label (internal--unlock-narrowing label))
3987 (widen) 3987 (widen)
diff --git a/src/buffer.c b/src/buffer.c
index 755061d0dee..df1f5206668 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5924,7 +5924,7 @@ This variable has effect only in buffers in which
5924`long-line-optimizations-p' is non-nil. For performance reasons, in 5924`long-line-optimizations-p' is non-nil. For performance reasons, in
5925such buffers, the `fontification-functions', `pre-command-hook' and 5925such buffers, the `fontification-functions', `pre-command-hook' and
5926`post-command-hook' hooks are executed on a narrowed buffer around 5926`post-command-hook' hooks are executed on a narrowed buffer around
5927point, as if they were called in a `with-narrowing' form with a label. 5927point, as if they were called in a `with-restriction' form with a label.
5928This variable specifies the size of the narrowed region around point. 5928This variable specifies the size of the narrowed region around point.
5929 5929
5930To disable that narrowing, set this variable to 0. 5930To disable that narrowing, set this variable to 0.
@@ -5942,7 +5942,7 @@ This variable has effect only in buffers in which
5942`long-line-optimizations-p' is non-nil. For performance reasons, in 5942`long-line-optimizations-p' is non-nil. For performance reasons, in
5943such buffers, the `fontification-functions', `pre-command-hook' and 5943such buffers, the `fontification-functions', `pre-command-hook' and
5944`post-command-hook' hooks are executed on a narrowed buffer around 5944`post-command-hook' hooks are executed on a narrowed buffer around
5945point, as if they were called in a `with-narrowing' form with a label. 5945point, as if they were called in a `with-restriction' form with a label.
5946The variable `long-line-optimizations-region-size' specifies the 5946The variable `long-line-optimizations-region-size' specifies the
5947size of the narrowed region around point. This variable, which should 5947size of the narrowed region around point. This variable, which should
5948be a small integer, specifies the number of characters by which that 5948be a small integer, specifies the number of characters by which that
diff --git a/src/editfns.c b/src/editfns.c
index f9879662168..ce133785e0b 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -2836,10 +2836,10 @@ DEFUN ("widen", Fwiden, Swiden, 0, 0, "",
2836 2836
2837This allows the buffer's full text to be seen and edited. 2837This allows the buffer's full text to be seen and edited.
2838 2838
2839However, when restrictions have been set by `with-narrowing' with a 2839However, when restrictions have been set by `with-restriction' with a
2840label, `widen' restores the narrowing limits set by `with-narrowing'. 2840label, `widen' restores the narrowing limits set by `with-restriction'.
2841To gain access to other portions of the buffer, use 2841To gain access to other portions of the buffer, use
2842`without-narrowing' with the same label. */) 2842`without-restriction' with the same label. */)
2843 (void) 2843 (void)
2844{ 2844{
2845 Fset (Qoutermost_narrowing, Qnil); 2845 Fset (Qoutermost_narrowing, Qnil);
@@ -2886,12 +2886,12 @@ When calling from Lisp, pass two arguments START and END:
2886positions (integers or markers) bounding the text that should 2886positions (integers or markers) bounding the text that should
2887remain visible. 2887remain visible.
2888 2888
2889However, when restrictions have been set by `with-narrowing' with a 2889However, when restrictions have been set by `with-restriction' with a
2890label, `narrow-to-region' can be used only within the limits of these 2890label, `narrow-to-region' can be used only within the limits of these
2891restrictions. If the START or END arguments are outside these limits, 2891restrictions. If the START or END arguments are outside these limits,
2892the corresponding limit set by `with-narrowing' is used instead of the 2892the corresponding limit set by `with-restriction' is used instead of the
2893argument. To gain access to other portions of the buffer, use 2893argument. To gain access to other portions of the buffer, use
2894`without-narrowing' with the same label. */) 2894`without-restriction' with the same label. */)
2895 (Lisp_Object start, Lisp_Object end) 2895 (Lisp_Object start, Lisp_Object end)
2896{ 2896{
2897 EMACS_INT s = fix_position (start), e = fix_position (end); 2897 EMACS_INT s = fix_position (start), e = fix_position (end);
@@ -2944,7 +2944,7 @@ DEFUN ("internal--lock-narrowing", Finternal__lock_narrowing,
2944 Sinternal__lock_narrowing, 1, 1, 0, 2944 Sinternal__lock_narrowing, 1, 1, 0,
2945 doc: /* Lock the current narrowing with LABEL. 2945 doc: /* Lock the current narrowing with LABEL.
2946 2946
2947This is an internal function used by `with-narrowing'. */) 2947This is an internal function used by `with-restriction'. */)
2948 (Lisp_Object tag) 2948 (Lisp_Object tag)
2949{ 2949{
2950 Lisp_Object buf = Fcurrent_buffer (); 2950 Lisp_Object buf = Fcurrent_buffer ();
@@ -2966,7 +2966,7 @@ DEFUN ("internal--unlock-narrowing", Finternal__unlock_narrowing,
2966 Sinternal__unlock_narrowing, 1, 1, 0, 2966 Sinternal__unlock_narrowing, 1, 1, 0,
2967 doc: /* Unlock a narrowing locked with LABEL. 2967 doc: /* Unlock a narrowing locked with LABEL.
2968 2968
2969This is an internal function used by `without-narrowing'. */) 2969This is an internal function used by `without-restriction'. */)
2970 (Lisp_Object tag) 2970 (Lisp_Object tag)
2971{ 2971{
2972 Lisp_Object buf = Fcurrent_buffer (); 2972 Lisp_Object buf = Fcurrent_buffer ();
@@ -3073,7 +3073,7 @@ DEFUN ("save-restriction", Fsave_restriction, Ssave_restriction, 0, UNEVALLED, 0
3073The buffer's restrictions make parts of the beginning and end invisible. 3073The buffer's restrictions make parts of the beginning and end invisible.
3074\(They are set up with `narrow-to-region' and eliminated with `widen'.) 3074\(They are set up with `narrow-to-region' and eliminated with `widen'.)
3075This special form, `save-restriction', saves the current buffer's 3075This special form, `save-restriction', saves the current buffer's
3076restrictions, including those that were set by `with-narrowing' with a 3076restrictions, including those that were set by `with-restriction' with a
3077label argument, when it is entered, and restores them when it is exited. 3077label argument, when it is entered, and restores them when it is exited.
3078So any `narrow-to-region' within BODY lasts only until the end of the form. 3078So any `narrow-to-region' within BODY lasts only until the end of the form.
3079The old restrictions settings are restored even in case of abnormal exit 3079The old restrictions settings are restored even in case of abnormal exit
diff --git a/src/keyboard.c b/src/keyboard.c
index 1d0b907bd8e..b2816f8270b 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -12732,7 +12732,7 @@ which the error occurred is unconditionally removed, since otherwise
12732the error might happen repeatedly and make Emacs nonfunctional. 12732the error might happen repeatedly and make Emacs nonfunctional.
12733 12733
12734Note that, when `long-line-optimizations-p' is non-nil in the buffer, 12734Note that, when `long-line-optimizations-p' is non-nil in the buffer,
12735these functions are called as if they were in a `with-narrowing' form, 12735these functions are called as if they were in a `with-restriction' form,
12736with a `long-line-optimizations-in-command-hooks' label and with the 12736with a `long-line-optimizations-in-command-hooks' label and with the
12737buffer narrowed to a portion around point whose size is specified by 12737buffer narrowed to a portion around point whose size is specified by
12738`long-line-optimizations-region-size'. 12738`long-line-optimizations-region-size'.
@@ -12752,7 +12752,7 @@ unavoidable, wrap your code in `(while-no-input (redisplay) CODE)' to
12752avoid making Emacs unresponsive while the user types. 12752avoid making Emacs unresponsive while the user types.
12753 12753
12754Note that, when `long-line-optimizations-p' is non-nil in the buffer, 12754Note that, when `long-line-optimizations-p' is non-nil in the buffer,
12755these functions are called as if they were in a `with-narrowing' form, 12755these functions are called as if they were in a `with-restriction' form,
12756with a `long-line-optimizations-in-command-hooks' label and with the 12756with a `long-line-optimizations-in-command-hooks' label and with the
12757buffer narrowed to a portion around point whose size is specified by 12757buffer narrowed to a portion around point whose size is specified by
12758`long-line-optimizations-region-size'. 12758`long-line-optimizations-region-size'.
diff --git a/src/xdisp.c b/src/xdisp.c
index 1450b869d20..5c5ecaa2bcb 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -36778,7 +36778,7 @@ fontify a region starting at POS in the current buffer, and give
36778fontified regions the property `fontified' with a non-nil value. 36778fontified regions the property `fontified' with a non-nil value.
36779 36779
36780Note that, when `long-line-optimizations-p' is non-nil in the buffer, 36780Note that, when `long-line-optimizations-p' is non-nil in the buffer,
36781these functions are called as if they were in a `with-narrowing' form, 36781these functions are called as if they were in a `with-restriction' form,
36782with a `long-line-optimizations-in-fontification-functions' label and 36782with a `long-line-optimizations-in-fontification-functions' label and
36783with the buffer narrowed to a portion around POS whose size is 36783with the buffer narrowed to a portion around POS whose size is
36784specified by `long-line-optimizations-region-size'. */); 36784specified by `long-line-optimizations-region-size'. */);
diff --git a/test/src/buffer-tests.el b/test/src/buffer-tests.el
index 0ae78c8d9d9..45914b2b6b0 100644
--- a/test/src/buffer-tests.el
+++ b/test/src/buffer-tests.el
@@ -8540,12 +8540,12 @@ Finally, kill the buffer and its temporary file."
8540 ))) 8540 )))
8541 8541
8542(ert-deftest test-labeled-narrowing () 8542(ert-deftest test-labeled-narrowing ()
8543 "Test `with-narrowing' and `without-narrowing'." 8543 "Test `with-restriction' and `without-restriction'."
8544 (with-current-buffer (generate-new-buffer " foo" t) 8544 (with-current-buffer (generate-new-buffer " foo" t)
8545 (insert (make-string 5000 ?a)) 8545 (insert (make-string 5000 ?a))
8546 (should (= (point-min) 1)) 8546 (should (= (point-min) 1))
8547 (should (= (point-max) 5001)) 8547 (should (= (point-max) 5001))
8548 (with-narrowing 8548 (with-restriction
8549 100 500 :label 'foo 8549 100 500 :label 'foo
8550 (should (= (point-min) 100)) 8550 (should (= (point-min) 100))
8551 (should (= (point-max) 500)) 8551 (should (= (point-max) 500))
@@ -8564,11 +8564,11 @@ Finally, kill the buffer and its temporary file."
8564 (narrow-to-region 400 1000) 8564 (narrow-to-region 400 1000)
8565 (should (= (point-min) 400)) 8565 (should (= (point-min) 400))
8566 (should (= (point-max) 500)) 8566 (should (= (point-max) 500))
8567 (without-narrowing 8567 (without-restriction
8568 :label 'bar 8568 :label 'bar
8569 (should (= (point-min) 100)) 8569 (should (= (point-min) 100))
8570 (should (= (point-max) 500))) 8570 (should (= (point-max) 500)))
8571 (without-narrowing 8571 (without-restriction
8572 :label 'foo 8572 :label 'foo
8573 (should (= (point-min) 1)) 8573 (should (= (point-min) 1))
8574 (should (= (point-max) 5001))) 8574 (should (= (point-max) 5001)))
@@ -8577,18 +8577,18 @@ Finally, kill the buffer and its temporary file."
8577 (widen) 8577 (widen)
8578 (should (= (point-min) 100)) 8578 (should (= (point-min) 100))
8579 (should (= (point-max) 500)) 8579 (should (= (point-max) 500))
8580 (with-narrowing 8580 (with-restriction
8581 50 250 :label 'bar 8581 50 250 :label 'bar
8582 (should (= (point-min) 100)) 8582 (should (= (point-min) 100))
8583 (should (= (point-max) 250)) 8583 (should (= (point-max) 250))
8584 (widen) 8584 (widen)
8585 (should (= (point-min) 100)) 8585 (should (= (point-min) 100))
8586 (should (= (point-max) 250)) 8586 (should (= (point-max) 250))
8587 (without-narrowing 8587 (without-restriction
8588 :label 'bar 8588 :label 'bar
8589 (should (= (point-min) 100)) 8589 (should (= (point-min) 100))
8590 (should (= (point-max) 500)) 8590 (should (= (point-max) 500))
8591 (without-narrowing 8591 (without-restriction
8592 :label 'foo 8592 :label 'foo
8593 (should (= (point-min) 1)) 8593 (should (= (point-min) 1))
8594 (should (= (point-max) 5001))) 8594 (should (= (point-max) 5001)))
@@ -8598,39 +8598,39 @@ Finally, kill the buffer and its temporary file."
8598 (should (= (point-max) 250))) 8598 (should (= (point-max) 250)))
8599 (should (= (point-min) 100)) 8599 (should (= (point-min) 100))
8600 (should (= (point-max) 500)) 8600 (should (= (point-max) 500))
8601 (with-narrowing 8601 (with-restriction
8602 50 250 :label 'bar 8602 50 250 :label 'bar
8603 (should (= (point-min) 100)) 8603 (should (= (point-min) 100))
8604 (should (= (point-max) 250)) 8604 (should (= (point-max) 250))
8605 (with-narrowing 8605 (with-restriction
8606 150 500 :label 'baz 8606 150 500 :label 'baz
8607 (should (= (point-min) 150)) 8607 (should (= (point-min) 150))
8608 (should (= (point-max) 250)) 8608 (should (= (point-max) 250))
8609 (without-narrowing 8609 (without-restriction
8610 :label 'bar 8610 :label 'bar
8611 (should (= (point-min) 150)) 8611 (should (= (point-min) 150))
8612 (should (= (point-max) 250))) 8612 (should (= (point-max) 250)))
8613 (without-narrowing 8613 (without-restriction
8614 :label 'foo 8614 :label 'foo
8615 (should (= (point-min) 150)) 8615 (should (= (point-min) 150))
8616 (should (= (point-max) 250))) 8616 (should (= (point-max) 250)))
8617 (without-narrowing 8617 (without-restriction
8618 :label 'baz 8618 :label 'baz
8619 (should (= (point-min) 100)) 8619 (should (= (point-min) 100))
8620 (should (= (point-max) 250)) 8620 (should (= (point-max) 250))
8621 (without-narrowing 8621 (without-restriction
8622 :label 'foo 8622 :label 'foo
8623 (should (= (point-min) 100)) 8623 (should (= (point-min) 100))
8624 (should (= (point-max) 250))) 8624 (should (= (point-max) 250)))
8625 (without-narrowing 8625 (without-restriction
8626 :label 'bar 8626 :label 'bar
8627 (should (= (point-min) 100)) 8627 (should (= (point-min) 100))
8628 (should (= (point-max) 500)) 8628 (should (= (point-max) 500))
8629 (without-narrowing 8629 (without-restriction
8630 :label 'foobar 8630 :label 'foobar
8631 (should (= (point-min) 100)) 8631 (should (= (point-min) 100))
8632 (should (= (point-max) 500))) 8632 (should (= (point-max) 500)))
8633 (without-narrowing 8633 (without-restriction
8634 :label 'foo 8634 :label 'foo
8635 (should (= (point-min) 1)) 8635 (should (= (point-min) 1))
8636 (should (= (point-max) 5001))) 8636 (should (= (point-max) 5001)))