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: Sat, 25 Sep 2010 11:18:58 +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 1285407723 24445 80.91.229.12 (25 Sep 2010 09:42:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 25 Sep 2010 09:42:03 +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 Sat Sep 25 11:42:02 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 1OzRGb-0008Di-SI for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Sep 2010 11:42:02 +0200 Original-Received: from localhost ([127.0.0.1]:43227 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OzRGb-0002a0-4V for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Sep 2010 05:42:01 -0400 Original-Received: from [140.186.70.92] (port=52285 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OzRFt-0002Kq-Sa for bug-gnu-emacs@gnu.org; Sat, 25 Sep 2010 05:41:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OzRFo-0002Oz-Pt for bug-gnu-emacs@gnu.org; Sat, 25 Sep 2010 05:41:17 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41218) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OzRFo-0002Ou-L0 for bug-gnu-emacs@gnu.org; Sat, 25 Sep 2010 05:41:12 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OzQsQ-00068m-8B; Sat, 25 Sep 2010 05:17: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: Sat, 25 Sep 2010 09:17: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: notabug Original-Received: via spool by 7086-submit@debbugs.gnu.org id=B7086.128540622023595 (code B ref 7086); Sat, 25 Sep 2010 09:17:02 +0000 Original-Received: (at 7086) by debbugs.gnu.org; 25 Sep 2010 09:17:00 +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 1OzQsO-00068W-9v for submit@debbugs.gnu.org; Sat, 25 Sep 2010 05:17:00 -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 1OzQsL-00068R-0H for 7086@debbugs.gnu.org; Sat, 25 Sep 2010 05:16:57 -0400 Original-Received: by iwn3 with SMTP id 3so2984359iwn.3 for <7086@debbugs.gnu.org>; Sat, 25 Sep 2010 02:19:39 -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=4JW+8E8SKjsHBpIj2d/jp2kIeEgdMHsgN7UHj4fyvFo=; b=vuqvhBpNQ4ytvo5vK6Blypxb6iwFcDM8YdQ0YFpD+22qXVxTKBPW8JDxsaZjnb7n3B UmJX/i9aWZ1BpBfhZiH0oWjPpw/HpVhYbg1pji9ibFcO89v43grcELYhBJHKyaohx4vL DGKUtl4yFhMNmi1pjlAaMSPiRZnKd2jDpJiZE= 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=nayFExbe9nIRMESL4Am41rAg1nNeop7J/+jC8r5ZwtjEr/EJ2iaIHbDwsMLjcxWEpk 3IKH7z8HQqfCilb7ndFHXsgrWbJxlPwCFnne8d6Vk6xIMjzyLveiQSo5vSrtDzn23q40 ik0VrNW5g/me4mhR4NNDJerjQTujNxedq2sA8= Original-Received: by 10.231.173.3 with SMTP id n3mr5262814ibz.56.1285406378980; Sat, 25 Sep 2010 02:19:38 -0700 (PDT) Original-Received: by 10.231.196.71 with HTTP; Sat, 25 Sep 2010 02:18:58 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 25 Sep 2010 05:17: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:40418 Archived-At: On Sat, Sep 25, 2010 at 00:00, MON KEY wrote: > (defun new-booleanp (putative-boolean) > =C2=A0(or (and (eq putative-boolean t) '(t t)) > =C2=A0 =C2=A0 =C2=A0(and (eq putative-boolean nil) '(nil t)) > =C2=A0 =C2=A0 =C2=A0'(nil nil))) But this is not an Emacs Lisp type predicate, it's a new function with a very specific functionality. It is perhaps useful, but certainly as a different function. For one, if the stock `booleanp' worked as you suggest, it could not be used in its main uses right now (as :type in a defcustom and as 'safe-local-variable property value). Again: the fact that the current `booleanp' returns a "multivalued list" (not really, but still) is just an unfortunate implementation detail. The best way to deal with this bug is implement Kevin's suggestion (i.e., make booleanp into "(and (memq object '(nil t)) t)") so it follows the docs, and for you to open a new wishlist bug with your proposed new function. =C2=A0 =C2=A0 Juanma