Subject: Re: bug#6192: 24.0.50; eldoc-mode: unexpected recentering

From: Stephen Berman <[email-masked]>
Date: Fri, 14 May 2010 20:07:46 +0200

On Fri, 14 May 2010 20:49:44 +0300 Eli Zaretskii <[email-masked]> wrote:

>> From: Stephen Berman <[email-masked]>
>> Date: Fri, 14 May 2010 19:11:30 +0200
>> Cc: 
>> 
>> 1. Let ~/.emacs consist of the following line:
>> (add-hook 'emacs-lisp-mode-hook 'turn-on-eldoc-mode)
>> 
>> 2. Start Emacs with the above init-file.
>> 
>> 3. Visit an Emacs lisp file that's long enough to scroll a number of
>> screens up and down, e.g. lisp/abbrev.el from the Emacs source
>> directory.
>> 
>> 4. Type `M->' (end-of-buffer).
>> 
>> 5. Type 'M-v' (scroll-down-command)
>> 
>> => This puts point at line 902 (at least here, with window-height 33),
>> which is at the bottom of the window as it should be -- but only for a
>> fraction of a second, and then point is recentered so that line 902 is
>> now in the middle of the window.
>
> Could it be that the last line uses some characters or some faces that
> cause the line to be only partially visible, when it is the last line
> of the window?

I don't think so.  First, I think this happens with any file that's long
enough.  Second, the last line of abbrev.el is empty (EOB), and after
step 4, the last line of the file is completely visible, and two or
three lines above the bottom of the window; this is typical.  And third,
as I reported, this doesn't only happen at the bottom of the file, nor
does it always happen there: for instance, my normal Emacs window-height
is 57, and with this height and the above recipe, I see the recenter not
after the first M-v but after the second one.  Very peculiar...

Steve Berman