;; those rare places where we do need it.
)
-(static-if (not (fboundp 'cl-defmethod))
- ;; `cl-generic' requires `cl-lib' at compile-time, so `cl-lib' can't
- ;; use `cl-defmethod' before `cl-generic' has been compiled.
- ;; Also, there is no mechanism to autoload methods, so this can't be
- ;; moved to `cl-extra.el'.
- nil
+(when (fboundp 'cl-generic-define-method)
+ ;; `cl-generic' requires `cl-lib' at compile-time, so `cl-lib' can't
+ ;; use `cl-defmethod' before `cl-generic' has been loaded.
+ ;; Also, there is no mechanism to autoload methods, so this can't be
+ ;; moved to `cl-extra.el'.
(declare-function cl--derived-type-generalizers "cl-extra" (type))
(cl-defmethod cl-generic-generalizers :extra "derived-types" (type)
"Support for dispatch on derived types, i.e. defined with `cl-deftype'."
(cl--define-derived-type
',name ,expander ,predicate ',parents)))))
+;; This one is redundant, but we keep it to silence a
+;; warning during the early bootstrap when `cl-seq.el' gets
+;; loaded before `cl-preloaded.el' is defined.
+(put 'list 'cl-deftype-satisfies #'listp)
+
(static-if (not (fboundp 'cl--define-derived-type))
nil ;; Can't define them yet!
(cl-deftype natnum () (declare (parents integer)) '(satisfies natnump))
;; keyboard macros, which are redundant since `kmacro.el'!!
;;(declare (parents function))
'(satisfies commandp))
- ;; This one is redundant, but we keep it to silence a
- ;; warning during the early bootstrap when `cl-seq.el' gets
- ;; loaded before `cl-preloaded.el' is defined.
- (put 'list 'cl-deftype-satisfies #'listp)
(eval-when-compile
(defmacro cl--defnumtype (type base)