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

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

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


From: Eli Zaretskii
Subject: bug#57639: [PATCH] Add new command 'toggle-theme'
Date: Sun, 18 Sep 2022 15:52:27 +0300

> From: Philip Kaludercic <philipk@posteo.net>
> Cc: larsi@gnus.org,  57639@debbugs.gnu.org
> Date: Sun, 18 Sep 2022 09:38:02 +0000
> 
> >> >> +  (let* ((theme (car custom-enabled-themes))
> >> >> +         (family (plist-get (get theme 'theme-properties) :family)))
> >> >> +    (unless family
> >> >> +      (error "`%s' is not part of a family" theme))
> >> >
> >> > "Family"? this terminology was never mentioned in the manual or the
> >> > doc string.  How about
> >> >
> >> >   Theme `%s' does not have any variants
> >> >
> >> > instead?
> >> 
> >> Strictly speaking that error message would be wrong at this point,
> >> because we cannot say if a theme has no variants if it is not part of a
> >> family.  This is because variants of a theme are all those that are part
> >> of the same family.  I think it would be better to clarify this in the
> >> documentation.
> >
> > But the documentation doesn't explain what it means for a theme to be
> > part of a family.  Specifically, how does one tell, by looking at a
> > theme, whether it is or isn't part of a family?
> >
> > An alternative for what I suggested above is to say
> >
> >   Theme `%s' does not have any known variants
> 
> I get what you mean... how about
> 
>     (error "Theme `%s' is not part of a family of variants" theme)
> 
> ?

  Theme `%s' is not part of a family of theme variants

> >> +Themes only have variants if they are part of a family of themes.
> >
> > This should explain what it means to be part of a family, otherwise
> > this sentence is not helpful.
> 
> My intention was for this to be an explanation.  The issue is that
> variants and family are mutually recursive concepts:
> 
> - A variant of a theme are those which are part of the same family
> - A family of themes is the set of all variants of a theme.
> 
> Perhaps it is just easier to collapse both concepts into either variant
> of family and just "expose" by documenting it.  I've tried doing so
> below.

Here's an attempt to explain what is a "family", in case it can still
be of interest:

  A @dfn{family} of themes is a set of similar themes that differ by
  minor aspects, such as face colors that are meant for the light vs
  dark background of the frame.





reply via email to

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