diff options
| author | Gregory Heytings | 2023-02-09 01:09:10 +0000 |
|---|---|---|
| committer | Gregory Heytings | 2023-02-09 02:44:54 +0100 |
| commit | 79ce185ad1373845781646812638d4872b8aee69 (patch) | |
| tree | 71a6f2e6cba5906f97625748e8fe348e2ac41eda /src/buffer.c | |
| parent | a6cd4553d48aff1d241d54d62dc1b39b3ff541e0 (diff) | |
| download | emacs-79ce185ad1373845781646812638d4872b8aee69.tar.gz emacs-79ce185ad1373845781646812638d4872b8aee69.zip | |
Update the documentation about labeled (locked) narrowing
* src/xdisp.c (syms_of_xdisp) <fontification-functions>: Update
docstring.
* src/keyboard.c (syms_of_keyboard) <pre-command-hook>:
(syms_of_keyboard) <post-command-hook>: Update docstring.
* src/editfns.c:
(narrowing_locks): Explain why an alist is used instead of a
buffer-local variable.
(reset_outermost_narrowings): Point to recipes that demonstrate
why it is necessary to restore the user narrowing bounds when
redisplay starts.
(Fwiden): Update docstring.
(Fnarrow_to_region): Update docstring.
(Finternal__lock_narrowing): Update docstring.
(Finternal__unlock_narrowing): Update docstring.
(Fsave_restriction): Update docstring.
* src/buffer.c (syms_of_buffer)
<long-line-optimizations-region-size>: Update docstring.
(syms_of_buffer) <long-line-optimizations-bol-search-limit>:
Update docstring.
* lisp/subr.el (with-narrowing): Update docstring.
(without-narrowing): Update docstring.
* etc/NEWS: Mention the 'long-line-optimizations-region-size' and
'long-line-optimizations-bol-search-limit' options.
Announce the 'with-narrowing' and 'without-narrowing' forms.
* doc/lispref/positions.texi (Narrowing): Update the documentation
of 'narrow-to-region', 'widen' and 'save-restriction'. Document
the 'with-narrowing' and 'without-narrowing' special forms.
* doc/lispref/display.texi (Auto Faces): Update the documentation.
* doc/lispref/commands.texi (Command Overview): Document the fact
that the buffer is narrowed around 'pre-command-hook' and
'post-command-hook' when the buffer text includes very long lines.
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/src/buffer.c b/src/buffer.c index 07723a7c6ff..755061d0dee 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -5918,18 +5918,18 @@ There is no reason to change that value except for debugging purposes. */); | |||
| 5918 | 5918 | ||
| 5919 | DEFVAR_INT ("long-line-optimizations-region-size", | 5919 | DEFVAR_INT ("long-line-optimizations-region-size", |
| 5920 | long_line_optimizations_region_size, | 5920 | long_line_optimizations_region_size, |
| 5921 | doc: /* Region size for locked narrowing in buffers with long lines. | 5921 | doc: /* Region size for narrowing in buffers with long lines. |
| 5922 | 5922 | ||
| 5923 | This variable has effect only in buffers which contain one or more | 5923 | This variable has effect only in buffers in which |
| 5924 | lines whose length is above `long-line-threshold', which see. For | 5924 | `long-line-optimizations-p' is non-nil. For performance reasons, in |
| 5925 | performance reasons, in such buffers, low-level hooks such as | 5925 | such buffers, the `fontification-functions', `pre-command-hook' and |
| 5926 | `fontification-functions' or `post-command-hook' are executed on a | 5926 | `post-command-hook' hooks are executed on a narrowed buffer around |
| 5927 | narrowed buffer, with a narrowing locked with `narrowing-lock'. This | 5927 | point, as if they were called in a `with-narrowing' form with a label. |
| 5928 | 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. |
| 5931 | 5931 | ||
| 5932 | See also `long-line-locked-narrowing-bol-search-limit'. | 5932 | See also `long-line-optimizations-bol-search-limit'. |
| 5933 | 5933 | ||
| 5934 | There is no reason to change that value except for debugging purposes. */); | 5934 | There is no reason to change that value except for debugging purposes. */); |
| 5935 | long_line_optimizations_region_size = 500000; | 5935 | long_line_optimizations_region_size = 500000; |
| @@ -5938,15 +5938,16 @@ There is no reason to change that value except for debugging purposes. */); | |||
| 5938 | long_line_optimizations_bol_search_limit, | 5938 | long_line_optimizations_bol_search_limit, |
| 5939 | doc: /* Limit for beginning of line search in buffers with long lines. | 5939 | doc: /* Limit for beginning of line search in buffers with long lines. |
| 5940 | 5940 | ||
| 5941 | This variable has effect only in buffers which contain one or more | 5941 | This variable has effect only in buffers in which |
| 5942 | lines whose length is above `long-line-threshold', which see. For | 5942 | `long-line-optimizations-p' is non-nil. For performance reasons, in |
| 5943 | performance reasons, in such buffers, low-level hooks such as | 5943 | such buffers, the `fontification-functions', `pre-command-hook' and |
| 5944 | `fontification-functions' or `post-command-hook' are executed on a | 5944 | `post-command-hook' hooks are executed on a narrowed buffer around |
| 5945 | narrowed buffer, with a narrowing locked with `narrowing-lock'. The | 5945 | point, as if they were called in a `with-narrowing' form with a label. |
| 5946 | variable `long-line-locked-narrowing-region-size' specifies the size | 5946 | The variable `long-line-optimizations-region-size' specifies the |
| 5947 | of the narrowed region around point. This variable, which should be a | 5947 | size of the narrowed region around point. This variable, which should |
| 5948 | small integer, specifies the number of characters by which that region | 5948 | be a small integer, specifies the number of characters by which that |
| 5949 | can be extended backwards to make it start at the beginning of a line. | 5949 | region can be extended backwards to make it start at the beginning of |
| 5950 | a line. | ||
| 5950 | 5951 | ||
| 5951 | There is no reason to change that value except for debugging purposes. */); | 5952 | There is no reason to change that value except for debugging purposes. */); |
| 5952 | long_line_optimizations_bol_search_limit = 128; | 5953 | long_line_optimizations_bol_search_limit = 128; |