From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: make-indirect-buffer Date: Mon, 12 Apr 2004 17:04:27 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20040412210427.GA12000@fencepost> References: <200404120519.i3C5Jrn21195@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1081804024 30217 80.91.224.253 (12 Apr 2004 21:07:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 12 Apr 2004 21:07:04 +0000 (UTC) Cc: Luc Teirlinck , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Apr 12 23:06:53 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BD8dp-00089G-00 for ; Mon, 12 Apr 2004 23:06:53 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BD8dp-0005Jm-00 for ; Mon, 12 Apr 2004 23:06:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BD7g5-0004sy-4v for emacs-devel@quimby.gnus.org; Mon, 12 Apr 2004 16:05:09 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BD7fW-0004ql-Ju for emacs-devel@gnu.org; Mon, 12 Apr 2004 16:04:34 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BD7fS-0004nf-LS for emacs-devel@gnu.org; Mon, 12 Apr 2004 16:04:31 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BD7fP-0004nD-P3 for emacs-devel@gnu.org; Mon, 12 Apr 2004 16:04:27 -0400 Original-Received: from miles by fencepost.gnu.org with local (Exim 4.24) id 1BD8bT-0003PM-2T; Mon, 12 Apr 2004 17:04:27 -0400 Original-To: Stefan Monnier Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i Blat: Foop X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:21536 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:21536 On Mon, Apr 12, 2004 at 05:01:09PM -0400, Stefan Monnier wrote: > The basic idea looks fine, but the above code calls Fget_buffer twice for > no reason. It seems the following code would work as well: > > base_buffer = Fget_buffer (base_buffer); > if (NILP (base_buffer)) > /* We assume that (get-buffer foo)==nil implies STRINGP (foo). > Is that true? --Stef */ > error ("No such buffer: `%s'", SDATA (base_buffer)); The error message is different -- you're treating NIL as a string... It seems to avoid calling Fget_buffer twice, you'd have to save the previous value of base_buffer and use it in the error message. -Miles -- Occam's razor split hairs so well, I bought the whole argument!