From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#7086: `booleanp' return value is multi-valued list Date: Thu, 23 Sep 2010 00:35:30 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1285195279 26898 80.91.229.12 (22 Sep 2010 22:41:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 22 Sep 2010 22:41:19 +0000 (UTC) Cc: 7086@debbugs.gnu.org To: MON KEY Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 23 00:41:17 2010 Return-path: Envelope-to: geb-bug-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 1OyY02-0007yy-TS for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Sep 2010 00:41:15 +0200 Original-Received: from localhost ([127.0.0.1]:53522 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OyY02-0007nv-3o for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Sep 2010 18:41:14 -0400 Original-Received: from [140.186.70.92] (port=36184 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OyXzt-0007nD-Db for bug-gnu-emacs@gnu.org; Wed, 22 Sep 2010 18:41:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OyXzr-0004Dw-Uc for bug-gnu-emacs@gnu.org; Wed, 22 Sep 2010 18:41:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53735) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyXzr-0004Ds-Rr for bug-gnu-emacs@gnu.org; Wed, 22 Sep 2010 18:41:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OyXt4-00056D-7s; Wed, 22 Sep 2010 18:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Sep 2010 22:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7086-submit@debbugs.gnu.org id=B7086.128519482519595 (code B ref 7086); Wed, 22 Sep 2010 22:34:02 +0000 Original-Received: (at 7086) by debbugs.gnu.org; 22 Sep 2010 22:33:45 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyXsm-000560-TF for submit@debbugs.gnu.org; Wed, 22 Sep 2010 18:33:45 -0400 Original-Received: from mail-iw0-f172.google.com ([209.85.214.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyXsl-00055v-2Z for 7086@debbugs.gnu.org; Wed, 22 Sep 2010 18:33:43 -0400 Original-Received: by iwn3 with SMTP id 3so825018iwn.3 for <7086@debbugs.gnu.org>; Wed, 22 Sep 2010 15:36:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=H+2J8pVu1+rLc2u1pLd6BddnKBOPeyJuFpI3ZiY1F2c=; b=nXnZCni24eQnpJIVlU7LODBFv1YYpvqsMEYPowV20aYj1NCitTjsJJ2GEAr9h/lZCD UMq6ZPZ7GilBZsYvq8GLtMOf+q2jekYELfAw84A9Xx116Lrajt+dvgnc17vmnxtoG1Pc Gs3gXY6n/vvR0R4n3o6obBNmmIBrdTZ5j58OU= 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:content-transfer-encoding; b=UmL6+9mS6JckR3SqcmJodRTauRXCVXNFXAMrTAtXOdmN8U43hwB3JjnIAZiH5ADPbn hvzESkH/hvLi3eZJlA3zqrn9Pej7kXBynQdZqmP9zYq/jOzvgmpyOrRxSKvq1SnAlIIR UQyTnBqC5+kxqxgk4g/kYi2nqUIqSsOTHLDnk= Original-Received: by 10.231.157.205 with SMTP id c13mr896287ibx.71.1285194971082; Wed, 22 Sep 2010 15:36:11 -0700 (PDT) Original-Received: by 10.231.196.71 with HTTP; Wed, 22 Sep 2010 15:35:30 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 22 Sep 2010 18:34:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:40362 Archived-At: On Wed, Sep 22, 2010 at 23:58, MON KEY wrote: > "Return non-`nil' if OBJECT is one of the two canonical boolean > =C2=A0values: `t' or `nil'." > > It should be documented both in the manual and the docstring of `booleanp= ' that > its return value is a list. Why? It is a type predicate. If anything, it should be changed to return t or nil, as "(elisp)2.6 Type Predicates" says: A type predicate function takes one argument; it returns `t' if the argument belongs to the appropriate type, and `nil' otherwise. The fact that it returns nil or a list is an implementation detail. > Indeed, while I can appreciate why (booleanp nil) returns a two element l= ist > I'm unable to reason a rationale for why (booleanp t) doesn't? Why do you expect any kind of rationale, other than the simple fact that it is implemented as (memq object '(nil t))) ? > Also, there is this goofiness: [...] > ; (wrong-number-of-arguments (lambda (x) (booleanp x)) 0) What is exactly the goofiness? > (tt--bool-nil) > ;=3D> Debugger entered--Lisp error: > ; (wrong-number-of-arguments (lambda (nil) (booleanp nil)) 0) Again, what did you expect? > These last two being the most maddening. > > Emacs lets me define the function but then accuses me of somthing I didn'= t even > (appear) to do, i.e. set the constant nil. Of course you did. Why do you expect to use `nil' as an argument and not have trouble? =C2=A0 =C2=A0 Juanma