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: Clément Pit-Claudel
Subject: Re: Idea: Be able to use text properties as face attributes
Date: Sun, 26 Mar 2017 16:01:13 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 2017-03-26 15:14, Drew Adams wrote:
> WDOT?  Is this something that would be useful?  If so, would
> someone like to work on implementing it?

This sounds interesting, and the proposal is clear and nice.  Can you think of 
concrete examples where it would things much easier for package developers 
(your example with 'invisible is nice)?

I can think of one, if I understand correctly.  Currently, if one want 
font-lock to apply properties other tan face, then one must add these 
properties to font-lock-extra-managed-props — and then font-lock will remove 
these properties indiscriminately, regardless of where they came from.  This 
makes things difficult sometimes. With your proposal, these attributes could be 
tucked in a face.  On the other hand, one could imagine font-lock being smarter 
and removing only the properties that it added.

I wonder if your suggestion could be generalized.  Fundamentally, is there a 
good reason to have a distinction between face properties and text properties ? 
Then faces would work in a similar fashion to overlay categories (a quick way 
to set consistent properties on many chunks of text)

Clément.





reply via email to

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