[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#69431: 30.0.50; Strange fontificaion behavior
From: |
Ihor Radchenko |
Subject: |
bug#69431: 30.0.50; Strange fontificaion behavior |
Date: |
Mon, 01 Apr 2024 10:59:13 +0000 |
Andrea Corallo <acorallo@gnu.org> writes:
> I've applied the following:
>
> (defun font-lock-set-defaults ()
> ...
> + (when (string= (buffer-name) "test.org")
> + (add-variable-watcher 'font-lock-keywords #'k-variable-watcher))
>
> Warm eln-cache (working fontification)
> ================
> For information about GNU Emacs and the GNU system, type C-h C-a.
> XXX set
> backtrace()
> k-variable-watcher(font-lock-keywords ... set #<buffer test.org>)
> normal-mode(t)
>
> XXX set
> backtrace()
> k-variable-watcher(font-lock-keywords ... set #<buffer test.org>)
> ...
> jit-lock-function(1)
>
> Empty eln-cache (fontification broken):
> ================
> For information about GNU Emacs and the GNU system, type C-h C-a.
> XXX makunbound
> backtrace()
> k-variable-watcher(font-lock-keywords nil makunbound #<buffer test.org>)
> kill-local-variable(font-lock-keywords)
> org-set-font-lock-defaults()
> org-mode()
> ...
> XXX set
> backtrace()
> k-variable-watcher(font-lock-keywords (t nil) set nil)
> ...
> jit-lock-function(1)
>
> ================
>
> So from what I see in the non working example 'font-lock-keywords' is
> cleared at the end of 'org-set-font-lock-defaults' which does
> '(kill-local-variable 'font-lock-keywords)'.
>
> Now why this is not happening in the working example I'm not sure ATM,
> ('org-set-font-lock-defaults' is not even called there AFAICS).
I am pretty sure that it does get called, but before your variable
watcher becomes active.
I suspect that font-lock is dumped to Emacs.
Maybe related to bug#66741.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
- bug#69431: 30.0.50; Strange fontificaion behavior,
Ihor Radchenko <=
- bug#69431: 30.0.50; Strange fontificaion behavior, Björn Bidar, 2024/04/01
- bug#69431: 30.0.50; Strange fontificaion behavior, Andrea Corallo, 2024/04/06
- bug#69431: 30.0.50; Strange fontificaion behavior, Ihor Radchenko, 2024/04/06
- bug#69431: 30.0.50; Strange fontificaion behavior, Andrea Corallo, 2024/04/07
- Message not available
- bug#69431: 30.0.50; Strange fontificaion behavior, Eli Zaretskii, 2024/04/07
- bug#69431: 30.0.50; Strange fontificaion behavior, Björn Bidar, 2024/04/07
- bug#69431: 30.0.50; Strange fontificaion behavior, Eli Zaretskii, 2024/04/07
- bug#69431: 30.0.50; Strange fontificaion behavior, Björn Bidar, 2024/04/07
- bug#69431: 30.0.50; Strange fontificaion behavior, Eli Zaretskii, 2024/04/07
- bug#69431: 30.0.50; Strange fontificaion behavior, Björn Bidar, 2024/04/07