diff options
| author | Philip Kaludercic | 2022-10-13 10:43:36 +0200 |
|---|---|---|
| committer | Philip Kaludercic | 2022-10-15 17:22:48 +0200 |
| commit | 5fc064f14c0e76bf15b7528ef6ef3771ad169aba (patch) | |
| tree | b55a201598c49b6407185b07454b192676876b56 | |
| parent | da2e6da72296ed6211b8047ccdc42fccab6f1b31 (diff) | |
| download | emacs-5fc064f14c0e76bf15b7528ef6ef3771ad169aba.tar.gz emacs-5fc064f14c0e76bf15b7528ef6ef3771ad169aba.zip | |
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 | |||
| 2846 | like '(when ... ;;;### ...)' would be ignored. They are now parsed as | 2846 | like '(when ... ;;;### ...)' would be ignored. They are now parsed as |
| 2847 | normal. | 2847 | normal. |
| 2848 | 2848 | ||
| 2849 | --- | ||
| 2850 | ** Themes have special autoload cookies. | ||
| 2851 | All build-in themes are scraped for ;;;###theme-autoload cookies that | ||
| 2852 | are loaded along with the regular auto-loaded code. | ||
| 2853 | |||
| 2849 | +++ | 2854 | +++ |
| 2850 | ** 'buffer-modified-p' has been extended. | 2855 | ** 'buffer-modified-p' has been extended. |
| 2851 | This function was previously documented to return only nil or t. This | 2856 | 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." | |||
| 736 | ;; updated. | 736 | ;; updated. |
| 737 | (file-newer-than-file-p | 737 | (file-newer-than-file-p |
| 738 | (expand-file-name "emacs-lisp/loaddefs-gen.el" lisp-directory) | 738 | (expand-file-name "emacs-lisp/loaddefs-gen.el" lisp-directory) |
| 739 | output-file)))) | 739 | output-file))) |
| 740 | (let ((lisp-mode-autoload-regexp | ||
| 741 | "^;;;###\\(\\(noexist\\)-\\)?\\(theme-autoload\\)")) | ||
| 742 | (loaddefs-generate | ||
| 743 | (expand-file-name "../etc/themes/" lisp-directory) | ||
| 744 | (expand-file-name "theme-loaddefs.el" lisp-directory)))) | ||
| 745 | |||
| 746 | ;;;###autoload (load "theme-loaddefs.el") | ||
| 740 | 747 | ||
| 741 | (provide 'loaddefs-gen) | 748 | (provide 'loaddefs-gen) |
| 742 | 749 | ||