Handle ;;;###theme-autoload comments in etc/themes

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--emacs-batch):
Extract the autoloads and have them loaded along with loaddefs.el.
* etc/NEWS: Mention the new feature.  (Bug#57639)
This commit is contained in:
Philip Kaludercic 2022-10-13 10:43:36 +02:00
parent da2e6da722
commit 5fc064f14c
No known key found for this signature in database
GPG key ID: F2C3CC513DB89F66
2 changed files with 13 additions and 1 deletions

View file

@ -2846,6 +2846,11 @@ Previously, ';;;###' specs inside a top-level form (i.e., something
like '(when ... ;;;### ...)' would be ignored. They are now parsed as
normal.
---
** Themes have special autoload cookies.
All build-in themes are scraped for ;;;###theme-autoload cookies that
are loaded along with the regular auto-loaded code.
+++
** 'buffer-modified-p' has been extended.
This function was previously documented to return only nil or t. This

View file

@ -736,7 +736,14 @@ rules for built-in packages and excluded files."
;; updated.
(file-newer-than-file-p
(expand-file-name "emacs-lisp/loaddefs-gen.el" lisp-directory)
output-file))))
output-file)))
(let ((lisp-mode-autoload-regexp
"^;;;###\\(\\(noexist\\)-\\)?\\(theme-autoload\\)"))
(loaddefs-generate
(expand-file-name "../etc/themes/" lisp-directory)
(expand-file-name "theme-loaddefs.el" lisp-directory))))
;;;###autoload (load "theme-loaddefs.el")
(provide 'loaddefs-gen)