aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2023-02-13 20:11:28 +0200
committerEli Zaretskii2023-02-13 20:11:28 +0200
commit3d572ae0d507bba07f3cfc5ae2d2c7dd4937472c (patch)
treeddff8ab3f26f07bcb3694a7a5493871a9410ca85 /src
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.
Diffstat (limited to 'src')
-rw-r--r--src/buffer.c4
-rw-r--r--src/editfns.c18
-rw-r--r--src/keyboard.c4
-rw-r--r--src/xdisp.c2
4 files changed, 14 insertions, 14 deletions
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'. */);