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}.
+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
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}.
+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
Note that, when the current buffer contains one or more lines whose
length is above `long-line-threshold', Emacs may decide to leave, for
performance reasons, the accessible portion of the buffer unchanged
-after this function is called. */)
+after this function is called from low-level hooks, such as
+`jit-lock-functions' or `post-command-hook'. */)
(void)
{
if (! NILP (Vrestrictions_locked))
Note that, when the current buffer contains one or more lines whose
length is above `long-line-threshold', Emacs may decide to leave, for
performance reasons, the accessible portion of the buffer unchanged
-after this function is called. */)
+after this function is called from low-level hooks, such as
+`jit-lock-functions' or `post-command-hook'. */)
(Lisp_Object start, Lisp_Object end)
{
return narrow_to_region_internal (start, end, false);