[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: mixed faces of invisibility ellipses]
From: |
Kim F. Storm |
Subject: |
Re: address@hidden: mixed faces of invisibility ellipses] |
Date: |
Tue, 19 Apr 2005 14:20:20 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>> I have installed changes so that the ellipsis are now shown in the
>> same face as the preceding text, as that will probably be TRT for most
>> applications.
>
> Thanks for fixing this "longstanding" bug.
>
>> An alternative was to use the face of the first character of the
>> invisible text, but that looked really ugly for the things I tried.
>
> I'd generally be happy with the `default' face. I think inheriting the face
> of the preceding char or of the next char doesn't make much sense. At least
> not in outline-minor-mode as I use it (the hidden text is a piece of
> font-locked code, so the face you get for the ellipsis is pretty
> arbitrary). I think the only case where inheriting a face might make sense
> is when that face is applied to the whole invisible text (and thus doesn't
> just belong to that text but to the whole region).
Makes sense, but not that easy to do.
What about this heuristic:
-----VISIBLE-----][----INVISIBLE---
is shown as
-----VISIBLE-----]...
To determine the face for ..., we compare the face of the
last visible char ']' and first invisible char '['.
If they have the same face, use that common face for the ellipsis.
Otherwise, use the default face for the ellipsis.
>
>> Perhaps it would make sense to have an "ellipsis-face" property that
>> could be placed on the invisible text to override the face used
>> for the ellipsis. That would be a fairly trivial change.
>
> I don't know about an ellipsis-face property, but when the text is made
> invisible with an overlay, it would make a lot of sense for the overlay's
> `face' property to determine the face of the ellipsis. It would be even
> better if the `mouse-face', `keymap', and `help-echo' properties of the
> overlays were also "applied" to the ellipsis, so we could make ellipsis
> clickable and self-describing.
Interesting idea, but non-trivial to do. Post-release stuff...
--
Kim F. Storm <address@hidden> http://www.cua.dk
Re: address@hidden: mixed faces of invisibility ellipses], Richard Stallman, 2005/04/19