This is a follow-up question to Emacs Lisp: evaluate variable in alist..
I am trying to set default-frame-alist
in my .emacs
file. Consider, e.g.
(setq default-frame-alist
'((auto-lower . nil)
(auto-raise . nil)
(height . 41)
(width . 80)
(top . 1)
(left . 1)))
(I have omitted some values) This works fine.. Suppose now I want set the height
according to another variable..Say, I stored the integer value 50 in the variable my-height
.. How can I set height
to the value of my-height
? I have tried
(height . my-height)
but neither works.. What am I missing here?
You need to backquote the whole form:
(setq default-frame-alist
`((auto-lower . nil)
(auto-raise . nil)
(height . ,my-height)
(width . 80)
(top . 1)
(left . 1)))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With