;;; cl-lib.el --- Common Lisp extensions for Emacs -*- lexical-binding: t -*-
-;; Copyright (C) 1993, 2001-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 2001-2013 Free Software Foundation, Inc.
;; Author: Dave Gillespie <daveg@synaptics.com>
;; Version: 1.0
;; package which should always be present.
-;;; Future notes:
-
-;; Once Emacs 19 becomes standard, many things in this package which are
-;; messy for reasons of compatibility can be greatly simplified. For now,
-;; I prefer to maintain one unified version.
-
-
;;; Change Log:
;; Version 2.02 (30 Jul 93):
;; earlier and should have triggered them already.
(with-no-warnings ,place)
(setq ,place (cons ,var ,place))))
- (list 'setq place (cl-list* 'cl-adjoin x place keys)))
- (cl-list* 'cl-callf2 'cl-adjoin x place keys)))
+ `(setq ,place (cl-adjoin ,x ,place ,@keys)))
+ `(cl-callf2 cl-adjoin ,x ,place ,@keys)))
(defun cl--set-elt (seq n val)
(if (listp seq) (setcar (nthcdr n seq) val) (aset seq n val)))
;;; Numbers.
-(defun cl-floatp-safe (object)
- "Return t if OBJECT is a floating point number.
-On Emacs versions that lack floating-point support, this function
-always returns nil."
- (and (numberp object) (not (integerp object))))
+(define-obsolete-function-alias 'cl-floatp-safe 'floatp "24.4")
(defsubst cl-plusp (number)
"Return t if NUMBER is positive."
;;;###autoload
(progn
+ ;; The `assert' macro from the cl package signals
+ ;; `cl-assertion-failed' at runtime so always define it.
+ (define-error 'cl-assertion-failed (purecopy "Assertion failed"))
;; Make sure functions defined with cl-defsubst can be inlined even in
;; packages which do not require CL. We don't put an autoload cookie
;; directly on that function, since those cookies only go to cl-loaddefs.
(put 'cl-defsubst 'doc-string-elt 3)
(put 'cl-defstruct 'doc-string-elt 2))
-(load "cl-loaddefs" nil 'quiet)
-
(provide 'cl-lib)
+(or (load "cl-loaddefs" 'noerror 'quiet)
+ ;; When bootstrapping, cl-loaddefs hasn't been built yet!
+ (require 'cl-macs))
;; Local variables:
;; byte-compile-dynamic: t