[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [External] : Re: Could the current font-lock mechanism support font
From: |
Drew Adams |
Subject: |
RE: [External] : Re: Could the current font-lock mechanism support font locking code in comments? |
Date: |
Wed, 31 Mar 2021 04:36:46 +0000 |
> > Vanilla Emacs might not have dimming, but Emacs has it.
> > Library `doremi-frm.el' provides commands that let
> > you incrementally dim or strengthen a face or frame
> > foreground or background.
>
> What I meant is that there is no way to define a face that dims
> other faces.
Was that requested?
> What you point to is what I was referring to as the hard way: you have
> to come up with a list of faces used by the font-lock rules
You can do what I described in a blanket way to
all faces. Or to any faces. And any faces can
be used by font-lock (rules).
> then pass it to a function (like the ones in
> `doremi-frm`) which returns a new face
> (since you can't modify the actual font-lock faces
Why do you say that you can't change the actual
font-lock faces? With what I described you do
exactly that (to any faces, whether used for
font-locking or not). Do you mean something
different, by "modify the actual faces" from
changing their attribute values (e.g. foreground
and background colors)?
> which are still being needed in their non-dimmed form)
I don't follow you. Why is that? Was that part of
the request - that the same face have two different
appearances, and at the same time no less? I don't
even know what that means.
> and then arrange to run the existing rules in such
> a way that they actually use your newly defined faces.
In what I described face colors are changed; that's
all. Font-locking still does what it does. It uses
the same faces - they just change color; that's all.
In what I described the colors change as you watch,
i.e., as you change them incrementally. There's no
change to anything in font-lock (rules, face names,
whatever).
> It's cumbersome and tricky to do it in a reliable way.
I guess we're talking about completely different things.
Perhaps I misunderstood the request. I thought it was
just to dim some (or all) faces. That, you can do with
what I described - dim, desaturate, the opposite, or
whatever.
> Instead, what we'd need is a face whose effect is to modify the
> underlying face (e.g. by dimming it). I guess alpha-blending could be
> used for that.
Sorry, you've lost me. I don't know what the need is
to have a face whose effect is to modify another,
"underlying" face (dimming it). What's an "underlying"
face - are you perhaps talking about face attribute
inheritance?
Anyway, it's not important that I follow you. What I
described is, I hope, clear. If it doesn't correspond
to the request, so be it. Sorry for the noise, in that
case.
- Could the current font-lock mechanism support font locking code in comments?, scame, 2021/03/30
- Re: Could the current font-lock mechanism support font locking code in comments?, Stefan Monnier, 2021/03/30
- Re: Could the current font-lock mechanism support font locking code in comments?, scame, 2021/03/30
- Re: Could the current font-lock mechanism support font locking code in comments?, Stefan Monnier, 2021/03/30
- RE: [External] : Re: Could the current font-lock mechanism support font locking code in comments?, Drew Adams, 2021/03/30
- Re: [External] : Re: Could the current font-lock mechanism support font locking code in comments?, Arthur Miller, 2021/03/30
- Re: [External] : Re: Could the current font-lock mechanism support font locking code in comments?, Stefan Monnier, 2021/03/30
- RE: [External] : Re: Could the current font-lock mechanism support font locking code in comments?,
Drew Adams <=
- RE: [External] : Re: Could the current font-lock mechanism support font locking code in comments?, Drew Adams, 2021/03/31