[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Questions about text properties
From: |
Eli Zaretskii |
Subject: |
Re: Questions about text properties |
Date: |
Sun, 21 Oct 2018 15:17:50 +0300 |
> From: "Garreau\, Alexandre" <address@hidden>
> Date: Sun, 21 Oct 2018 05:21:40 +0200
>
> – how about adding stuff to a *value* of property, be it a list, or
> anything that could inherit, such as an alist, a keymap, etc.? it
> seems there are no functions for that;
Not sure I understand why you need something special: modifying a Lisp
value, whether to add something or otherwise, is rather trivial, no?
> – why are properties rear-sticky by default rather than the opposite?
Because the other alternative is rarely needed. E.g., if you modify a
string that has a face, you want the appended characters to inherit
the same face. By contrast, inserting before the string rarely needs
such inheritance.
> – why is there only a mouse-face property, rather than a hover, click,
> pressed, active, focus, etc.
The usual reason: low demand and/or low motivation to develop features
that are in low demand. Another possible reason is that at least some
of those (click and press -- what's the difference, btw?) you can have
already, by using the 'keymap' property, and perhaps a few others.
> – why can it only affects face rather than other properties so that to
> extend its behavior?
By "it" you mean, mouse-face? Because it's a face.
> – sometimes most text properties can take a hook (that will be called
> lazily to compute a valid value), sometimes not (like for a display
> prop space);
Not sure what this is about. In general, only functions have hooks,
not properties. How about a couple of examples?
> — is the recenter thing about overlays related to the fact buffers are
> implemented with a buffer gap, or is it just something similar to
> fasten stuff?
It makes overlay access faster.