[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: use of `mouse-face' to delimit text zones [was: bidi-display-reorder
From: |
Eli Zaretskii |
Subject: |
Re: use of `mouse-face' to delimit text zones [was: bidi-display-reordering is now non-nil by default] |
Date: |
Tue, 23 Aug 2011 19:15:56 +0300 |
> From: "Drew Adams" <address@hidden>
> Date: Tue, 23 Aug 2011 08:29:22 -0700
> Cc: 'Eli Zaretskii' <address@hidden>, address@hidden
>
> Grep the Lisp sources for `mouse-face', then check occurrences where we
> retrieve
> that property to determine the boundaries and position of various text
> "candidates" (e.g. look for `next(-single)-char-property'). We do this for
> comint history, Dired, tmm, gnus articles, quail completions,...
> [...]
> FWIW, in Icicles, just as in the vanilla Emacs completion code, I make heavy
> use
> of the fact that the `mouse-face' property indicates the boundaries of
> completion candidates.
Heavy use of this doesn't yet make it right. Good (read:
"non-kludgey") programming practices should not use for some feature
symbols whose name or documentation give no clue of such a use.
Should I count the number of bugs submitted by you in the name of this
same principle?
The documentation of mouse-face says:
`mouse-face'
This property is used instead of `face' when the mouse is on or
near the character. For this purpose, "near" means that all text
between the character and where the mouse is have the same
`mouse-face' property value.
That's it. Not a word about potential use of that for doing anything
else besides displaying the text.
How is Joe R. Hacker supposed to know that adding invisible characters
to a portion of text covered by mouse-face will break completion??
Btw, mouse-face can also be put on overlay strings and display
strings; how can you get the underlying text then?
IT'S A KLUDGE!!!
> things might be a lot more complex if two properties were used or if
> displayed-text limits did not correspond to the other (new) limits.
Like what?
> And tomorrow you or someone else might make the same argument about any new
> property we introduced to delimit candidates.
If the face is called `completion-candidate', who would "make the same
argument"?
- Re: bidi-display-reordering is now non-nil by default, (continued)
- Re: bidi-display-reordering is now non-nil by default, Eli Zaretskii, 2011/08/25
- Re: bidi-display-reordering is now non-nil by default, Stefan Monnier, 2011/08/22
- Re: bidi-display-reordering is now non-nil by default, Štěpán Němec, 2011/08/22
- Re: bidi-display-reordering is now non-nil by default, Stefan Monnier, 2011/08/22
- Re: bidi-display-reordering is now non-nil by default, Štěpán Němec, 2011/08/23
- use of `mouse-face' to delimit text zones [was: bidi-display-reordering is now non-nil by default], Drew Adams, 2011/08/23
- Re: use of `mouse-face' to delimit text zones [was: bidi-display-reordering is now non-nil by default],
Eli Zaretskii <=
- Re: use of `mouse-face' to delimit text zones [was: bidi-display-reordering is now non-nil by default], Stefan Monnier, 2011/08/23
- Re: use of `mouse-face' to delimit text zones, Eli Zaretskii, 2011/08/23
- Re: use of `mouse-face' to delimit text zones, Štěpán Němec, 2011/08/23
- Re: use of `mouse-face' to delimit text zones, Stefan Monnier, 2011/08/23
- Re: bidi-display-reordering is now non-nil by default, Stefan Monnier, 2011/08/23
- Re: bidi-display-reordering is now non-nil by default, Štěpán Němec, 2011/08/23
- Re: bidi-display-reordering is now non-nil by default, Eli Zaretskii, 2011/08/23
- Re: bidi-display-reordering is now non-nil by default, Chong Yidong, 2011/08/15
- Re: bidi-display-reordering is now non-nil by default, Eli Zaretskii, 2011/08/15
- Re: bidi-display-reordering is now non-nil by default, Stefan Monnier, 2011/08/15