Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove autoload so theme doesn't auto-apply when installing #31

Open
Trevoke opened this issue Jun 27, 2014 · 5 comments
Open

Remove autoload so theme doesn't auto-apply when installing #31

Trevoke opened this issue Jun 27, 2014 · 5 comments

Comments

@Trevoke
Copy link

Trevoke commented Jun 27, 2014

I think that the autoload makes moe-light enabled when installing or updating, and the way it does it makes it impossible to disable the theme with "disable-theme", which leads the unwanted behavior.

@kuanyui
Copy link
Owner

kuanyui commented Jun 29, 2014

Oops? I don't know that will lead a problem like this...
Indeed, I just try to install from MELPA and the problem occurs. But I don't sure this is where the problem at...
Ok, I'll remove autoload for a try in next updating.

@Trevoke
Copy link
Author

Trevoke commented Jun 30, 2014

I just wrote my first minor mode, so I'm learning about the autoload cookie. Here is an issue where someone explained to me how it works: Trevoke/sqlup-mode.el#6

I saw another theme that uses autoload, and it doesn't load the theme, but the theme is available:
https://github.com/marktran/color-theme-ujelly/blob/master/ujelly-theme.el

kuanyui added a commit that referenced this issue Jul 1, 2014
@Trevoke
Copy link
Author

Trevoke commented Jul 1, 2014

As of 20140701.450 (MELPA package), it still loads when you install from MELPA :/

@Trevoke
Copy link
Author

Trevoke commented Jul 19, 2014

I just installed the latest moe-theme and it still loads when upgrading from MELPA.

@duianto
Copy link

duianto commented Jun 3, 2019

@kuanyui Could you take a look at this possible solution. It's an old issue so you might not have gotten a notification about my comment (maybe your unsubscribed from it or something).

This is still an issue.

moe-theme is part of the Spacemacs themes-megapack layer,
https://github.com/syl20bnr/spacemacs/blob/8c0b8c3440a33df2c291088c47e75fd5e4fbbb61/layers/%2Bthemes/themes-megapack/packages.el#L61

When all themes in the themes-megapack layer are being installed and it gets to moe-theme then it is applied automatically.

I don't know if it's the solution. But I noticed that moe-theme uses provide:

(provide 'moe-theme)

While at least the four other themes that I've checked, use provide-theme:

The Emacs manual seems to also suggest provide-theme for custom themes:

A Custom theme file should be named foo-theme.el, where foo is the theme name. The first Lisp form in the file should be a call to deftheme, and the last form should be a call to provide-theme.

source: https://www.gnu.org/software/emacs/manual/html_node/elisp/Custom-Themes.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants