GNU bug report logs - #69431
30.0.50; Strange fontificaion behavior

Previous Next

Package: emacs;

Reported by: OGAWA Hirofumi <hirofumi <at> mail.parknet.co.jp>

Date: Tue, 27 Feb 2024 17:16:02 UTC

Severity: normal

Found in version 30.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andrea Corallo <acorallo <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Björn Bidar <bjorn.bidar <at> thaodan.de>, Eli Zaretskii <eliz <at> gnu.org>, yantar92 <at> posteo.net, 69431 <at> debbugs.gnu.org, hirofumi <at> mail.parknet.co.jp
Subject: bug#69431: 30.0.50; Strange fontificaion behavior
Date: Sun, 31 Mar 2024 15:49:08 -0400
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>>>> I'm trying to progress on this but I've difficult time at getting a grip
>>>> on this bug.  One of the reason why is that on my reproducer Emacs
>>>> doesn't crash nor complain, the other reason is that I'm not really into
>>>> our fontification.  I'll keep on looking into it but I'd appretiate any
>>>> hint like: what should be happening to fontify the buffer that is not
>>>> actually happening here?  With such info I could try investingating the
>>>> issue from there comparing with the working case.
>>>
>>> Hmm... here, after
>>>
>>>     rm -rf ~/.emacs.d/eln-cache
>>>     src/emacs -Q --eval '(setq debug-on-error t)' a.org
>>>
>>> I get a buffer with no fontification, that claims to be in Org mode but
>>> whose `font-lock-keywords` is just (t nil), which explains the lack
>>> of fontification.
>>
>> Where `font-lock-keywords` are supposed to be set?
>
> `font-lock-keywords` is normally set from `font-lock-defaults` (which is
> set by the major-mode) by `font-lock-set-defaults` when `font-lock-mode`
> is enabled (which usually happens soon after enabling the major mode,
> via `after-change-major-mode-hook`).

Sorry didn't had much time to progress on this.

I see `font-lock-mode` and `font-lock-set-defaults` are called when
opening an org file here on my reproducer.

Also I see `font-lock-set-defaults` is actually set! So I'm wondering
why afterwards the value changes for my test.org.

Will look into it more hopefully tomorrow.

  Andrea




This bug report was last modified 1 year and 121 days ago.

Previous Next


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