www.delorie.com/gnu/docs/elisp-manual-21/elisp_450.html   search  
 
Buy the book!


GNU Emacs Lisp Reference Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

29.3.2 Initial Frame Parameters

You can specify the parameters for the initial startup frame by setting initial-frame-alist in your init file (see section 40.1.2 The Init File, `.emacs').

Variable: initial-frame-alist
This variable's value is an alist of parameter values used when creating the initial window frame. You can set this variable to specify the appearance of the initial frame without altering subsequent frames. Each element has the form:

 
(parameter . value)

Emacs creates the initial frame before it reads your init file. After reading that file, Emacs checks initial-frame-alist, and applies the parameter settings in the altered value to the already created initial frame.

If these settings affect the frame geometry and appearance, you'll see the frame appear with the wrong ones and then change to the specified ones. If that bothers you, you can specify the same geometry and appearance with X resources; those do take effect before the frame is created. See section `X Resources' in The GNU Emacs Manual.

X resource settings typically apply to all frames. If you want to specify some X resources solely for the sake of the initial frame, and you don't want them to apply to subsequent frames, here's how to achieve this. Specify parameters in default-frame-alist to override the X resources for subsequent frames; then, to prevent these from affecting the initial frame, specify the same parameters in initial-frame-alist with values that match the X resources.

If these parameters specify a separate minibuffer-only frame with (minibuffer . nil), and you have not created one, Emacs creates one for you.

Variable: minibuffer-frame-alist
This variable's value is an alist of parameter values used when creating an initial minibuffer-only frame--if such a frame is needed, according to the parameters for the main initial frame.

Variable: default-frame-alist
This is an alist specifying default values of frame parameters for all Emacs frames--the first frame, and subsequent frames. When using the X Window System, you can get the same results by means of X resources in many cases.

See also special-display-frame-alist, in 28.8 Choosing a Window for Display.

If you use options that specify window appearance when you invoke Emacs, they take effect by adding elements to default-frame-alist. One exception is `-geometry', which adds the specified position to initial-frame-alist instead. See section `Command Arguments' in The GNU Emacs Manual.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003