[Top][All Lists]

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

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

From: PJ Weisberg
Subject: Re: `save-excursion' defeated by `set-buffer'
Date: Tue, 15 Mar 2011 08:19:55 -0700

On 3/15/11, Stefan Monnier <address@hidden> wrote:
> So the warning was introduced to help Elisp coders improve their code.
> That's what byte-compiler warnings are for.

It's hard to tell what's wrong with the code based on this warning,
though.  (It says save-excursion is "defeated", but buffer, point, and
mark still seem to be getting restored.  So what's the hidden danger?)
 Maybe it should specifially say something like, "save-excursion +
set-buffer could possibly be replaced by with-current-buffer."


reply via email to

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