bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: 21.1: mh-e folder mode displayed incorrectly


From: Peter S Galbraith
Subject: Re: 21.1: mh-e folder mode displayed incorrectly
Date: Tue, 23 Oct 2001 15:00:49 -0400

Gerd Moellmann wrote:

> Peter S Galbraith <address@hidden> writes:
> 
> > > Maybe I'm misunderstanding what mh-recenter should do.  It's comment
> > > says
> > > 
> > >   ;; Like recenter but with two improvements: nil arg means recenter,
> > >   ;; and only does anything if the current buffer is in the selected
> > >   ;; window.  (Commands like save-some-buffers can make this false.)
> > > 
> > > and for that, `(t)' seems not the right thing.
> > 
> > I guess `(t) makes it act like C-u ?
> > See docs for recenter:
> > 
> >  Just C-u as prefix means put point in the center of the window
> >  and redisplay normally--don't erase and redraw the frame.
> 
> That's what the code does, but not what the function comment says,
> and not what Kevin apparently expects, so the question is still
> open what it should do.
> 
> > For my own education, what's the proper elisp conversion of 
> >  C-u M-x somecommand
> > ?
> 
> You mean what you pass to an ELisp function as argument just C-u?
> C-h v prefix-arg RET (`(list 4)' für just C-u).

Okay.  My trial and error shows (recenter '(t)) to behave the
same way as (recenter '(list 4)), so I'll assume that's what the
code meant (I hate maintaining code I didn't write!  Too much
guess work.)

The docs are unclear, I agree.  Let's believe the code and I'll
change them in mh-e's CVS to:

   ;; Like recenter but with two improvements: 
   ;;  - only does anything if the current buffer is in the selected
   ;;    window.  (Commands like save-some-buffers can make this false.)
   ;;  - nil arg means recenter as with C-u prefix

I'll also change the '(t) to '(list 4), assuming that's what the
original author's intent.

As to the original bug report:

 In a 3-line window (4 lines when counting the status line),
 running (recenter '(list 4)) puts the cursor on the second line
 (the middle of the 3 lines) when executed in emacs20.  This is
 the intended behaviour in the mh-folder window.

 The same command done in emacs21 does not consistently place the
 cursor on the second line.  In my tests, it either goes to the
 first line or the last line, depending on whether the 3-line
 window is on top or bottom.  Note that it works correctly in a
 non-window emacs so the bug is in the
  if (FRAME_WINDOW_P (XFRAME (w->frame)))
 part of window.c's DEFUN("recenter").

In summary, I think it's an emacs21 bug in (recenter) and not an
mh-e bug.

Does this help?

Peter



reply via email to

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