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

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

Re: `save-excursion' defeated by `set-buffer'


From: David Kastrup
Subject: Re: `save-excursion' defeated by `set-buffer'
Date: Fri, 11 Mar 2011 10:54:20 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

> Maybe let's put the question another way:
>
> is there an example, where save-excursion will fail, ie not restore
> the buffer due to a set-buffer afterwards?

No.  It will restore buffer, point and mark, in that order.  It is never
defeated.  What _may_ be defeated is an excursion happening within the
scope of `set-buffer' because restoring buffer will in some instances
restore to the same buffer before restoring point and mark.

-- 
David Kastrup


reply via email to

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