GNU bug report logs - #58169
29.0.50; comint-fl-mode fontifies the output

Previous Next

Package: emacs;

Reported by: Augusto Stoffel <arstoffel <at> gmail.com>

Date: Thu, 29 Sep 2022 16:26:01 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #31 received at 58169 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: <miha <at> kamnitnik.top>
Cc: 58169 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>,
 Augusto Stoffel <arstoffel <at> gmail.com>, Visuwesh <visuweshm <at> gmail.com>
Subject: Re: bug#58169: 29.0.50; comint-fl-mode fontifies the output
Date: Sat, 01 Oct 2022 10:43:09 -0400
> @@ -2150,24 +2150,26 @@ comint-output-filter
>  	    ;; insert-before-markers is a bad thing. XXX
>  	    ;; Luckily we don't have to use it any more, we use
>  	    ;; window-point-insertion-type instead.
> -	    (insert string)
> +	    (make-local-variable 'jit-lock-mode)
> +	    (let ((jit-lock-mode nil))
> +	      (insert string)

Yuck!
Oh, and this will fail to do what it intends if the user has set
`font-lock-support-mode` t nil: don't confuse font-lock and jit-lock.

Also, I suspect that the above is not sufficient if you edit earlier
parts of the buffer (presumably previous inputs) which may cause later
parts to be *re*fontified.

A better way might be to change the font-lock rules to skip any text
that is marked as being output (e.g. by testing if the `field` property
is set to `output`).


        Stefan





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

Previous Next


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