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?