I'm following the instruction here to set the default font:
(add-to-list 'default-frame-alist '(font . "Monospace 10"))
(set-face-attribute 'default t :font "Monospace 10")
This works. To avoid the repetition, I tried factoring the string out with let:
(let ((f "Monospace 10"))
(add-to-list 'default-frame-alist '(font . f))
(set-face-attribute 'default t :font f))
The result I get when I load this is
Invalid font: f
Why is the second expression not equivalent to the first pair of statements?
'is blocking evaluation off, as explained in the answers on the linked question.'(font . f)==(cons 'font 'f), but you want(cons 'font f)==\(font . ,f)` – npostavs Feb 17 '16 at 02:07