GNU bug report logs -
#7086
`booleanp' return value is multi-valued list
Previous Next
Reported by: MON KEY <monkey <at> sandpframing.com>
Date: Wed, 22 Sep 2010 21:56:01 UTC
Severity: minor
Tags: notabug
Done: Chong Yidong <cyd <at> stupidchicken.com>
Bug is archived. No further changes may be made.
Full log
Message #38 received at 7086 <at> debbugs.gnu.org (full text, mbox):
On Sat, Sep 25, 2010 at 00:00, MON KEY <monkey <at> 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
This bug report was last modified 14 years and 293 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.