bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Eli Zaretskii
Subject: bug#45068: [PATCH] 28.0.50; Update Modus themes 1.0.2 (backward-incompatible)
Date: Fri, 11 Dec 2020 20:39:20 +0200

> From: Protesilaos Stavrou <info@protesilaos.com>
> Cc: Stefan Kangas <stefankangas@gmail.com>,  juri@linkov.net,
>   contovob@tcd.ie,  45068@debbugs.gnu.org
> Date: Fri, 11 Dec 2020 17:53:34 +0200
> 
> >> > 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

So this is not about byte-compiling, it's about being able to load
some of the files that constitute this group of themes?

If so, I see several possibilities:

  . make a single file with all the functionalities
  . invent a new function custom-require that would search the custom
    load-path, and use that instead of 'require'
  . don't consider this a "theme", but a normal Lisp package (since it
    basically violates the conventions for writing a theme)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]