changeset 70267:a2c45c9f7e1f

(booleanp): New fun.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sat, 29 Apr 2006 13:56:19 +0000
parents c365b1256696
children 8fb69c1e87e8
files lisp/subr.el
diffstat 1 files changed, 23 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/subr.el	Sat Apr 29 13:55:42 2006 +0000
+++ b/lisp/subr.el	Sat Apr 29 13:56:19 2006 +0000
@@ -1262,25 +1262,25 @@
 
 ;;; Load history
 
-;;; (defvar symbol-file-load-history-loaded nil
-;;;   "Non-nil means we have loaded the file `fns-VERSION.el' in `exec-directory'.
-;;; That file records the part of `load-history' for preloaded files,
-;;; which is cleared out before dumping to make Emacs smaller.")
-
-;;; (defun load-symbol-file-load-history ()
-;;;   "Load the file `fns-VERSION.el' in `exec-directory' if not already done.
-;;; That file records the part of `load-history' for preloaded files,
-;;; which is cleared out before dumping to make Emacs smaller."
-;;;   (unless symbol-file-load-history-loaded
-;;;     (load (expand-file-name
-;;; 	   ;; fns-XX.YY.ZZ.el does not work on DOS filesystem.
-;;; 	   (if (eq system-type 'ms-dos)
-;;; 	       "fns.el"
-;;; 	     (format "fns-%s.el" emacs-version))
-;;; 	   exec-directory)
-;;; 	  ;; The file name fns-%s.el already has a .el extension.
-;;; 	  nil nil t)
-;;;     (setq symbol-file-load-history-loaded t)))
+;; (defvar symbol-file-load-history-loaded nil
+;;   "Non-nil means we have loaded the file `fns-VERSION.el' in `exec-directory'.
+;; That file records the part of `load-history' for preloaded files,
+;; which is cleared out before dumping to make Emacs smaller.")
+
+;; (defun load-symbol-file-load-history ()
+;;   "Load the file `fns-VERSION.el' in `exec-directory' if not already done.
+;; That file records the part of `load-history' for preloaded files,
+;; which is cleared out before dumping to make Emacs smaller."
+;;   (unless symbol-file-load-history-loaded
+;;     (load (expand-file-name
+;; 	   ;; fns-XX.YY.ZZ.el does not work on DOS filesystem.
+;; 	   (if (eq system-type 'ms-dos)
+;; 	       "fns.el"
+;; 	     (format "fns-%s.el" emacs-version))
+;; 	   exec-directory)
+;; 	  ;; The file name fns-%s.el already has a .el extension.
+;; 	  nil nil t)
+;;     (setq symbol-file-load-history-loaded t)))
 
 (defun symbol-file (symbol &optional type)
   "Return the input source in which SYMBOL was defined.
@@ -1927,6 +1927,10 @@
 Otherwise, return nil."
   (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)))
+
 
 ;;;; Support for yanking and text properties.