diff options
author | Gregory Heytings <gregory@heytings.org> | 2023-02-09 01:09:10 +0000 |
---|---|---|
committer | Gregory Heytings <gregory@heytings.org> | 2023-02-09 02:44:54 +0100 |
commit | 79ce185ad1373845781646812638d4872b8aee69 (patch) | |
tree | 71a6f2e6cba5906f97625748e8fe348e2ac41eda /src/keyboard.c | |
parent | a6cd4553d48aff1d241d54d62dc1b39b3ff541e0 (diff) | |
download | emacs-79ce185ad1373845781646812638d4872b8aee69.tar.gz |
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/keyboard.c')
-rw-r--r-- | src/keyboard.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 4417aa97d28..1d0b907bd8e 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -12731,13 +12731,11 @@ If an unhandled error happens in running this hook, the function in which the error occurred is unconditionally removed, since otherwise the error might happen repeatedly and make Emacs nonfunctional. -Note that, when the current buffer contains one or more lines whose -length is above `long-line-threshold', these hook functions are called -with the buffer narrowed to a small portion around point (whose size -is specified by `long-line-locked-narrowing-region-size'), and the -narrowing is locked (see `narrowing-lock'), so that these hook -functions cannot use `widen' to gain access to other portions of -buffer text. +Note that, when `long-line-optimizations-p' is non-nil in the buffer, +these functions are called as if they were in a `with-narrowing' form, +with a `long-line-optimizations-in-command-hooks' label and with the +buffer narrowed to a portion around point whose size is specified by +`long-line-optimizations-region-size'. See also `post-command-hook'. */); Vpre_command_hook = Qnil; @@ -12753,13 +12751,11 @@ It is a bad idea to use this hook for expensive processing. If unavoidable, wrap your code in `(while-no-input (redisplay) CODE)' to avoid making Emacs unresponsive while the user types. -Note that, when the current buffer contains one or more lines whose -length is above `long-line-threshold', these hook functions are called -with the buffer narrowed to a small portion around point (whose size -is specified by `long-line-locked-narrowing-region-size'), and the -narrowing is locked (see `narrowing-lock'), so that these hook -functions cannot use `widen' to gain access to other portions of -buffer text. +Note that, when `long-line-optimizations-p' is non-nil in the buffer, +these functions are called as if they were in a `with-narrowing' form, +with a `long-line-optimizations-in-command-hooks' label and with the +buffer narrowed to a portion around point whose size is specified by +`long-line-optimizations-region-size'. See also `pre-command-hook'. */); Vpost_command_hook = Qnil; |