all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Matthew Carter <m@ahungry.com>
Cc: Artur Malabarba <bruce.connor.am@gmail.com>,
	emacs-devel <emacs-devel@gnu.org>
Subject: Re: GNU Elpa Theme (ahungry-theme) - should I add code to auto load-theme it?
Date: Thu, 05 Feb 2015 15:48:32 -0500	[thread overview]
Message-ID: <jwvtwz0146z.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87d25odtai.fsf@ahungry.com> (Matthew Carter's message of "Thu, 05 Feb 2015 14:58:45 -0500")

> By coder and bug, are you referring to my ahungry-theme ELPA package, or
> the author of the deftheme components/package built into emacs 24?

I'm not familiar enough with the custom-theme code to be able to answer
that yet, sorry.

> My theme has 3 calls in it:

> (deftheme ahungry)
> (custom-theme-set-faces 'ahungry <theme face settings omitted>)
> (provide-theme 'ahungry)

That looks sane.  Do you know which one ends up activating that theme?
I'd guess it's custom-theme-set-faces.
Is there some other way to set the faces of a particular theme without
activating that theme?

> In most cases, a user has zero reason to #'require the theme unless they
> plan to load it,

It's difficult to change the behavior between `load' and `require' and
a `load' can happen as a side-effect of something else, so by convention
we want loading to have "no" side-effect (of course, that's ill-defined
since loading a file has nothing but side-effects, but what is meant is
that the side-effects are minor such as providing new
things (commands/functions/...) rather than modifying existing ones).

Not all files follow this convention, but over the years, we've tried to
get closer to the ideal.


        Stefan



  reply	other threads:[~2015-02-05 20:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-30 21:47 GNU Elpa Theme (ahungry-theme) - should I add code to auto load-theme it? Matthew Carter
2015-01-30 21:50 ` Dmitry Gutov
2015-01-30 23:57 ` Artur Malabarba
2015-02-05 17:44   ` Matthew Carter
2015-02-05 19:13     ` Stefan Monnier
2015-02-05 19:58       ` Matthew Carter
2015-02-05 20:48         ` Stefan Monnier [this message]
2015-02-05 22:08         ` Artur Malabarba
2015-02-06  4:03           ` Matthew Carter
2015-02-06  8:59             ` Artur Malabarba
2015-02-05 19:31     ` Ivan Shmakov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvtwz0146z.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=bruce.connor.am@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=m@ahungry.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.