[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What to do when font-lock-flush + font-lock-ensure do less than font
From: |
Eli Zaretskii |
Subject: |
Re: What to do when font-lock-flush + font-lock-ensure do less than font-lock-fontify-buffer? |
Date: |
Wed, 24 Feb 2016 21:17:14 +0200 |
> From: Stefan Monnier <address@hidden>
> Cc: address@hidden
> Date: Wed, 24 Feb 2016 13:55:42 -0500
>
> > Actually, in this particular case I think this is a bug in
> > prettify-symbols-mode: it should define its own
> > font-lock-ensure-function. The default value doesn't cover the kind
> > of stuff that this mode uses font-lock for.
>
> Hmm... I don't see any reason why that should be the case.
> IOW I think that if a change is needed it should be font-lock.el because
> prettify-symbols-mode seems to be using font-lock in a "normal" way.
I'm not sure about this (this machinery and its implications were
never sufficiently documented, and what I think I know is the result
of a desperate attempt to document it). However, please explain why
font-lock-ensure-function calls font-lock-DEFAULT-fontify-buffer. If
it's supposed to be good for any mode, why does it call the default
fontification?
As a matter of fact, if I replace the font-lock-default-fontify-buffer
call with a call to font-lock-fontify-buffer, the problem described by
the OP goes away. That is why I said what I said.
- Re: What to do when font-lock-flush + font-lock-ensure do less than font-lock-fontify-buffer?, (continued)
- Re: What to do when font-lock-flush + font-lock-ensure do less than font-lock-fontify-buffer?, Eli Zaretskii, 2016/02/22
- Re: What to do when font-lock-flush + font-lock-ensure do less than font-lock-fontify-buffer?, Clément Pit--Claudel, 2016/02/22
- Re: What to do when font-lock-flush + font-lock-ensure do less than font-lock-fontify-buffer?, Kaushal Modi, 2016/02/22
- Re: What to do when font-lock-flush + font-lock-ensure do less than font-lock-fontify-buffer?, Eli Zaretskii, 2016/02/22
- Re: What to do when font-lock-flush + font-lock-ensure do less than font-lock-fontify-buffer?, Clément Pit--Claudel, 2016/02/22
- Re: What to do when font-lock-flush + font-lock-ensure do less than font-lock-fontify-buffer?, Eli Zaretskii, 2016/02/23
- Re: What to do when font-lock-flush + font-lock-ensure do less than font-lock-fontify-buffer?, Clément Pit--Claudel, 2016/02/23
Re: What to do when font-lock-flush + font-lock-ensure do less than font-lock-fontify-buffer?, Stefan Monnier, 2016/02/23