[Top][All Lists]

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

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

From: Uday Reddy
Subject: Re: `save-excursion' defeated by `set-buffer'
Date: Sun, 13 Mar 2011 15:05:54 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20110303 Thunderbird/3.1.9

On 3/3/2011 4:58 AM, Le Wang wrote:

Either the compiler warning or the manual is wrong

    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

That is a fair point. It seems that this section of the manual hasn't been edited for a long time. I am submitting some changes now.

Notice, however, that the section on save-excursion at

      When only the identity of the current buffer needs to be saved
      and restored, it is preferable to use save-current-buffer instead.


reply via email to

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