unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: Yavuz <justloop@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: customize-themes doesn't allow backquote or :inherit
Date: Sun, 17 Oct 2010 17:20:25 -0400	[thread overview]
Message-ID: <87y69wsehy.fsf@stupidchicken.com> (raw)
In-Reply-To: <loom.20101017T203133-734@post.gmane.org> (Yavuz's message of "Sun, 17 Oct 2010 18:47:29 +0000 (UTC)")

Yavuz <justloop@gmail.com> writes:

> However, it seems that the load-theme function in custom.el has some
> code that checks for the presence of 'quote and throws a 'Unsafe
> expression in theme settings' error if I try to use ` instead of '.
>
> Being an elisp newbie, my attempts to bypass is with various
> combinations of eval, apply, and `' ended in failure.
>
> Is there a way to use variables in custom-theme-set-faces? Or is that
> check really need to be that strict? Maybe backquote would be
> acceptable as well?

This is worth discussing.

Currently, the code only evals custom-theme-set-variables/faces if its
arguments are quoted.  I was concerned about security implications; the
worry is that users may not be aware that loading a theme can execute
arbitrary code.

If people think this worry is unwarranted, I can change it to omit that
check.  Or, we can prompt the user if Emacs encounters a non-trivial
form in the custom theme file.

What's everyone's opinion?



  reply	other threads:[~2010-10-17 21:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-17 18:47 customize-themes doesn't allow backquote or :inherit Yavuz
2010-10-17 21:20 ` Chong Yidong [this message]
2010-10-17 21:30   ` Miles Bader
2010-10-18 13:52   ` Stefan Monnier
2010-10-18 16:26     ` Chong Yidong
2010-10-18 17:54       ` Yavuz
2010-10-18 20:30         ` David De La Harpe Golden

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=87y69wsehy.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=justloop@gmail.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 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).