Next: , Previous: , Up: Frames   [Contents][Index]

21.11 Frame Parameters

You can control the default appearance and behavior of all frames by specifying a default list of frame parameters in the variable default-frame-alist. Its value should be a list of entries, each specifying a parameter name and a value for that parameter. These entries take effect whenever Emacs creates a new frame, including the initial frame.

For example, you can add the following lines to your init file (see Init File) to set the default frame width to 90 character columns, the default frame height to 40 character rows, and the default font to ‘Monospace-10’:

(add-to-list 'default-frame-alist '(width  . 90))
(add-to-list 'default-frame-alist '(height . 40))
(add-to-list 'default-frame-alist '(font . "Monospace-10"))

For a list of frame parameters and their effects, see Frame Parameters in The Emacs Lisp Reference Manual.

You can also specify a list of frame parameters which apply to just the initial frame, by customizing the variable initial-frame-alist.

If Emacs is compiled to use an X toolkit, frame parameters that specify colors and fonts don’t affect menus and the menu bar, since those are drawn by the toolkit and not directly by Emacs.