bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#7086: `booleanp' return value is multi-valued list


From: Juanma Barranquero
Subject: bug#7086: `booleanp' return value is multi-valued list
Date: Sat, 25 Sep 2010 11:18:58 +0200

On Sat, Sep 25, 2010 at 00:00, MON KEY <monkey@sandpframing.com> wrote:

> (defun new-booleanp (putative-boolean)
>  (or (and (eq putative-boolean t) '(t t))
>      (and (eq putative-boolean nil) '(nil t))
>      '(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.

    Juanma





reply via email to

[Prev in Thread] Current Thread [Next in Thread]