Subject: bug#57639: [PATCH] Add new command 'toggle-theme'

From: Philip Kaludercic <[email-masked]>
Date: Thu, 13 Oct 2022 09:10:00 +0000

> From a9bc4ba6b07aef118f05022486f9fc10a0e41e64 Mon Sep 17 00:00:00 2001
> From: Philip Kaludercic <[email-masked]>
> Date: Thu, 13 Oct 2022 10:43:36 +0200
> Subject: [PATCH] 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.
> ---
>  lisp/emacs-lisp/loaddefs-gen.el | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el
> index e57024aee5..39eec87f72 100644
> --- a/lisp/emacs-lisp/loaddefs-gen.el
> +++ b/lisp/emacs-lisp/loaddefs-gen.el
> @@ -736,7 +736,15 @@ loaddefs-generate--emacs-batch
>       ;; 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\\)")
> +          (output-file ))

I have just noticed that this variable was not used and have removed it
locally.

> +      (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)