comparison lisp/subr.el @ 70267:a2c45c9f7e1f

(booleanp): New fun.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sat, 29 Apr 2006 13:56:19 +0000
parents b85aa1663ba3
children 72f273a616c1 d9f8d2a65d18 2ecafc6d5db7
comparison
equal deleted inserted replaced
70266:c365b1256696 70267:a2c45c9f7e1f
1260 (setq minor-mode-map-alist (cons (cons toggle keymap) 1260 (setq minor-mode-map-alist (cons (cons toggle keymap)
1261 minor-mode-map-alist)))))))) 1261 minor-mode-map-alist))))))))
1262 1262
1263 ;;; Load history 1263 ;;; Load history
1264 1264
1265 ;;; (defvar symbol-file-load-history-loaded nil 1265 ;; (defvar symbol-file-load-history-loaded nil
1266 ;;; "Non-nil means we have loaded the file `fns-VERSION.el' in `exec-directory'. 1266 ;; "Non-nil means we have loaded the file `fns-VERSION.el' in `exec-directory'.
1267 ;;; That file records the part of `load-history' for preloaded files, 1267 ;; That file records the part of `load-history' for preloaded files,
1268 ;;; which is cleared out before dumping to make Emacs smaller.") 1268 ;; which is cleared out before dumping to make Emacs smaller.")
1269 1269
1270 ;;; (defun load-symbol-file-load-history () 1270 ;; (defun load-symbol-file-load-history ()
1271 ;;; "Load the file `fns-VERSION.el' in `exec-directory' if not already done. 1271 ;; "Load the file `fns-VERSION.el' in `exec-directory' if not already done.
1272 ;;; That file records the part of `load-history' for preloaded files, 1272 ;; That file records the part of `load-history' for preloaded files,
1273 ;;; which is cleared out before dumping to make Emacs smaller." 1273 ;; which is cleared out before dumping to make Emacs smaller."
1274 ;;; (unless symbol-file-load-history-loaded 1274 ;; (unless symbol-file-load-history-loaded
1275 ;;; (load (expand-file-name 1275 ;; (load (expand-file-name
1276 ;;; ;; fns-XX.YY.ZZ.el does not work on DOS filesystem. 1276 ;; ;; fns-XX.YY.ZZ.el does not work on DOS filesystem.
1277 ;;; (if (eq system-type 'ms-dos) 1277 ;; (if (eq system-type 'ms-dos)
1278 ;;; "fns.el" 1278 ;; "fns.el"
1279 ;;; (format "fns-%s.el" emacs-version)) 1279 ;; (format "fns-%s.el" emacs-version))
1280 ;;; exec-directory) 1280 ;; exec-directory)
1281 ;;; ;; The file name fns-%s.el already has a .el extension. 1281 ;; ;; The file name fns-%s.el already has a .el extension.
1282 ;;; nil nil t) 1282 ;; nil nil t)
1283 ;;; (setq symbol-file-load-history-loaded t))) 1283 ;; (setq symbol-file-load-history-loaded t)))
1284 1284
1285 (defun symbol-file (symbol &optional type) 1285 (defun symbol-file (symbol &optional type)
1286 "Return the input source in which SYMBOL was defined. 1286 "Return the input source in which SYMBOL was defined.
1287 The value is an absolute file name. 1287 The value is an absolute file name.
1288 It can also be nil, if the definition is not associated with any file. 1288 It can also be nil, if the definition is not associated with any file.
1925 (defun string-or-null-p (object) 1925 (defun string-or-null-p (object)
1926 "Return t if OBJECT is a string or nil. 1926 "Return t if OBJECT is a string or nil.
1927 Otherwise, return nil." 1927 Otherwise, return nil."
1928 (or (stringp object) (null object))) 1928 (or (stringp object) (null object)))
1929 1929
1930 (defun booleanp (object)
1931 "Return non-nil if OBJECT is one of the two canonical boolean values: t or nil."
1932 (memq object '(nil t)))
1933
1930 1934
1931 ;;;; Support for yanking and text properties. 1935 ;;;; Support for yanking and text properties.
1932 1936
1933 (defvar yank-excluded-properties) 1937 (defvar yank-excluded-properties)
1934 1938