emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom themes and simple variables


From: Chong Yidong
Subject: Re: Custom themes and simple variables
Date: Fri, 23 Oct 2009 12:53:36 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Ralf Angeli <address@hidden> 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?




reply via email to

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