On Wed, Sep 22, 2010 at 23:58, MON KEY<monkey@sandpframing.com> wrote:
"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.
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 list
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)))