I installed some theme and it put the following in my $HOME/.emacs
:
(custom-set-variables ; Your init file should only contain one of these
'(custom-safe-themes (quote ("ea489f6710a3da0738e7dbdfc124df06a4e3ae82f191ce66c2af3e0a15e99b90"
"a8245b7cc985a0610d71f9852e9f2767ad1b852c2bdea6f4aadc12cce9c4d6d0"
"8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4"
default)))
)
Why does it have a quote inside of a quote? Isn't that redundant?
Why does it have a quote inside of a quote? Isn't that redundant?
It's not redundant, because it gives a different value; the general case in Lisp is (quote foo) => foo
whereas (quote (quote foo)) => (quote foo)
. So quoting and double-quoting are not interchangeable: one of them is correct while the other is not.
In this particular case there are multiple levels of evaluation so multiple layers of quoting are needed. The outer quote protects against the normal evaluation of arguments before function calls so that custom-set-variables
receives the list (custom-safe-themes (quote ("ea489..." ... default))))
.
This eventually gets passed to custom-theme-set-variables
which calls eval
on the 2nd element of the list (quote ("ea489..." ... default))
.
I tried removing the
(quote
and the corresponding paren and it still works.
It seems to work, but that's only because the custom setting functions catch the error. If you check *Messages*
you will see Error setting custom-safe-themes: (invalid-function ea489f6710a3da0738e7dbdfc124df06a4e3ae82f191ce66c2af3e0a15e99b90)
.