From: Chong Yidong <cyd@stupidchicken.com>
To: Ralf Angeli <angeli@caeruleus.net>
Cc: emacs-devel@gnu.org
Subject: Re: Custom themes and simple variables
Date: Fri, 23 Oct 2009 12:53:36 -0400 [thread overview]
Message-ID: <87ocny831r.fsf@stupidchicken.com> (raw)
In-Reply-To: <hbsk24$ue6$1@ger.gmane.org> (Ralf Angeli's message of "Thu, 22 Oct 2009 23:11:34 +0200")
Ralf Angeli <angeli@caeruleus.net> writes:
> $ echo "(deftheme foo \"foo theme\") (custom-theme-set-variables 'foo '(foo \"original\")) (provide-theme 'foo)" > foo-theme.el
> $ emacs -Q --eval "(progn (add-to-list 'load-path \".\") (load-theme 'foo) (defvar foo \"changed\") (describe-variable 'foo))"
>
> The first command defines a theme called "foo" and writes it to disk as
> the file foo-theme.el. The second command calls Emacs, tells it to load
> the theme, define the variable `foo' (for which the theme also contains
> a value) and show the value of it. This will be "changed". If you do
> the same thing using `defcustom' instead of `defvar' the value will be
> "original".
>
> I assume the problem is due to a variable defined with `defvar' not
> being supported by the Custom machinery, so this is likely not a bug.
> Would there nevertheless be a possibility to handle such variables
> cleanly with custom themes?
Any variable that should be supported by Custom (including both
"vanilla" Custom and Custom themes) ought to be declared with defcustom.
Is there any reason the variables you are trying to work with are
`defvar'ed instead?
next prev parent reply other threads:[~2009-10-23 16:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-22 21:11 Custom themes and simple variables Ralf Angeli
2009-10-23 16:53 ` Chong Yidong [this message]
2009-10-23 17:05 ` Ralf Angeli
2009-10-23 17:35 ` Chong Yidong
2009-10-23 17:55 ` Ralf Angeli
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=87ocny831r.fsf@stupidchicken.com \
--to=cyd@stupidchicken.com \
--cc=angeli@caeruleus.net \
--cc=emacs-devel@gnu.org \
/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.