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

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

Re: Cursor stays in middle of frame vertically- minor mode?


From: Nikolaj Schumacher
Subject: Re: Cursor stays in middle of frame vertically- minor mode?
Date: Fri, 11 Apr 2008 14:44:25 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2.50 (darwin)

Timothy Hobbs <tim.thelion@gmail.com> wrote:

> Jens Teich <spamtrap@jensteich.de> writes:
>
> Though I'll note that my recenter-non-flashy is not perfect, and since
> the flashyness is only a problem with x11 emacs and I use -nw, I use
> at home:

By flashy, do you mean the redraw that occurs?

>From the doc:
"If arg is omitted or nil, erase the entire frame and then redraw with
point in the center of the current window."

Here's what I use.

(defun recenter-without-redraw (arg)
  "Like `recenter', but invert the prefix behavior."
  (interactive "P")
  (recenter (if arg
                (unless (consp arg)
                  (prefix-numeric-value arg))
              '(nil . nil))))

But calling (recenter '(nil . nil)) should be enough for non-interactive
use.

regards,
Nikolaj Schumacher




reply via email to

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