unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [elpa] externals/standard-themes 0604883ecc: Expand 'deftheme' with metadata
       [not found] ` <20230825045847.7DFE9C1D362@vcs2.savannah.gnu.org>
@ 2023-08-25  7:43   ` Philip Kaludercic
  2023-08-25  9:15     ` Protesilaos Stavrou
  0 siblings, 1 reply; 3+ messages in thread
From: Philip Kaludercic @ 2023-08-25  7:43 UTC (permalink / raw)
  To: emacs-devel; +Cc: Protesilaos Stavrou

ELPA Syncer <elpasync@gnu.org> writes:

> branch: externals/standard-themes
> commit 0604883ecc89f37f2d8fcb33ec3c8f7f2b8bbe2e
> Author: Protesilaos Stavrou <info@protesilaos.com>
> Commit: Protesilaos Stavrou <info@protesilaos.com>
>
>     Expand 'deftheme' with metadata
>     
>     This is to support new features in Emacs where themes can specify
>     the set they belong to, as well as whether they are light or dark.
>     The built-in command is 'theme-choose-variant'.
>     
>     This is in response to Emacs bug#65468:
>     <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65468>.  Thanks to
>     Mauro Aranda for bringing this matter to my attention.
> ---
>  standard-dark-theme.el  | 9 +++++----
>  standard-light-theme.el | 9 +++++----
>  2 files changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/standard-dark-theme.el b/standard-dark-theme.el
> index 726e888915..cf863c7fa4 100644
> --- a/standard-dark-theme.el
> +++ b/standard-dark-theme.el
> @@ -40,8 +40,12 @@
>  (eval-and-compile
>    (require 'standard-themes)
>  
> +;;;###theme-autoload
>    (deftheme standard-dark
> -    "Like the unthemed dark Emacs, but more consistent.")
> +    "Like the unthemed dark Emacs, but more consistent."
> +    :background-mode 'dark
> +    :kind 'color-scheme
> +    :family 'standard)

Please note that this will cause an issue for anyone using the package
before Emacs 29, because deftheme only accepts 1-2 arguments before
da2e6da72296.

>    (defconst standard-dark-palette
>      '(;; Basic tones
> @@ -246,7 +250,4 @@ represents."
>  
>    (provide-theme 'standard-dark))
>  
> -;;;###theme-autoload
> -(put 'standard-dark 'theme-properties '(:background-mode dark :kind color-scheme :family standard))
> -
>  ;;; standard-dark-theme.el ends here
> diff --git a/standard-light-theme.el b/standard-light-theme.el
> index 3c7e518548..a4fcf16b82 100644
> --- a/standard-light-theme.el
> +++ b/standard-light-theme.el
> @@ -40,8 +40,12 @@
>  (eval-and-compile
>    (require 'standard-themes)
>  
> +;;;###theme-autoload
>    (deftheme standard-light
> -    "Like the unthemed light Emacs, but more consistent.")
> +    "Like the unthemed light Emacs, but more consistent."
> +    :background-mode 'light
> +    :kind 'color-scheme
> +    :family 'standard)
>  
>    (defconst standard-light-palette
>      '(;; Basic tones
> @@ -246,7 +250,4 @@ represents."
>  
>    (provide-theme 'standard-light))
>  
> -;;;###theme-autoload
> -(put 'standard-light 'theme-properties '(:background-mode light :kind color-scheme :family standard))
> -
>  ;;; standard-light-theme.el ends here



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [elpa] externals/standard-themes 0604883ecc: Expand 'deftheme' with metadata
  2023-08-25  7:43   ` [elpa] externals/standard-themes 0604883ecc: Expand 'deftheme' with metadata Philip Kaludercic
@ 2023-08-25  9:15     ` Protesilaos Stavrou
  2023-08-25 19:01       ` Philip Kaludercic
  0 siblings, 1 reply; 3+ messages in thread
From: Protesilaos Stavrou @ 2023-08-25  9:15 UTC (permalink / raw)
  To: Philip Kaludercic, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1667 bytes --]

> From: Philip Kaludercic <philipk@posteo.net>
> Date: Fri, 25 Aug 2023 07:43:55 +0000
>
> ELPA Syncer <elpasync@gnu.org> writes:
>
>> branch: externals/standard-themes
>> commit 0604883ecc89f37f2d8fcb33ec3c8f7f2b8bbe2e
>> Author: Protesilaos Stavrou <info@protesilaos.com>
>> Commit: Protesilaos Stavrou <info@protesilaos.com>
>>
>>     Expand 'deftheme' with metadata
>>     
>>     This is to support new features in Emacs where themes can specify
>>     the set they belong to, as well as whether they are light or dark.
>>     The built-in command is 'theme-choose-variant'.
>>     
>>     This is in response to Emacs bug#65468:
>>     <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65468>.  Thanks to
>>     Mauro Aranda for bringing this matter to my attention.

> [... 20 lines elided]
>
> Please note that this will cause an issue for anyone using the package
> before Emacs 29, because deftheme only accepts 1-2 arguments before
> da2e6da72296.

Thank you Philip!  In that the case, I will have to revert the commit
and only apply it to the modus-themes on the emacs.git trunk.

That granted, I am evaluating the following with Emacs 28 and it does
not throw an error (see attached screenshot as well):

    (deftheme modus-operandi
      "Elegant, highly legible theme with a white background.
    Conforms with the highest legibility standard for color contrast
    between background and foreground in any given piece of text,
    which corresponds to a minimum contrast in relative luminance of
    7:1 (WCAG AAA standard)."
      :background-mode 'light
      :kind 'color-scheme
      :family 'modus)

-- 
Protesilaos Stavrou
https://protesilaos.com

[-- Attachment #2: 2023-08-25_12:14:32_956x730.png --]
[-- Type: image/png, Size: 104220 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [elpa] externals/standard-themes 0604883ecc: Expand 'deftheme' with metadata
  2023-08-25  9:15     ` Protesilaos Stavrou
@ 2023-08-25 19:01       ` Philip Kaludercic
  0 siblings, 0 replies; 3+ messages in thread
From: Philip Kaludercic @ 2023-08-25 19:01 UTC (permalink / raw)
  To: Protesilaos Stavrou; +Cc: emacs-devel

Protesilaos Stavrou <info@protesilaos.com> writes:

>> From: Philip Kaludercic <philipk@posteo.net>
>> Date: Fri, 25 Aug 2023 07:43:55 +0000
>>
>> ELPA Syncer <elpasync@gnu.org> writes:
>>
>>> branch: externals/standard-themes
>>> commit 0604883ecc89f37f2d8fcb33ec3c8f7f2b8bbe2e
>>> Author: Protesilaos Stavrou <info@protesilaos.com>
>>> Commit: Protesilaos Stavrou <info@protesilaos.com>
>>>
>>>     Expand 'deftheme' with metadata
>>>     
>>>     This is to support new features in Emacs where themes can specify
>>>     the set they belong to, as well as whether they are light or dark.
>>>     The built-in command is 'theme-choose-variant'.
>>>     
>>>     This is in response to Emacs bug#65468:
>>>     <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65468>.  Thanks to
>>>     Mauro Aranda for bringing this matter to my attention.
>
>> [... 20 lines elided]
>>
>> Please note that this will cause an issue for anyone using the package
>> before Emacs 29, because deftheme only accepts 1-2 arguments before
>> da2e6da72296.
>
> Thank you Philip!  In that the case, I will have to revert the commit
> and only apply it to the modus-themes on the emacs.git trunk.
>
> That granted, I am evaluating the following with Emacs 28 and it does
> not throw an error (see attached screenshot as well):
>
>     (deftheme modus-operandi
>       "Elegant, highly legible theme with a white background.
>     Conforms with the highest legibility standard for color contrast
>     between background and foreground in any given piece of text,
>     which corresponds to a minimum contrast in relative luminance of
>     7:1 (WCAG AAA standard)."
>       :background-mode 'light
>       :kind 'color-scheme
>       :family 'modus)

My bad, the old definition of `deftheme' actually had a &rest _ignored
at the end of the argument list, but that was removed in a4a35305 (which
according to git tag --contains was after Emacs 28).  From what I
recall, in bug#57639 the issue was related to the scraping of autoload
cookies, and that before that report, the scraper would have copied the
entire definition, while the new definition just copies the properties.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-25 19:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <169293952710.29420.14302018247730714407@vcs2.savannah.gnu.org>
     [not found] ` <20230825045847.7DFE9C1D362@vcs2.savannah.gnu.org>
2023-08-25  7:43   ` [elpa] externals/standard-themes 0604883ecc: Expand 'deftheme' with metadata Philip Kaludercic
2023-08-25  9:15     ` Protesilaos Stavrou
2023-08-25 19:01       ` Philip Kaludercic

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).