changeset 110710:deee083d1b01

* subr.el (booleanp): Return t instead of a list (Bug#7086).
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 02 Oct 2010 21:11:20 -0400
parents f07cd17d0a5a
children 895cc3cde68a
files lisp/ChangeLog lisp/subr.el
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Oct 02 20:59:02 2010 -0400
+++ b/lisp/ChangeLog	Sat Oct 02 21:11:20 2010 -0400
@@ -1,3 +1,7 @@
+2010-10-03  Kevin Rodgers  <kevin.d.rodgers@gmail.com>
+
+	* subr.el (booleanp): Return t instead of a list (Bug#7086).
+
 2010-10-03  Chong Yidong  <cyd@stupidchicken.com>
 
 	* server.el (server-process-filter, server-return-error): Give
--- a/lisp/subr.el	Sat Oct 02 20:59:02 2010 -0400
+++ b/lisp/subr.el	Sat Oct 02 21:11:20 2010 -0400
@@ -2420,8 +2420,9 @@
   (or (stringp object) (null object)))
 
 (defun booleanp (object)
-  "Return non-nil if OBJECT is one of the two canonical boolean values: t or nil."
-  (memq object '(nil t)))
+  "Return t if OBJECT is one of the two canonical boolean values: t or nil.
+Otherwise, return nil."
+  (and (memq object '(nil t)) t))
 
 (defun field-at-pos (pos)
   "Return the field at position POS, taking stickiness etc into account."