diff options
| author | Stephen Leake | 2019-09-10 03:36:15 -0700 |
|---|---|---|
| committer | Stephen Leake | 2019-09-10 03:36:15 -0700 |
| commit | ac1a2e260e8ece34500b5879f766b4e54ee57b94 (patch) | |
| tree | a3b71e7b2eabec0b47f93cf38ec840d4373c73bc | |
| parent | a13c64204c8ead966789abf8efe176e4f2d4f599 (diff) | |
| download | emacs-ac1a2e260e8ece34500b5879f766b4e54ee57b94.tar.gz emacs-ac1a2e260e8ece34500b5879f766b4e54ee57b94.zip | |
Support `cl-defstruct' in autoloads
* lisp/emacs-lisp/autoload.el (make-autoload): Add `cl-defstruct' to
"complex cases" list.
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Add :autoload-end to
limit what is declared in autoloads.el for a defstruct.
| -rw-r--r-- | lisp/emacs-lisp/autoload.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 541b22e3eea..a2dbd402c52 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el | |||
| @@ -165,7 +165,7 @@ expression, in which case we want to handle forms differently." | |||
| 165 | define-globalized-minor-mode defun defmacro | 165 | define-globalized-minor-mode defun defmacro |
| 166 | easy-mmode-define-minor-mode define-minor-mode | 166 | easy-mmode-define-minor-mode define-minor-mode |
| 167 | define-inline cl-defun cl-defmacro cl-defgeneric | 167 | define-inline cl-defun cl-defmacro cl-defgeneric |
| 168 | pcase-defmacro)) | 168 | cl-defstruct pcase-defmacro)) |
| 169 | (macrop car) | 169 | (macrop car) |
| 170 | (setq expand (let ((load-file-name file)) (macroexpand form))) | 170 | (setq expand (let ((load-file-name file)) (macroexpand form))) |
| 171 | (memq (car expand) '(progn prog1 defalias))) | 171 | (memq (car expand) '(progn prog1 defalias))) |
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 1ae72666244..05a4192dd9b 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el | |||
| @@ -3006,6 +3006,7 @@ Supported keywords for slots are: | |||
| 3006 | `(progn | 3006 | `(progn |
| 3007 | (defvar ,tag-symbol) | 3007 | (defvar ,tag-symbol) |
| 3008 | ,@(nreverse forms) | 3008 | ,@(nreverse forms) |
| 3009 | :autoload-end | ||
| 3009 | ;; Call cl-struct-define during compilation as well, so that | 3010 | ;; Call cl-struct-define during compilation as well, so that |
| 3010 | ;; a subsequent cl-defstruct in the same file can correctly include this | 3011 | ;; a subsequent cl-defstruct in the same file can correctly include this |
| 3011 | ;; struct as a parent. | 3012 | ;; struct as a parent. |