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: Andreas Röhler
Subject: Re: `save-excursion' defeated by `set-buffer'
Date: Fri, 11 Mar 2011 12:09:14 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6

Am 11.03.2011 10:54, schrieb David Kastrup:
Andreas Röhler<address@hidden>  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.


Hmm, isn't it just the task of save-excursion to defeat an inner set-buffer?

A legal defeat so to say...

Or with other words: save-excursion must not restore if no danger buffer being set otherwise meanwhile.

So the warning is just nonsense?

Andreas



reply via email to

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