GNU bug report logs - #56682
Fix the long lines font locking related slowdowns

Previous Next

Package: emacs;

Reported by: Gregory Heytings <gregory <at> heytings.org>

Date: Thu, 21 Jul 2022 18:01:01 UTC

Severity: normal

Done: Gregory Heytings <gregory <at> heytings.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Gregory Heytings <gregory <at> heytings.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 56682 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, akrl <at> sdf.org
Subject: bug#56682: feature/improved-locked-narrowing 9dee6df39c: Reworked locked narrowing.
Date: Thu, 09 Feb 2023 14:39:39 +0000
Thanks for your feedback.

>
> There's one thing I cannot seem to be able to find in the documentation 
> you added: how can a Lisp program know that it is being run under a 
> "labeled narrowing",
>

A function/macro to check that could indeed be added, its body would be:

(save-restriction (widen) (buffer-narrowed-p))

>
> and in particular what is the label? Without knowing that, how can Lisp 
> programs adapt their behavior to this special kind of narrowing, or even 
> just break out of it using without-narrowing?
>

That information should be given in the docstring of the function that 
creates that narrowing.  It is now present in the docstrings of the three 
hooks where it is used:

pre-command-hook and post-command-hook: ... these functions are called as 
if they were in a `with-narrowing' form, with a 
`long-line-optimizations-in-command-hooks' label ...

fontification-functions: ... these functions are called as if they were in 
a `with-narrowing' form, with a 
`long-line-optimizations-in-fontification-functions' label ...





This bug report was last modified 2 years and 8 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.