From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: MON KEY Newsgroups: gmane.emacs.bugs Subject: bug#7086: `booleanp' return value is multi-valued list Date: Wed, 22 Sep 2010 17:58:12 -0400 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1285193470 20169 80.91.229.12 (22 Sep 2010 22:11:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 22 Sep 2010 22:11:10 +0000 (UTC) To: 7086@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 23 00:11:09 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 1OyXWu-0005oe-NS for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Sep 2010 00:11:09 +0200 Original-Received: from localhost ([127.0.0.1]:39104 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OyXWu-0002iL-4l for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Sep 2010 18:11:08 -0400 Original-Received: from [140.186.70.92] (port=41435 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OyXWo-0002iG-Mz for bug-gnu-emacs@gnu.org; Wed, 22 Sep 2010 18:11:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OyXWn-00006r-4L for bug-gnu-emacs@gnu.org; Wed, 22 Sep 2010 18:11:02 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41287) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyXWn-00006k-0O for bug-gnu-emacs@gnu.org; Wed, 22 Sep 2010 18:11:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OyXII-0004pL-3f; Wed, 22 Sep 2010 17:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: MON KEY 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 21:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 7086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.128519254518545 (code B ref -1); Wed, 22 Sep 2010 21:56:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Sep 2010 21:55: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 1OyXI0-0004p4-Gm for submit@debbugs.gnu.org; Wed, 22 Sep 2010 17:55:44 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyXHy-0004oz-AQ for submit@debbugs.gnu.org; Wed, 22 Sep 2010 17:55:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OyXKT-0006IX-AJ for submit@debbugs.gnu.org; Wed, 22 Sep 2010 17:58:18 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:42421) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyXKT-0006IQ-7x for submit@debbugs.gnu.org; Wed, 22 Sep 2010 17:58:17 -0400 Original-Received: from [140.186.70.92] (port=51579 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OyXKR-000896-TH for bug-gnu-emacs@gnu.org; Wed, 22 Sep 2010 17:58:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OyXKQ-0006H2-DR for bug-gnu-emacs@gnu.org; Wed, 22 Sep 2010 17:58:15 -0400 Original-Received: from mail-wy0-f169.google.com ([74.125.82.169]:59224) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyXKQ-0006GO-9J for bug-gnu-emacs@gnu.org; Wed, 22 Sep 2010 17:58:14 -0400 Original-Received: by wyb36 with SMTP id 36so1254769wyb.0 for ; Wed, 22 Sep 2010 14:58:13 -0700 (PDT) Original-Received: by 10.216.138.65 with SMTP id z43mr735277wei.12.1285192692942; Wed, 22 Sep 2010 14:58:12 -0700 (PDT) Original-Received: by 10.216.67.195 with HTTP; Wed, 22 Sep 2010 14:58:12 -0700 (PDT) X-Google-Sender-Auth: KWwK1PgjXgRRoLGufAmq8e4wxbA X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 22 Sep 2010 17:56: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:40360 Archived-At: "Return non-`nil' if OBJECT is one of the two canonical boolean values: `t' or `nil'." It should be documented both in the manual and the docstring of `booleanp' that its return value is a list. Specifically that the following two forms return muti-valued lists: (booleanp t) ;=> (t) (booleanp nil) ;=> (nil t) Additionaly, given the nature of this function and the puposes it might serve, it should be documented _why_ the return value is a list. Frustratingly, while the manual waxes on about the readers interpretation of fundamental identity equivalence w/re `nil' and `()' and their self evaluating specialness it has frightening little to offer w/re how one should reflect on these things values within lisp programs. (info "(elisp)nil and t") In lieu of this, the terseness of the `booleanp's docstring extends a tautological flavor which can only be met with confusion by the uninitiated. Indeed, while I can appreciate why (booleanp nil) returns a two element list I'm unable to reason a rationale for why (booleanp t) doesn't? Also, there is this goofiness: (defun tt--bool-w/opt (&optional x) (booleanp x)) (tt--bool-w/opt nil) ;=> (nil t) (tt--bool-w/opt t) ;=> (t) (tt--bool-w/opt) ;=> (nil t) (defun tt--bool (x) (booleanp x)) (tt--bool nil) ;=> (nil t) (tt--bool t) ;=> (t) (tt--bool 'nil) ;=> (nil t) (booleanp '()) ;=> (nil t) (booleanp ()) ;=> (nil t) (tt--bool) ;=> Debugger entered--Lisp error: ; (wrong-number-of-arguments (lambda (x) (booleanp x)) 0) Also, I find this above error troublesome given that the following form returns: (tt--bool-w/opt) Whereas this one doesn't: (defun tt--bool-nil (nil) (booleanp nil)) (tt--bool-nil) ;=> Debugger entered--Lisp error: ; (wrong-number-of-arguments (lambda (nil) (booleanp nil)) 0) (tt--bool-nil 'nil) ;=> Debugger entered--Lisp error: (setting-constant nil) And, the nature of the above errors doesn't really stand up given that: (defun tt--bool-qt-nil (()) (booleanp '())) (tt--bool-qt-nil) ;=> Debugger entered--Lisp error: (wrong-number-of-arguments (lambda (nil) (booleanp (quote nil))) 0) (tt--bool-qt-nil nil) ;=> Debugger entered--Lisp error: (setting-constant nil) (tt--bool-qt-nil ()) ;=> Debugger entered--Lisp error: (setting-constant nil) 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. -- /s_P\