diff options
author | Philip Kaludercic <philipk@posteo.net> | 2022-10-13 10:43:36 +0200 |
---|---|---|
committer | Philip Kaludercic <philipk@posteo.net> | 2022-10-15 17:22:48 +0200 |
commit | 5fc064f14c0e76bf15b7528ef6ef3771ad169aba (patch) | |
tree | b55a201598c49b6407185b07454b192676876b56 | |
parent | da2e6da72296ed6211b8047ccdc42fccab6f1b31 (diff) | |
download | emacs-5fc064f14c0e76bf15b7528ef6ef3771ad169aba.tar.gz |
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)
-rw-r--r-- | etc/NEWS | 5 | ||||
-rw-r--r-- | lisp/emacs-lisp/loaddefs-gen.el | 9 |
2 files changed, 13 insertions, 1 deletions
@@ -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 diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el index d2654fb2064..a1c4f91579e 100644 --- a/lisp/emacs-lisp/loaddefs-gen.el +++ b/lisp/emacs-lisp/loaddefs-gen.el @@ -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) |