[Top][All Lists]

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

Re: customize-themes doesn't allow backquote or :inherit

From: Chong Yidong
Subject: Re: customize-themes doesn't allow backquote or :inherit
Date: Sun, 17 Oct 2010 17:20:25 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Yavuz <address@hidden> 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 via email to

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