[Top][All Lists]
[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: |
Thu, 15 Nov 2007 07:52:23 -0800 |
> Looks OK, except I'd rather not fool around with last-command and
> this-command:
>
> (defvar recenter-last-op nil)
>
> ;; First time - save mode and recenter.
> (let ((bottom (1+ (count-lines 1 (window-end))))
> (current (1+ (count-lines 1 (point))))
> (total (window-height)))
> (setq recenter-last-op (if (< (- bottom current) (/ total 3))
> 'recenter-tb-middle-1)
> 'recenter-tb-middle)
I was specifically trying to avoid a new global variable, thinking setting
`this-command' was cleaner. Doesn't matter to me, though - go for it, and
please add whatever comments RMS wants.
- Re: recenter-top-bottom, (continued)
- Re: recenter-top-bottom, Richard Stallman, 2007/11/13
- RE: recenter-top-bottom, Drew Adams, 2007/11/14
- Re: recenter-top-bottom, Lennart Borgman (gmail), 2007/11/14
- Re: recenter-top-bottom, Bastien, 2007/11/14
- Re: recenter-top-bottom, Juri Linkov, 2007/11/14
- Re: recenter-top-bottom, Lennart Borgman (gmail), 2007/11/14
- RE: recenter-top-bottom, Drew Adams, 2007/11/14
- Re: recenter-top-bottom, Lennart Borgman (gmail), 2007/11/15
- Re: recenter-top-bottom, Richard Stallman, 2007/11/15
- Re: recenter-top-bottom, Stefan Monnier, 2007/11/15
- RE: recenter-top-bottom,
Drew Adams <=
- Re: recenter-top-bottom, Richard Stallman, 2007/11/15
- Re: recenter-top-bottom, Stefan Monnier, 2007/11/16
Re: recenter-top-bottom, Lennart Borgman (gmail), 2007/11/07