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

From: Protesilaos Stavrou <[email-masked]>
Date: Fri, 11 Dec 2020 17:53:34 +0200

On 2020-12-11, 17:32 +0200, Eli Zaretskii <[email-masked]> wrote:

>> From: Stefan Kangas <[email-masked]>
>> Date: Fri, 11 Dec 2020 09:15:32 -0600
>> Cc: [email-masked], [email-masked], [email-masked], 
>> 	[email-masked]
>> 
>> > What theme-related files need to be byte-compiled, and why?
>> 
>> I believe the issues involved are explained in some detail in the first
>> message in this bug report.
>
> If they are, I'm missing that.  All I see is an assertion that the
> files must be byte-compiled:
>
>> The problem with contributing this new code to Emacs is that it cannot
>> work if it is placed in ../etc/themes/.  Instead, the files need to be
>> in a path that handles byte-compilation, like ../lisp/modus-themes/.
>
> I'm probably missing something, and that is what I'm asking to
> elaborate on.

There now are four *.el files that make up the project:

+ modus-themes.el contains all defcustom, color palettes as alists,
  helper functions, and the face specs.

+ modus-themes-core.el contains a macro that 'let' binds the
  aforementioned alists around 'custom-theme-set-faces' and
  'custom-theme-set-variables'.

+ modus-{operandi-vivendi}-theme.el contain a 'deftheme' and concomitant
  'provide-theme' referencing each of them and just expand the macro.

  - Each of those files has (require 'modus-themes) and
    (eval-when-compile (require 'modus-themes-core)).  Though I also
    tried without the eval-when-compile part.

When I attempted to place all four files in etc/themes/ and then start a
new 'emacs -Q' session, M-x load-theme RET modus-{operandi,vivendi}
would throw an error:

    Cannot open load file: No such file or directory, modus-themes

Whereas the latest patch I sent[1] does not produce any errors and fixes
the issues I had identified in my original message.

[1]: https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-12/msg00937.html

-- 
Protesilaos Stavrou
protesilaos.com