From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: `save-excursion' defeated by `set-buffer' Date: Tue, 15 Mar 2011 10:39:49 -0400 Organization: A noiseless patient Spider Message-ID: References: <4D792D16.1080900@easy-emacs.de> <83y64ksoik.fsf@gnu.org> <87aah0j7lf.fsf@rapttech.com.au> <19836.48264.656000.373465@gargle.gargle.HOWL> <19838.9290.109000.165849@gargle.gargle.HOWL> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1300200060 15079 80.91.229.12 (15 Mar 2011 14:41:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 15 Mar 2011 14:41:00 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 15 15:40:56 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PzVQd-0003tl-TF for geh-help-gnu-emacs@m.gmane.org; Tue, 15 Mar 2011 15:40:56 +0100 Original-Received: from localhost ([127.0.0.1]:40751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PzVQZ-0008BL-Qi for geh-help-gnu-emacs@m.gmane.org; Tue, 15 Mar 2011 10:40:51 -0400 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 14 Injection-Info: mx01.eternal-september.org; posting-host="A9flrrT75AwIbB1zb+Al+Q"; logging-data="23151"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19zYmGbD/aZSeDL96lGmHWr" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:+TOyNliiVl2w2NRDXKMKMBL0Ur4= sha1:VRMdJYgn1c1dezeJ43lTFA1CGsQ= Original-Xref: usenet.stanford.edu gnu.emacs.help:185981 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:80121 Archived-At: > Given the assumptions that I added (fairly, I hope), I would say that > presumably the `save-excursion' is there NOT ONLY to restore which > buffer was current but also restore point and mark in that buffer. > That's what `save-excursion' DOES, and there is no reason not to > suppose that the original author did not intend that. Actually, there is a lot of reason to suppose that the author did *not* intend it: although the author most likely knew it also did such a save-point-and-mark, she most likely used save-excursion as a special-form that provides a super-set of what she needed. That's the case for the enormous majority of save-excursion+set-buffer. Stefan