emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scratch/remove-locked-narrowing 8f908fb45b7 4/4: Update documentation to


From: Gregory Heytings
Subject: scratch/remove-locked-narrowing 8f908fb45b7 4/4: Update documentation to reflect the removal of locked narrowings
Date: Fri, 10 Feb 2023 17:54:14 -0500 (EST)

branch: scratch/remove-locked-narrowing
commit 8f908fb45b72a32f5965d69cac138be75537385c
Author: Gregory Heytings <gregory@heytings.org>
Commit: Gregory Heytings <gregory@heytings.org>

    Update documentation to reflect the removal of locked narrowings
    
    * src/xdisp.c (syms_of_xdisp) <fontification-function>: Restore
    docstring.
    
    * src/keyboard.c (syms_of_keyboard) <pre-command-hook>: Restore
    docstring.
    (syms_of_keyboard) <post-command-hook>: Restore docstring.
    
    * src/editfns.c (Fwiden): Restore docstring.
    (Fnarrow_to_region): Restore docstring.
    (Fsave_restriction): Restore docstring.
    
    * etc/NEWS: Remove the mention of possible mis-fontification.
    
    * doc/lispref/positions.texi (Narrowing): Remove the mentions of
    possible locks.
    
    * doc/lispref/display.texi (Auto Faces): Remove the mention of
    locked narrowing around 'fontification-functions'.
---
 doc/lispref/display.texi   |  6 ------
 doc/lispref/positions.texi | 12 ------------
 etc/NEWS                   |  3 ---
 src/editfns.c              | 16 +++-------------
 src/keyboard.c             | 16 ----------------
 src/xdisp.c                |  9 +--------
 6 files changed, 4 insertions(+), 58 deletions(-)

diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index c5374e1481a..e4c3dc9ddd6 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -3500,12 +3500,6 @@ function finishes are the ones that really matter.
 
 For efficiency, we recommend writing these functions so that they
 usually assign faces to around 400 to 600 characters at each call.
-
-When the buffer text includes very long lines, these functions are
-called with the buffer narrowed to a relatively small region around
-@var{pos}, and with narrowing locked, so the functions cannot use
-@code{widen} to gain access to the rest of the buffer.
-@xref{Narrowing}.
 @end defvar
 
 @node Basic Faces
diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi
index f3824436246..34c647cc9eb 100644
--- a/doc/lispref/positions.texi
+++ b/doc/lispref/positions.texi
@@ -1036,12 +1036,6 @@ positions.
 
 In an interactive call, @var{start} and @var{end} are set to the bounds
 of the current region (point and the mark, with the smallest first).
-
-Note that, in rare circumstances, Emacs may decide to leave, for
-performance reasons, the accessible portion of the buffer unchanged
-after a call to @code{narrow-to-region}.  This can happen when a Lisp
-program is called via low-level hooks, such as
-@code{jit-lock-functions}, @code{post-command-hook}, etc.
 @end deffn
 
 @deffn Command narrow-to-page &optional move-count
@@ -1067,12 +1061,6 @@ It is equivalent to the following expression:
 @end example
 @end deffn
 
-Note that, in rare circumstances, Emacs may decide to leave, for
-performance reasons, the accessible portion of the buffer unchanged
-after a call to @code{widen}.  This can happen when a Lisp program is
-called via low-level hooks, such as @code{jit-lock-functions},
-@code{post-command-hook}, etc.
-
 @defun buffer-narrowed-p
 This function returns non-@code{nil} if the buffer is narrowed, and
 @code{nil} otherwise.
diff --git a/etc/NEWS b/etc/NEWS
index 2d15e39036a..29255e66bc2 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -615,9 +615,6 @@ with 'C-x x t', or try disabling all known slow minor modes 
with
 and the major mode with 'M-x so-long-mode', or visit the file with
 'M-x find-file-literally' instead of the usual 'C-x C-f'.
 
-Note that the display optimizations in these cases may cause the
-buffer to be occasionally mis-fontified.
-
 The new function 'long-line-optimizations-p' returns non-nil when
 these optimizations are in effect in the current buffer.
 
diff --git a/src/editfns.c b/src/editfns.c
index 1c5a98d2b86..6f85a45e9ae 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -2656,10 +2656,7 @@ DEFUN ("delete-and-extract-region", 
Fdelete_and_extract_region,
 DEFUN ("widen", Fwiden, Swiden, 0, 0, "",
        doc: /* Remove restrictions (narrowing) from current buffer.
 
-This allows the buffer's full text to be seen and edited, unless
-restrictions have been locked with `narrowing-lock', which see, in
-which case the narrowing that was current when `narrowing-lock' was
-called is restored.  */)
+This allows the buffer's full text to be seen and edited.  */)
   (void)
 {
   if (BEG != BEGV || Z != ZV)
@@ -2681,13 +2678,7 @@ See also `save-restriction'.
 
 When calling from Lisp, pass two arguments START and END:
 positions (integers or markers) bounding the text that should
-remain visible.
-
-When restrictions have been locked with `narrowing-lock', which see,
-`narrow-to-region' can be used only within the limits of the
-restrictions that were current when `narrowing-lock' was called.  If
-the START or END arguments are outside these limits, the corresponding
-limit of the locked restriction is used instead of the argument.  */)
+remain visible.  */)
   (Lisp_Object start, Lisp_Object end)
 {
   EMACS_INT s = fix_position (start), e = fix_position (end);
@@ -2812,8 +2803,7 @@ DEFUN ("save-restriction", Fsave_restriction, 
Ssave_restriction, 0, UNEVALLED, 0
 The buffer's restrictions make parts of the beginning and end invisible.
 \(They are set up with `narrow-to-region' and eliminated with `widen'.)
 This special form, `save-restriction', saves the current buffer's
-restrictions, as well as their locks if they have been locked with
-`narrowing-lock', when it is entered, and restores them when it is exited.
+restrictions when it is entered, and restores them when it is exited.
 So any `narrow-to-region' within BODY lasts only until the end of the form.
 The old restrictions settings are restored even in case of abnormal exit
 \(throw or error).
diff --git a/src/keyboard.c b/src/keyboard.c
index 268f5aa0d1b..01a49e3d8bf 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -12718,14 +12718,6 @@ 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.
-
 See also `post-command-hook'.  */);
   Vpre_command_hook = Qnil;
 
@@ -12740,14 +12732,6 @@ 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.
-
 See also `pre-command-hook'.  */);
   Vpost_command_hook = Qnil;
 
diff --git a/src/xdisp.c b/src/xdisp.c
index eaf5cfc88ed..258dd67f2a4 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -36720,14 +36720,7 @@ The tool bar style must also show labels for this to 
have any effect, see
     doc: /* List of functions to call to fontify regions of text.
 Each function is called with one argument POS.  Functions must
 fontify a region starting at POS in the current buffer, and give
-fontified regions the property `fontified' with a non-nil value.
-
-Note that, when the buffer contains one or more lines whose length is
-above `long-line-threshold', these functions are called with the
-buffer narrowed to a small portion around POS (whose size is specified
-by `long-line-locked-narrowing-region-size'), and the narrowing is
-locked (see `narrowing-lock'), so that these functions cannot use
-`widen' to gain access to other portions of buffer text.  */);
+fontified regions the property `fontified' with a non-nil value.  */);
   Vfontification_functions = Qnil;
   Fmake_variable_buffer_local (Qfontification_functions);
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]