emacs-devel
[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: Thu, 24 Dec 2009 10:03:55 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>> Irrelevant: neither example uses (save-excursion (set-buffer ..) ...).
>> Don't be disingenuous.  with-temp-buffer uses with-current-buffer, which
>> is basically (save-current-buffer (set-buffer ...
>
> save-current-buffer != save-excursion
>
> This warning is specificaly aimed at reminding people that the two are
> different, so you clearly need to see this warning a few more times
> before you start to understand what it's about.

And you clearly need to reread my post to understand what it's about.
If you macroexpand with-temp-buffer and save-current-buffer, my argument
still holds: the warning is wrong, and the macro-expanded code
explicitly uses all those commands which you claim are equivalent in
this situation, with different results.

-- 
David Kastrup





reply via email to

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