[Top][All Lists]

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

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

From: Stefan Monnier
Subject: Re: `save-excursion' defeated by `set-buffer'
Date: Tue, 15 Mar 2011 10:39:49 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> Given the assumptions that I added (fairly, I hope), I would say that
> presumably the `save-excursion' is there NOT ONLY to restore which
> buffer was current but also restore point and mark in that buffer.
> That's what `save-excursion' DOES, and there is no reason not to
> suppose that the original author did not intend that.

Actually, there is a lot of reason to suppose that the author did *not*
intend it: although the author most likely knew it also did such
a save-point-and-mark, she most likely used save-excursion as
a special-form that provides a super-set of what she needed.  That's the
case for the enormous majority of save-excursion+set-buffer.


reply via email to

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