Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Changing ellipsis display for invisible lines?

134 views
Skip to first unread message

Kornelis Sietsma

unread,
Apr 11, 2000, 3:00:00 AM4/11/00
to
Greetings.

Does anyone know of a way to change the display of the ellipsis "..."
before an invisible section of text? (in Emacs 20.5)

I'm using hideshow mode, which is great, but it's too easy to lose sight of
those '...' characters at the end of a block. I'd like to be able to
change them to something else, or to change the face they are displayed in
- but they are ignored by font-lock-mode.

I did some digging, and all I can find is that you can choose whether to
have ellipses when you set buffer-invisibility-spec. No way of specifying
anything else about the ellipses.

I *did* find that you can specify the glyph(s) used for ellipses used in
selective-display, by changing the display tables. Before I go digging
through this stuff further, does anyone know if changing this will also
change what is displayed for invisible overlays, as used in hideshow mode?

Thanks in advance,

-Korny
--

Money is a poor measure of value. "Efficient" does not mean "Good".
"Most Profitable" does not mean "Best". Economic Realism not Rationalism!
-- Kornelis Sietsma ko...@sietsma.com www.sietsma.com/korny icq:2039172

thi

unread,
Apr 11, 2000, 3:00:00 AM4/11/00
to
Kornelis Sietsma <ko...@sietsma.com> writes:

> I *did* find that you can specify the glyph(s) used for ellipses used
> in selective-display, by changing the display tables. Before I go
> digging through this stuff further, does anyone know if changing this
> will also change what is displayed for invisible overlays, as used in
> hideshow mode?

yes. i just tried it and it works under emacs 20.5.
try this in an interactive lisp buffer w/ hideshow enabled:

(setq buffer-display-table (copy-tree standard-display-table))
(set-display-table-slot buffer-display-table 4
[122 122 122 46 122 122 46 46 122 46 46])

then do some hiding in that buffer.

thi

Eli Zaretskii

unread,
Apr 11, 2000, 3:00:00 AM4/11/00
to
Kornelis Sietsma wrote:
>
> Greetings.
>
> Does anyone know of a way to change the display of the ellipsis "..."
> before an invisible section of text? (in Emacs 20.5)

The string that is displayed before invisible lines is stored in the 4th
extra slot of the active display table. You can change it like this:

(set-display-table-slot standard-display-table 4 ">>>")

This replaces "..." with ">>>". If you want the string to stand out in
color, use glyphs instead of characters with the face ID number you want it
in.

For more details, read the section about display tables in the ELisp manual.

David Ward

unread,
Apr 11, 2000, 3:00:00 AM4/11/00
to
Is there any way to do this with XEmacs ???

What if you only wanted to change the face (color) used by the
ellipsis ??

Dave


thi <t...@netcom.com> wrote:

Antispam: to reply, change see.below to davidw

thi

unread,
Apr 11, 2000, 3:00:00 AM4/11/00
to
David Ward <see....@ibm.net> writes:

> Is there any way to do this with XEmacs ???
>
> What if you only wanted to change the face (color) used by the
> ellipsis ??

although i'm not familiar w/ xemacs, my guess would be that there are
similar (or more extensive) visual customization support in xemacs.

thi

Kornelis Sietsma

unread,
Apr 12, 2000, 3:00:00 AM4/12/00
to
Eli Zaretskii wrote:

>Kornelis Sietsma wrote:
>>
>> Greetings.
>>
>> Does anyone know of a way to change the display of the ellipsis "..."
>> before an invisible section of text? (in Emacs 20.5)
>
>The string that is displayed before invisible lines is stored in the 4th
>extra slot of the active display table. You can change it like this:
>
> (set-display-table-slot standard-display-table 4 ">>>")
>
>This replaces "..." with ">>>". If you want the string to stand out in
>color, use glyphs instead of characters with the face ID number you want it
>in.

Thank you. With some effort I got this to work - I now have the following
in my .emacs file :
(set-display-table-slot standard-display-table 4
(make-vector 3 (+ (lsh (face-id 'font-lock-warning-face) 19) ?.)))

This gives me 3 dots still, but in my currently selected warning face.

>For more details, read the section about display tables in the ELisp manual.

Hmm. I had consulted the elisp manual before I asked this - it is not the
easiest reference to use! Thank you for your help.

Jan Vroonhof

unread,
Apr 13, 2000, 3:00:00 AM4/13/00
to
David Ward <see....@ibm.net> writes:

> Is there any way to do this with XEmacs ???

Of course

> What if you only wanted to change the face (color) used by the
> ellipsis ??

(set-glyph-face invisible-text-glyph 'blue)

Jan

0 new messages