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

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

Re: (save-excursion (other-window 1)) leaves me in the other window


From: Joe Fineman
Subject: Re: (save-excursion (other-window 1)) leaves me in the other window
Date: Tue, 04 May 2010 15:41:40 -0000
User-agent: Gnus/5.101 (Gnus v5.10.10) Emacs/22.3 (windows-nt)

Sean McAfee <eefacm@gmail.com> writes:

> A native reimplementation of scroll-other-window doesn't work as I'd
> expect:
>
>   (save-excursion
>     (other-window 1)
>     (scroll-up))
>
> The problem is that the current window isn't restored, which
> surprised me considerably.  Why doesn't this work, and how would I
> write a function to go do some stuff in the other window and then
> come back?

I believe save-excursion should be save-window-excursion.
-- 
---  Joe Fineman    joe_f@verizon.net

||:  Everything you do costs money, dissipates heat, and makes  :||
||:  crumbs.                                                    :||


reply via email to

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