From: Dirk-Jan C. Binnema <djcb.bulk@gmail.com>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: emacs-devel@gnu.org
Subject: Re: theme and a question about creating them
Date: Wed, 05 Jan 2011 21:26:02 +0200 [thread overview]
Message-ID: <20110105192602.637F339C735@djcbsoftware.nl> (raw)
In-Reply-To: <87ipy7z8zd.fsf@stupidchicken.com>
Hi,
>>>>> On Sun, 2 Jan 2011 09:16:38 -0500, Chong Yidong ("CYD") wrote:
>> Dirk-Jan C. Binnema <djcb.bulk@gmail.com> writes: I tried to use
>> defvar/defconst and :inherit do this (as the old theme did), but it does
>> not seem to work in the new system, i.e.. I tried something like:
>>
>> (defconst mycolor "#123456")
>> (deftheme mytheme)
>> (custom-theme-set-faces 'mytheme
>> `(default ((t (:background ,mycolor)))))
>>
>> but it seems the defconst is not picked up. And for :inherit, it seems
>> you cannot refer to the faces defined in the same
>> 'custom-theme-set-faces' form. I could define theme elsewhere of course,
>> but obviously it'd be nice if my theme file would be self-contained.
>>
>> Is there some way to use constants like this, either with defconst/defvar
>> or :inherit?
CYD> Currently, the theme loading code is too strict about the forms in the
CYD> theme file that it will evaluate. It uses `unsafep' to check the
CYD> forms, and (defconst mycolor "#123456") is considered unsafe under the
CYD> criteria used by `unsafep'.
CYD> I am not sure what's the best way of handling this. Maybe we should
CYD> just go back to unconditionally loading theme files, since it's
CYD> unlikely we can make evaluating Elisp code truly safe. Any objections
CYD> or alternative ideas?
I'm fine with that, but I'm hardly qualified to see the implications of
this.
Somewhat related, I think that emacs should promote the use of :inherit; many
modes have their own faces which require way to many customizations (look
e.g.. at zenburn which has hundreds of lines).
Finally, load-theme seems like a convenient mechanism to set/unset any set of
values. I wonder if it could be used (if unconditional loading is enabled) to
ship a theme with sets up things in a way that many new users expect, i.e..,
with delete-selection-mode, column-number-mode and a couple of other things.
Best wishes,
Dirk.
--
Dirk-Jan C. Binnema Helsinki, Finland
e:djcb@djcbsoftware.nl w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C
next prev parent reply other threads:[~2011-01-05 19:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-31 15:52 theme and a question about creating them Dirk-Jan C. Binnema
2011-01-02 14:16 ` Chong Yidong
2011-01-02 17:38 ` Yavuz
2011-01-05 19:26 ` Dirk-Jan C. Binnema [this message]
2011-01-05 21:05 ` Stefan Monnier
2011-01-05 22:30 ` Johan Bockgård
2011-01-07 3:36 ` Stefan Monnier
2011-01-08 3:12 ` Johan Bockgård
2011-01-08 5:26 ` Stefan Monnier
2011-01-11 18:57 ` Johan Bockgård
2011-01-06 0:49 ` Chong Yidong
2011-01-08 19:28 ` Chong Yidong
2011-01-15 0:48 ` Johan Bockgård
2011-01-19 22:42 ` Johan Bockgård
2011-01-20 3:04 ` Chong Yidong
2011-01-20 15:46 ` Stefan Monnier
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110105192602.637F339C735@djcbsoftware.nl \
--to=djcb.bulk@gmail.com \
--cc=cyd@stupidchicken.com \
--cc=djcb@djcbsoftware.nl \
--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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).