Subject: Re: bug#45068: [PATCH] 28.0.50; Update Modus themes 1.0.2 (backward-incompatible)

From: Mauro Aranda <[email-masked]>
Date: Mon, 01 Mar 2021 12:16:06 -0300

Protesilaos Stavrou <[email-masked]> writes:

> On 2021-03-01, 16:38 +0200, Eli Zaretskii <[email-masked]> wrote:
>
>>> From: Mauro Aranda <[email-masked]>
>>> Cc: Eli Zaretskii <[email-masked]>,  [email-masked]
>>> Date: Sun, 28 Feb 2021 10:33:14 -0300
>>> 
>>> The rest looks good to me, but let's wait for the other people involved
>>> to give their feedback.
>>
>> It LGTM as well, thanks.
>
> Thank you!  Just to add that Basil (now in cc) shared some more
> insights.  The current version is this (any mistakes are mine):
>
>     (defun require-theme (theme &optional path)
>       "Load THEME stored in `custom-theme-load-path'.
>
>     THEME is a symbol that corresponds to the file name without its file
>     type extension.  That is assumed to be either '.el' or '.elc'.
>
>     When THEME is an element of `custom-available-themes', load it and ask
>     for confirmation if it is not considered safe by `custom-safe-themes'.
>     Otherwise load the file indicated by THEME, if present.  In the latter
>     case, the file is intended to work as the basis of a theme declared
>     with `deftheme'.
>
>     If optional PATH is non-nil, it should be a list of directories
>     to search for THEME in, instead of `custom-theme-load-path'.
>     PATH should have the same form as `load-path' or `exec-path'."
>       (cond
>        ((memq theme (custom-available-themes))
>         (load-theme theme))
>        ((let* ((dirs (or path (custom-theme--load-path)))
>                (file (unless (featurep theme)
>                        (locate-file (symbol-name theme) dirs '(".el" ".elc")))))
>           (when file
>             (load-file file))))))

Since there's agreement about this, could you send it as a patch?