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: Philip Kaludercic
Subject: bug#57639: [PATCH] Add new command 'toggle-theme'
Date: Mon, 10 Oct 2022 08:16:06 +0000

Protesilaos Stavrou <info@protesilaos.com> writes:

>> From: Stefan Kangas <stefankangas@gmail.com>
>> Date: Sun,  9 Oct 2022 22:32:49 +0200
>>
>> Philip Kaludercic <philipk@posteo.net> writes:
>>
>>> --8<---------------cut here---------------start------------->8---
>>> ;;;###autoload
>>> (when (and (boundp 'custom-theme-load-path)
>>>            load-file-name)
>>>   ;; Add theme folder to `custom-theme-load-path' when installing over 
>>> MELPA.
>>>   (add-to-list 'custom-theme-load-path
>>>                (file-name-as-directory (file-name-directory 
>>> load-file-name))))
>>> --8<---------------cut here---------------end--------------->8---
>>>
>>> from leuven-theme.el to be removed.
>>
>> Why would the above be necessary for leuven-theme.el in particular?
>>
>> I've never had a problem loading themes installed from MELPA, so I don't
>> understand why it should need any special treatment.
>
> Note that the modus-themes.el have this:
>
>     ;;;###autoload
>     (when load-file-name
>       (let ((dir (file-name-directory load-file-name)))
>         (unless (equal dir (expand-file-name "themes/" data-directory))
>           (add-to-list 'custom-theme-load-path dir))))
>
> It is (was?) necessary to make the theme available when installing with
> package.el (GNU ELPA).

I have just checked a few themes from MELPA, and they all include this
snippet.  And it appears rightfully, as package.el doesn't do any theme
handling.





reply via email to

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