[Top][All Lists]

[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: Mon, 11 Jan 2010 09:24:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> As an example, when debugging some operation in buffer FOO, I can use
>> save-excursion in FOO and then set-buffer to the DEBUG buffer.  If the
> You can still do it just as well.

And get a warning when doing so.  Where is the point in warnings that
are both inaccurate ("save-excursion defeated by set-buffer" is
nonsensical, since save-excursion still perfectly well does its
documented job of restoring _original_ buffer, point, mark) as well as

If you say that you find most (save-excursion (set-buffer combinations
in the Emacs code base a bad idea, the solution is using grep and fixing
all those occurences where you think they are an error.

Emitting a warning changes no existing code, annoys people, and flags
code as problematic that isn't.  Possibly code that is written to be
compatible with versions of Emacs without save-current-buffer.

David Kastrup

reply via email to

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