[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6763: 24.0.50.1; Doc string of `window-line-height'
From: |
IRIE Shinsuke |
Subject: |
bug#6763: 24.0.50.1; Doc string of `window-line-height' |
Date: |
Sat, 31 Jul 2010 03:12:09 +0900 |
User-agent: |
Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Goj$(D+W(B) APEL/10.7 Emacs/23.1 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
> I think you misunderstood the doc string. It means that instead of
>
> (window-line-height)
>
> you should use
>
> (pos-visible-in-window-p)
`pos-visible-in-window-p' doesn't return a line height, so we can never
use it as a substitute of `window-line-height'.
> Using progn doesn't cut it, since it always returns the value of the
> last form. What you mean is probably this:
>
> (or (window-line-height)
> (pos-visible-in-window-p))
Why? If `window-line-height' returns nil, the result of this expression
becomes t or nil. What I want to obtain is a line height, not a boolean.
I guess the doc string means "`pos-visible-in-window-p' updates the
matrices' information, so call it before `window-line-height'."
In that case, however, it seems redisplaying is necessary for getting
the useful result. As I wrote in the previous mail, the following
expression properly returns the line height.
(progn (redisplay t)
(window-line-height))
I think `pos-visible-in-window-p' in the doc string should be changed
to `redisplay'.
IRIE Shinsuke