[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: Mon, 14 Mar 2011 10:34:37 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> So, my test is pure and simple.  Convert all the save-excursion's that
> the compiler complains about to save-current-buffer.  If your code

I tend to push with-current-buffer rather than save-current-buffer.
The idea is that for most coding purposes, you only need save-excursion
to save point&mark and with-current-buffer to move to a another buffer
(and set-buffer is basically never needed).

I actually do C-s (set-buffer fairly often, as part of random code cleanup.


reply via email to

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