[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Partly deferred font-locking?
From: |
Michael Heerdegen |
Subject: |
Re: Partly deferred font-locking? |
Date: |
Thu, 12 Jan 2023 14:14:15 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eli Zaretskii <eliz@gnu.org> writes:
> My point is that your example is the exception rather than the rule.
> Fontifications almost never access files or do any other fancy stuff
> like that. At least AFAIK.
Yes yes, all good.
But I missed a feature like this for several times. One application is
syntax-based highlighting of el-search matches, for example. Or a
hi-lock like thing but not restricted to simple regexps.
I implemented the el-search hi-lock library more or less without
font-lock, but were reinventing parts of it.
Maybe there would be more use cases if Emacs would support this kind of
highlighting, I don't know.
If you wanted to add some more expensive on-the-fly highlighting, how
would you do it?
Currently, one can't use font-lock directly: when the additional deferred
highlighting doesn't happen for a buffer chunk but normal font-locking
was performed, the deferred highlighting would not be triggered again
when that buffer area gets visible again.
So I think I would have to remember which parts of the buffer where
treated by the deferred highlighting by myself, I would have to keep
that information in an additional variable. That feels a bit odd
since this is one of the things that font-lock naturally does.
I need to reinvent parts of font-lock.
Michael.
Re: Partly deferred font-locking?, Eli Zaretskii, 2023/01/11
- Re: Partly deferred font-locking?, Michael Heerdegen, 2023/01/11
- Re: Partly deferred font-locking?, Eli Zaretskii, 2023/01/11
- Re: Partly deferred font-locking?,
Michael Heerdegen <=
- Re: Partly deferred font-locking?, Eli Zaretskii, 2023/01/12
- Re: Partly deferred font-locking?, Michael Heerdegen, 2023/01/12
- Re: Partly deferred font-locking?, Eli Zaretskii, 2023/01/12
- Re: Partly deferred font-locking?, Ihor Radchenko, 2023/01/12
- Re: Partly deferred font-locking?, Ihor Radchenko, 2023/01/12
- Re: Partly deferred font-locking?, Eli Zaretskii, 2023/01/12
- Re: Partly deferred font-locking?, Ihor Radchenko, 2023/01/12
- Re: Partly deferred font-locking?, Eli Zaretskii, 2023/01/12
- Re: Partly deferred font-locking?, Ihor Radchenko, 2023/01/12
Re: Partly deferred font-locking?, Eli Zaretskii, 2023/01/12