SaltyCrane Blog — Notes on JavaScript and web development

How to set the font for new frames in Emacs 23

I had been using the following elisp to set my font in Emacs 23. However, it did not work when creating new frames with C-x 5 2.

(if (>= emacs-major-version 23)
    (set-default-font "Monospace-11"))

Here is how I set the font for all frames:

(if (>= emacs-major-version 23)
    (modify-all-frames-parameters
     '((font . "Monospace-11"))))

See the documentation for modify-all-frames-parameters for more information.

Comments


#1 gimmmo commented on :

Thanks for this tips.