emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Idea: Be able to use text properties as face attributes


From: Drew Adams
Subject: RE: Idea: Be able to use text properties as face attributes
Date: Tue, 28 Mar 2017 16:10:45 -0700 (PDT)

> >> This said, I think using face attributes is a bad idea.
> > Reason?  I can be convinced, but only by reasons.
> 
> Faces (and face attributes) are handled by the display engine, which is
> a delicate and performance sensitive piece of code.  Messing with that
> is tricky and can easily impose serious performance problems.

OK.  But if I understand correctly (no indication of
that, I realize ;-)), the only thing the display engine
would need to do differently wrt faces and face attributes
would be to tolerate (ignore) any that it does not recognize
(dunno what it does now - perhaps it raises an error?).

Yes, there is also Customize, which recognizes only the
current face attributes.

Customize could be left as is, which would mean that you
could not use it to assign text-properties as (pseudo)
attributes.

Or we could decide to support unknown face attributes
in Customize in some way (i.e., let you enter them).

I'm not including that as part of the feature proposal.
Customization of a face is not where I see this feature.
I see it in Lisp code or interactive use of `set-face-*'.

> > locations.  But my proposal is purposely aimed at
> > FACES and where they are applied, for the reasons
> > given above.  It's not _only_ about packaging text
> > props together to act on them in an abstract way.
> 
> I'd rather use another property, and then make
> font-lock use that new property instead.

The devil may be in the details - please elaborate.

But a priori I don't see how that would provide the
feature I described, which needs to work, out-of-the-box,
with faces you apply (e.g., by highlighting, and _not_
just by font-lock highlighting), as well as with
`set-face-*' commands etc.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]