using dolist to add multiple entries to an alist
I previously posted about increasing the default font-size for a frame in emacs. The code looked like this:
(add-to-list 'default-frame-alist '(font . "Monospace-18"))
I decided that I also wanted to open a new emacs frame in fullscreen mode. The code for that looks like this:
(add-to-list 'default-frame-alist '(fullscreen . fullscreen))
Rather than perform the add-to-list operation twice, I investigated how to add
multiple entries to default-frame-alist at one time. That led me to the dolist
macro:
(dolist (entry '((font . "Monospace-18")
(fullscreen . fullscreen)))
(add-to-list 'default-frame-alist entry))