emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] /srv/bzr/emacs/trunk r103444: * lisp/facemenu.el (list


From: martin rudalics
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r103444: * lisp/facemenu.el (list-colors-display): Use with-help-window (Bug#8048).
Date: Tue, 01 Mar 2011 10:47:16 +0100
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

>>> I'm thinking of something like `(space :width maximum)', i.e. a way to
>>> specify a stretch glyph that's exactly wide enough to align the end of
>>> the current line with the right edge of the text area.
>>     (insert (propertize
>>              " " 'display
>>              '(space :align-to (- text 8))) "#123456")
>
> Ah yes, I think this will work.  Thanks.
>
> In the general case, the stuff after stretch glyph could have arbitrary
> width, so this wouldn't work; but it's certainly good enough for what
> list-colors-display needs.

But for one minor detail.  `list-colors-print' produces output of the
form

ghost white            ghost white, GhostWhite               #f8f8ff

where the number of color aliases listed in the middle is currently
adjusted according to the actual window width.  If the window is wide
enough, more aliases are displayed.  So we'd still need to know the
width of the window _before_ filling the buffer in order to emulate the
old behavior faithfully (personally I don't think we should care much).

Maybe we could provide a display specificier, say "truncate", so we
could do something like

(insert (propertize string 'display '(truncate (- text 9))))

to assert that any such string never extends past the ninth column
before the end of the text area.

martin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]