help-gnu-emacs
[Top][All Lists]
Advanced

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

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


From: Le Wang
Subject: Re: `save-excursion' defeated by `set-buffer'
Date: Thu, 3 Mar 2011 12:58:07 +0800

On Thu, Mar 3, 2011 at 1:12 AM, Andreas Röhler <address@hidden> wrote:

Hi,

`byte-compile-file' sends a warning

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

Either the compiler warning or the manual is wrong (http://www.gnu.org/software/emacs/elisp/html_node/Current-Buffer.html): 

Therefore, you should normally use set-buffer within a save-current-buffer or save-excursion (see Excursions) form that will restore the current buffer when your function is done. Here, as an example, is a simplified version of the command append-to-buffer:

--
Le

reply via email to

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