[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Idea: Be able to use text properties as face attributes
From: |
Yuri Khan |
Subject: |
Re: Idea: Be able to use text properties as face attributes |
Date: |
Mon, 27 Mar 2017 14:56:17 +0700 |
On Mon, Mar 27, 2017 at 2:14 AM, Drew Adams <address@hidden> wrote:
> The idea is to allow the use of text properties as
> attributes for the text (and overlay) properties `face',
> `font-lock-face', and `mouse-face'. This would apply to
> faces used in strings (e.g., `propertize') as well as in
> buffers.
>
> It would let you, for example, use a property such as
> `invisible', `keymap', or `read-only' (even `display'?) as
> part of a face definition.
I can see a direct parallel between this proposal and the spirit of CSS.
Basically, an Emacs face is analogous to a CSS class, in that it is a
collection of properties affecting display, which can be added to and
removed from a run of text atomically as a whole.
Text properties, on the other hand, are analogous to applying styling
properties directly to text. Which makes them difficult to control.
> One open question would be whether to allow the text
> properties `face', `font-lock-face', and `mouse-face' as
> properties for themselves and each other. E.g., be able
> to do this:
>
> (set-face-attribute 'face-1 nil 'face 'face-2)
:inherit already does something similar.
- Re: Idea: Be able to use text properties as face attributes, (continued)
- Re: Idea: Be able to use text properties as face attributes, Eli Zaretskii, 2017/03/27
- RE: Idea: Be able to use text properties as face attributes, Drew Adams, 2017/03/27
- Re: Idea: Be able to use text properties as face attributes, Eli Zaretskii, 2017/03/28
- Re: Idea: Be able to use text properties as face attributes, Stefan Monnier, 2017/03/28
- RE: Idea: Be able to use text properties as face attributes, Drew Adams, 2017/03/28
- Re: Idea: Be able to use text properties as face attributes, Stefan Monnier, 2017/03/28
- RE: Idea: Be able to use text properties as face attributes, Drew Adams, 2017/03/28
- Re: Idea: Be able to use text properties as face attributes, Stefan Monnier, 2017/03/28
- RE: Idea: Be able to use text properties as face attributes, Drew Adams, 2017/03/29
- RE: Idea: Be able to use text properties as face attributes, Drew Adams, 2017/03/28
Re: Idea: Be able to use text properties as face attributes,
Yuri Khan <=
Re: Idea: Be able to use text properties as face attributes, Eli Zaretskii, 2017/03/27
- RE: Idea: Be able to use text properties as face attributes, Drew Adams, 2017/03/27
- Re: Idea: Be able to use text properties as face attributes, Eli Zaretskii, 2017/03/27
- RE: Idea: Be able to use text properties as face attributes, Drew Adams, 2017/03/27
- Re: Idea: Be able to use text properties as face attributes, Eli Zaretskii, 2017/03/28
- RE: Idea: Be able to use text properties as face attributes, Drew Adams, 2017/03/28
- Re: Idea: Be able to use text properties as face attributes, Eli Zaretskii, 2017/03/29
- Re: Idea: Be able to use text properties as face attributes, Lars Ingebrigtsen, 2017/03/29