From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: delete-windows-on Date: Fri, 2 Oct 2009 18:30:44 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1254501083 30102 80.91.229.12 (2 Oct 2009 16:31:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Oct 2009 16:31:23 +0000 (UTC) Cc: emacs-devel@gnu.org To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 02 18:31:16 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mtl2K-0001QX-6z for ged-emacs-devel@m.gmane.org; Fri, 02 Oct 2009 18:31:16 +0200 Original-Received: from localhost ([127.0.0.1]:52180 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mtl2J-0000s4-L6 for ged-emacs-devel@m.gmane.org; Fri, 02 Oct 2009 12:31:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mtl2E-0000pp-0K for emacs-devel@gnu.org; Fri, 02 Oct 2009 12:31:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mtl29-0000lJ-FS for emacs-devel@gnu.org; Fri, 02 Oct 2009 12:31:09 -0400 Original-Received: from [199.232.76.173] (port=33389 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mtl29-0000lA-97 for emacs-devel@gnu.org; Fri, 02 Oct 2009 12:31:05 -0400 Original-Received: from mail-fx0-f205.google.com ([209.85.220.205]:59714) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mtl28-0005aX-VX for emacs-devel@gnu.org; Fri, 02 Oct 2009 12:31:05 -0400 Original-Received: by fxm1 with SMTP id 1so1142117fxm.31 for ; Fri, 02 Oct 2009 09:31:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=gPGsF06kGBAKthOay/4ssHH5HKLjXup6IVJwP+gP0qQ=; b=HARWA74GACiPaAQJJtYYIkhuMfs1BsXzZjK3hKhtzA5nKpd6v4czOpooCzamD2ysAP yZxd2bW5GA6ORONCVX0B/YZRbI3wi2grk9ruu7jzmznYa2xpYh0N56/ASc0WF1Oj6P9F e4XFVlpAs/x4q7ATOKZ+b/WmoYJPEfYTwvJtg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=G7GN6Qssa+vx7gl6ixu9ZND0D5xaGu4DHMBUbppr28iCe2mn96kw4RVG1pmKDKdl9e mcqpXQdFBEiL0Jjkee4jDPvTAfybuz/JTVfBrUqz3IiSmBO1uvogiHgFxyY2K8GXqHMN +lPV/TMzQIta/6sGyB9ruAuYKQ+UuimJWELEw= Original-Received: by 10.239.130.30 with SMTP id 30mr277557hbh.130.1254501064166; Fri, 02 Oct 2009 09:31:04 -0700 (PDT) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:115849 Archived-At: On Fri, Oct 2, 2009 at 18:16, Drew Adams wrote: > 3. It raises an error if you pass the name of a non-existent buffer, or if you > pass anything that is not a string or a buffer (except nil - see #2). Why? Why > doesn't it just do nothing if the BUFFER arg is not an existing buffer or its > name? > > A nil value of BUFFER means there is no such buffer. The same is true of a > string that doesn't name an existing buffer. The same is true of a non-string > such as the number 42. In one case (#2), we currently do nothing and return nil; > in all other cases (#3), we currently raise an error. That's not very > consistent. I think it is quite consistent. Passing "whatever" (when "whatever" exists) is a clear way to say 'act upon "whatever"'. Passing nil (or omitting the 1st arg) clearly says "act upon the default buffer". IMHO, passing 42 or "nonexistent-buffer-name" clearly means "Oops, someone or something just fucked up". Juanma