diff options
| author | Eli Zaretskii | 2023-02-13 20:11:28 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2023-02-13 20:11:28 +0200 |
| commit | 3d572ae0d507bba07f3cfc5ae2d2c7dd4937472c (patch) | |
| tree | ddff8ab3f26f07bcb3694a7a5493871a9410ca85 /src | |
| parent | dd8b720ee74e72359eb174aa5a27ab1770a349bd (diff) | |
| download | emacs-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.c | 4 | ||||
| -rw-r--r-- | src/editfns.c | 18 | ||||
| -rw-r--r-- | src/keyboard.c | 4 | ||||
| -rw-r--r-- | src/xdisp.c | 2 |
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 |
| 5925 | such buffers, the `fontification-functions', `pre-command-hook' and | 5925 | such 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 |
| 5927 | point, as if they were called in a `with-narrowing' form with a label. | 5927 | point, as if they were called in a `with-restriction' form with a label. |
| 5928 | This variable specifies the size of the narrowed region around point. | 5928 | This variable specifies the size of the narrowed region around point. |
| 5929 | 5929 | ||
| 5930 | To disable that narrowing, set this variable to 0. | 5930 | To 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 |
| 5943 | such buffers, the `fontification-functions', `pre-command-hook' and | 5943 | such 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 |
| 5945 | point, as if they were called in a `with-narrowing' form with a label. | 5945 | point, as if they were called in a `with-restriction' form with a label. |
| 5946 | The variable `long-line-optimizations-region-size' specifies the | 5946 | The variable `long-line-optimizations-region-size' specifies the |
| 5947 | size of the narrowed region around point. This variable, which should | 5947 | size of the narrowed region around point. This variable, which should |
| 5948 | be a small integer, specifies the number of characters by which that | 5948 | be 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 | ||
| 2837 | This allows the buffer's full text to be seen and edited. | 2837 | This allows the buffer's full text to be seen and edited. |
| 2838 | 2838 | ||
| 2839 | However, when restrictions have been set by `with-narrowing' with a | 2839 | However, when restrictions have been set by `with-restriction' with a |
| 2840 | label, `widen' restores the narrowing limits set by `with-narrowing'. | 2840 | label, `widen' restores the narrowing limits set by `with-restriction'. |
| 2841 | To gain access to other portions of the buffer, use | 2841 | To 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: | |||
| 2886 | positions (integers or markers) bounding the text that should | 2886 | positions (integers or markers) bounding the text that should |
| 2887 | remain visible. | 2887 | remain visible. |
| 2888 | 2888 | ||
| 2889 | However, when restrictions have been set by `with-narrowing' with a | 2889 | However, when restrictions have been set by `with-restriction' with a |
| 2890 | label, `narrow-to-region' can be used only within the limits of these | 2890 | label, `narrow-to-region' can be used only within the limits of these |
| 2891 | restrictions. If the START or END arguments are outside these limits, | 2891 | restrictions. If the START or END arguments are outside these limits, |
| 2892 | the corresponding limit set by `with-narrowing' is used instead of the | 2892 | the corresponding limit set by `with-restriction' is used instead of the |
| 2893 | argument. To gain access to other portions of the buffer, use | 2893 | argument. 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 | ||
| 2947 | This is an internal function used by `with-narrowing'. */) | 2947 | This 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 | ||
| 2969 | This is an internal function used by `without-narrowing'. */) | 2969 | This 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 | |||
| 3073 | The buffer's restrictions make parts of the beginning and end invisible. | 3073 | The 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'.) |
| 3075 | This special form, `save-restriction', saves the current buffer's | 3075 | This special form, `save-restriction', saves the current buffer's |
| 3076 | restrictions, including those that were set by `with-narrowing' with a | 3076 | restrictions, including those that were set by `with-restriction' with a |
| 3077 | label argument, when it is entered, and restores them when it is exited. | 3077 | label argument, when it is entered, and restores them when it is exited. |
| 3078 | So any `narrow-to-region' within BODY lasts only until the end of the form. | 3078 | So any `narrow-to-region' within BODY lasts only until the end of the form. |
| 3079 | The old restrictions settings are restored even in case of abnormal exit | 3079 | The 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 | |||
| 12732 | the error might happen repeatedly and make Emacs nonfunctional. | 12732 | the error might happen repeatedly and make Emacs nonfunctional. |
| 12733 | 12733 | ||
| 12734 | Note that, when `long-line-optimizations-p' is non-nil in the buffer, | 12734 | Note that, when `long-line-optimizations-p' is non-nil in the buffer, |
| 12735 | these functions are called as if they were in a `with-narrowing' form, | 12735 | these functions are called as if they were in a `with-restriction' form, |
| 12736 | with a `long-line-optimizations-in-command-hooks' label and with the | 12736 | with a `long-line-optimizations-in-command-hooks' label and with the |
| 12737 | buffer narrowed to a portion around point whose size is specified by | 12737 | buffer 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 | |||
| 12752 | avoid making Emacs unresponsive while the user types. | 12752 | avoid making Emacs unresponsive while the user types. |
| 12753 | 12753 | ||
| 12754 | Note that, when `long-line-optimizations-p' is non-nil in the buffer, | 12754 | Note that, when `long-line-optimizations-p' is non-nil in the buffer, |
| 12755 | these functions are called as if they were in a `with-narrowing' form, | 12755 | these functions are called as if they were in a `with-restriction' form, |
| 12756 | with a `long-line-optimizations-in-command-hooks' label and with the | 12756 | with a `long-line-optimizations-in-command-hooks' label and with the |
| 12757 | buffer narrowed to a portion around point whose size is specified by | 12757 | buffer 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 | |||
| 36778 | fontified regions the property `fontified' with a non-nil value. | 36778 | fontified regions the property `fontified' with a non-nil value. |
| 36779 | 36779 | ||
| 36780 | Note that, when `long-line-optimizations-p' is non-nil in the buffer, | 36780 | Note that, when `long-line-optimizations-p' is non-nil in the buffer, |
| 36781 | these functions are called as if they were in a `with-narrowing' form, | 36781 | these functions are called as if they were in a `with-restriction' form, |
| 36782 | with a `long-line-optimizations-in-fontification-functions' label and | 36782 | with a `long-line-optimizations-in-fontification-functions' label and |
| 36783 | with the buffer narrowed to a portion around POS whose size is | 36783 | with the buffer narrowed to a portion around POS whose size is |
| 36784 | specified by `long-line-optimizations-region-size'. */); | 36784 | specified by `long-line-optimizations-region-size'. */); |