elisp: Parameter Access
28.4.1 Access to Frame Parameters
---------------------------------
These functions let you read and change the parameter values of a frame.
-- Function: frame-parameter frame parameter
This function returns the value of the parameter PARAMETER (a
symbol) of FRAME. If FRAME is ‘nil’, it returns the selected
frame’s parameter. If FRAME has no setting for PARAMETER, this
function returns ‘nil’.
-- Function: frame-parameters &optional frame
The function ‘frame-parameters’ returns an alist listing all the
parameters of FRAME and their values. If FRAME is ‘nil’ or
omitted, this returns the selected frame’s parameters
-- Function: modify-frame-parameters frame alist
This function alters the frame FRAME based on the elements of
ALIST. Each element of ALIST has the form ‘(PARM . VALUE)’, where
PARM is a symbol naming a parameter. If you don’t mention a
parameter in ALIST, its value doesn’t change. If FRAME is ‘nil’,
it defaults to the selected frame.
Some parameters are only meaningful for frames on certain kinds of
display (Frames). If ALIST includes parameters that are
not meaningful for the FRAME’s display, this function will change
its value in the frame’s parameter list, but will otherwise ignore
it.
When ALIST specifies more than one parameter whose value can affect
the new size of FRAME, the final size of the frame may differ
according to the toolkit used. For example, specifying that a
frame should from now on have a menu and/or tool bar instead of
none and simultaneously specifying the new height of the frame will
inevitably lead to a recalculation of the frame’s height.
Conceptually, in such case, this function will try to have the
explicit height specification prevail. It cannot be excluded,
however, that the addition (or removal) of the menu or tool bar,
when eventually performed by the toolkit, will defeat this
intention.
Frame Resizing::) to a non-‘nil’ value around calls to this
function may fix the problem sketched here. Sometimes, however,
exactly such binding may be hit by the problem.
-- Function: set-frame-parameter frame parm value
This function sets the frame parameter PARM to the specified VALUE.
If FRAME is ‘nil’, it defaults to the selected frame.
-- Function: modify-all-frames-parameters alist
This function alters the frame parameters of all existing frames
according to ALIST, then modifies ‘default-frame-alist’ (and, if
necessary, ‘initial-frame-alist’) to apply the same parameter
values to frames that will be created henceforth.