From 26715e1b677a9b2710542fb141a02d6023854182 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sat, 29 Apr 2006 13:56:19 +0000 Subject: [PATCH] (booleanp): New fun. --- lisp/subr.el | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index dc1a3d92c8e..8b8416375b1 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1262,25 +1262,25 @@ If TOGGLE has a `:menu-tag', that is used for the menu item's label." ;;; 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 @@ a system-dependent default device name is used." 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. -- 2.39.5