emacs-devel
[Top][All Lists]
Advanced

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

Re: master 7362554: Widen around c-font-lock-fontify-region. This fixes


From: Stefan Monnier
Subject: Re: master 7362554: Widen around c-font-lock-fontify-region. This fixes bug #38049.
Date: Thu, 14 Nov 2019 08:42:17 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>  ;; Return number of screen lines between START and END.
>  (defun repos-count-screen-lines (start end)
> +  ;; Make sure jit-lock doesn't have to run in a narrowed context.
> +  (font-lock-ensure start end)
>    (save-excursion
>      (save-restriction
>        (narrow-to-region start end)

Hmm... the buffer might have font-lock disabled, in which case we'd
be fontifying where the user didn't want fontification.

But I haven't followed the thread enough to know what we're talking
about, really.  E.g. I have no idea what's the connection between
CC-mode, font-lock-dont-widen, and the above hunk.  More specifically,
when looking at the above patch my first reaction is "if it's needed
here, why isn't it needed almost everywhere else as well?"


        Stefan




reply via email to

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