emacs-devel
[Top][All Lists]
Advanced

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

RE: recenter-top-bottom


From: Drew Adams
Subject: RE: recenter-top-bottom
Date: Wed, 14 Nov 2007 16:58:12 -0800

> > The starting position of the window determines the cycling order:
> >  If initially in the top or middle third: top -> middle -> bottom.
> >  If initially in the bottom third: bottom -> middle -> top.
> 
> But why it does `middle -> bottom -> top' if initially in the 
> middle third? I think `middle -> top -> bottom' would be
> much more convenient!

It's a toss-up, IMO. 
I have no preference, in any case.
If that's preferred by most, then just switch it:

(otherwise
 (let ((top (1+ (count-lines 1 (window-start))))
       (current (1+ (count-lines 1 (point))))
       (total (window-height)))
   (if (< (- current top) (/ total 3))
       (setq this-command 'recenter-tb-middle)
     (setq this-command 'recenter-tb-middle-1)))
 (recenter))






reply via email to

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