]> git.eshelyaron.com Git - emacs.git/commitdiff
Handle ;;;###theme-autoload comments in etc/themes
authorPhilip Kaludercic <philipk@posteo.net>
Thu, 13 Oct 2022 08:43:36 +0000 (10:43 +0200)
committerPhilip Kaludercic <philipk@posteo.net>
Sat, 15 Oct 2022 15:22:48 +0000 (17:22 +0200)
* 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)

etc/NEWS
lisp/emacs-lisp/loaddefs-gen.el

index 62004c10a6c7789084c2353740c624922adc1c95..041fe0bdbd88c9939e345a15ce5ea80dccecad94 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -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
index d2654fb2064c2121a411962edc4bc9723f9af782..a1c4f91579ee8cf9bbb87f7cd536a6b39670e440 100644 (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)