Mercurial > emacs
diff lisp/subr.el @ 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 | 515d80e174ba |
children | 06aa6ebe38fa |
line wrap: on
line diff
--- 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."