From: Stefan Monnier Date: Tue, 21 Feb 2017 18:51:12 +0000 (-0500) Subject: * lisp/emacs-lisp/autoload.el (make-autoload): Support cl-defgeneric X-Git-Tag: emacs-26.0.90~748 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bac7de05e26dff44cd15d26f7f37fad1f8ce154b;p=emacs.git * lisp/emacs-lisp/autoload.el (make-autoload): Support cl-defgeneric * lisp/emacs-lisp/cl-generic.el (cl-defgeneric): Tweak for autoloading. --- diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 1b7ff36f422..d1f3c359f37 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -164,7 +164,7 @@ expression, in which case we want to handle forms differently." ((and (memq car '(easy-mmode-define-global-mode define-global-minor-mode define-globalized-minor-mode defun defmacro easy-mmode-define-minor-mode define-minor-mode - define-inline cl-defun cl-defmacro)) + define-inline cl-defun cl-defmacro cl-defgeneric)) (macrop car) (setq expand (let ((load-file-name file)) (macroexpand form))) (memq (car expand) '(progn prog1 defalias))) diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index 6cc70c4c2f5..d9321b13565 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -233,6 +233,7 @@ DEFAULT-BODY, if present, is used as the body of a default method. ,(help-add-fundoc-usage doc args)) ,@(mapcar (lambda (method) `(cl-defmethod ,name ,@method)) (nreverse methods))) + :autoload-end ,@(mapcar (lambda (declaration) (let ((f (cdr (assq (car declaration) defun-declarations-alist)))) @@ -1215,9 +1216,5 @@ Used internally for the (major-mode MODE) context specializers." (progn (cl-assert (null modes)) mode) `(derived-mode ,mode . ,modes)))) -;; Local variables: -;; generated-autoload-file: "cl-loaddefs.el" -;; End: - (provide 'cl-generic) ;;; cl-generic.el ends here