diff options
| author | Martin Rudalics | 2017-09-25 10:09:32 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2017-09-25 10:09:32 +0200 |
| commit | dc6b3560e56c83b3e3191a3d95d31fe288181742 (patch) | |
| tree | 998a37d181ebc8cca660d0851261a5d404165159 /doc | |
| parent | 3d3778d82a87139ef50a24146f5bad2a57a82094 (diff) | |
| download | emacs-dc6b3560e56c83b3e3191a3d95d31fe288181742.tar.gz emacs-dc6b3560e56c83b3e3191a3d95d31fe288181742.zip | |
Fix documentation of `make-frame' and related variables and hooks
* lisp/frame.el (before-make-frame-hook)
(after-make-frame-functions, frame-inherited-parameters)
(make-frame): Fix doc-strings.
* doc/lispref/frames.texi (Creating Frames): Fix description
of `make-frame' and related variables and hooks.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/frames.texi | 58 |
1 files changed, 34 insertions, 24 deletions
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 6431bbdedb9..f66ecee8e8e 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi | |||
| @@ -112,37 +112,39 @@ window of another Emacs frame. @xref{Child Frames}. | |||
| 112 | * Display Feature Testing:: Determining the features of a terminal. | 112 | * Display Feature Testing:: Determining the features of a terminal. |
| 113 | @end menu | 113 | @end menu |
| 114 | 114 | ||
| 115 | |||
| 115 | @node Creating Frames | 116 | @node Creating Frames |
| 116 | @section Creating Frames | 117 | @section Creating Frames |
| 117 | @cindex frame creation | 118 | @cindex frame creation |
| 118 | 119 | ||
| 119 | To create a new frame, call the function @code{make-frame}. | 120 | To create a new frame, call the function @code{make-frame}. |
| 120 | 121 | ||
| 121 | @deffn Command make-frame &optional alist | 122 | @deffn Command make-frame &optional parameters |
| 122 | This function creates and returns a new frame, displaying the current | 123 | This function creates and returns a new frame, displaying the current |
| 123 | buffer. | 124 | buffer. |
| 124 | 125 | ||
| 125 | The @var{alist} argument is an alist that specifies frame parameters | 126 | The @var{parameters} argument is an alist that specifies frame |
| 126 | for the new frame. @xref{Frame Parameters}. If you specify the | 127 | parameters for the new frame. @xref{Frame Parameters}. If you specify |
| 127 | @code{terminal} parameter in @var{alist}, the new frame is created on | 128 | the @code{terminal} parameter in @var{parameters}, the new frame is |
| 128 | that terminal. Otherwise, if you specify the @code{window-system} | 129 | created on that terminal. Otherwise, if you specify the |
| 129 | frame parameter in @var{alist}, that determines whether the frame | 130 | @code{window-system} frame parameter in @var{parameters}, that |
| 130 | should be displayed on a text terminal or a graphical terminal. | 131 | determines whether the frame should be displayed on a text terminal or a |
| 131 | @xref{Window Systems}. If neither is specified, the new frame is | 132 | graphical terminal. @xref{Window Systems}. If neither is specified, |
| 132 | created in the same terminal as the selected frame. | 133 | the new frame is created in the same terminal as the selected frame. |
| 133 | 134 | ||
| 134 | Any parameters not mentioned in @var{alist} default to the values in | 135 | Any parameters not mentioned in @var{parameters} default to the values |
| 135 | the alist @code{default-frame-alist} (@pxref{Initial Parameters}); | 136 | in the alist @code{default-frame-alist} (@pxref{Initial Parameters}); |
| 136 | parameters not specified there default from the X resources or its | 137 | parameters not specified there default from the X resources or its |
| 137 | equivalent on your operating system (@pxref{X Resources,, X Resources, | 138 | equivalent on your operating system (@pxref{X Resources,, X Resources, |
| 138 | emacs, The GNU Emacs Manual}). After the frame is created, Emacs | 139 | emacs, The GNU Emacs Manual}). After the frame is created, this |
| 139 | applies any parameters listed in @code{frame-inherited-parameters} | 140 | function applies any parameters specified in |
| 140 | (see below) and not present in the argument, taking the values from | 141 | @code{frame-inherited-parameters} (see below) it has no assigned yet, |
| 141 | the frame that was selected when @code{make-frame} was called. | 142 | taking the values from the frame that was selected when |
| 143 | @code{make-frame} was called. | ||
| 142 | 144 | ||
| 143 | Note that on multi-monitor displays (@pxref{Multiple Terminals}), the | 145 | Note that on multi-monitor displays (@pxref{Multiple Terminals}), the |
| 144 | window manager might position the frame differently than specified by | 146 | window manager might position the frame differently than specified by |
| 145 | the positional parameters in @var{alist} (@pxref{Position | 147 | the positional parameters in @var{parameters} (@pxref{Position |
| 146 | Parameters}). For example, some window managers have a policy of | 148 | Parameters}). For example, some window managers have a policy of |
| 147 | displaying the frame on the monitor that contains the largest part of | 149 | displaying the frame on the monitor that contains the largest part of |
| 148 | the window (a.k.a.@: the @dfn{dominating} monitor). | 150 | the window (a.k.a.@: the @dfn{dominating} monitor). |
| @@ -158,20 +160,28 @@ A normal hook run by @code{make-frame} before it creates the frame. | |||
| 158 | @end defvar | 160 | @end defvar |
| 159 | 161 | ||
| 160 | @defvar after-make-frame-functions | 162 | @defvar after-make-frame-functions |
| 161 | An abnormal hook run by @code{make-frame} after it creates the frame. | 163 | An abnormal hook run by @code{make-frame} after it created the frame. |
| 162 | Each function in @code{after-make-frame-functions} receives one argument, the | 164 | Each function in @code{after-make-frame-functions} receives one |
| 163 | frame just created. | 165 | argument, the frame just created. |
| 164 | @end defvar | 166 | @end defvar |
| 165 | 167 | ||
| 168 | Note that any functions added to these hooks by your initial file are | ||
| 169 | usually not run for the initial frame, since Emacs reads the initial | ||
| 170 | file only after creating that frame. However, if the initial frame is | ||
| 171 | specified to use a separate minibuffer frame (@pxref{Minibuffers and | ||
| 172 | Frames}), the functions will be run for both, the minibuffer-less and | ||
| 173 | the minibuffer frame. | ||
| 174 | |||
| 166 | @defvar frame-inherited-parameters | 175 | @defvar frame-inherited-parameters |
| 167 | This variable specifies the list of frame parameters that a newly | 176 | This variable specifies the list of frame parameters that a newly |
| 168 | created frame inherits from the currently selected frame. For each | 177 | created frame inherits from the currently selected frame. For each |
| 169 | parameter (a symbol) that is an element in the list and is not present | 178 | parameter (a symbol) that is an element in this list and has not been |
| 170 | in the argument to @code{make-frame}, the function sets the value of | 179 | assigned earlier when processing @code{make-frame}, the function sets |
| 171 | that parameter in the created frame to its value in the selected | 180 | the value of that parameter in the created frame to its value in the |
| 172 | frame. | 181 | selected frame. |
| 173 | @end defvar | 182 | @end defvar |
| 174 | 183 | ||
| 184 | |||
| 175 | @node Multiple Terminals | 185 | @node Multiple Terminals |
| 176 | @section Multiple Terminals | 186 | @section Multiple Terminals |
| 177 | @cindex multiple terminals | 187 | @cindex multiple terminals |