GNU bug report logs -
#45068
[PATCH] 28.0.50; Update Modus themes 1.0.2 (backward-incompatible)
Previous Next
Reported by: Protesilaos Stavrou <info <at> protesilaos.com>
Date: Sun, 6 Dec 2020 12:25:02 UTC
Severity: normal
Tags: patch
Fixed in version 28.1
Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 2021-03-01, 16:38 +0200, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> From: Mauro Aranda <maurooaranda <at> gmail.com>
>> Cc: Eli Zaretskii <eliz <at> gnu.org>, 45068 <at> debbugs.gnu.org
>> 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))))))
--
Protesilaos Stavrou
protesilaos.com
This bug report was last modified 4 years and 137 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.