diff options
| author | Eli Zaretskii | 2021-12-07 19:57:14 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2021-12-07 19:57:14 +0200 |
| commit | 8f7da3ecb5e9d03b776a7c6caeb5c76e9ef680dc (patch) | |
| tree | 0d56e8cb344be39fca672ba987acb547fc795d0d | |
| parent | 77a30e1e88daed4cb47fd567dcae25a260eb1ef2 (diff) | |
| download | emacs-8f7da3ecb5e9d03b776a7c6caeb5c76e9ef680dc.tar.gz emacs-8f7da3ecb5e9d03b776a7c6caeb5c76e9ef680dc.zip | |
Improve before-make-frame-hook and after-make-frame-functions docs.
* lisp/frame.el (before-make-frame-hook)
(after-make-frame-functions):
* doc/lispref/frames.texi (Creating Frames): Mention that these
functions will be run for the initial frame only if added to the
hook in early-init file. (Bug#38143)
| -rw-r--r-- | doc/lispref/frames.texi | 4 | ||||
| -rw-r--r-- | lisp/frame.el | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 923ff19997e..00332fed0bf 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi | |||
| @@ -171,7 +171,9 @@ usually not run for the initial frame, since Emacs reads the initial | |||
| 171 | file only after creating that frame. However, if the initial frame is | 171 | file only after creating that frame. However, if the initial frame is |
| 172 | specified to use a separate minibuffer frame (@pxref{Minibuffers and | 172 | specified to use a separate minibuffer frame (@pxref{Minibuffers and |
| 173 | Frames}), the functions will be run for both, the minibuffer-less and | 173 | Frames}), the functions will be run for both, the minibuffer-less and |
| 174 | the minibuffer frame. | 174 | the minibuffer frame. Alternatively, you can add functions to these |
| 175 | hooks in your ``early init file'' (@pxref{Init File}), in which case | ||
| 176 | they will be in effect for the initial frame as well. | ||
| 175 | 177 | ||
| 176 | @defvar frame-inherited-parameters | 178 | @defvar frame-inherited-parameters |
| 177 | This variable specifies the list of frame parameters that a newly | 179 | This variable specifies the list of frame parameters that a newly |
diff --git a/lisp/frame.el b/lisp/frame.el index 1319759e74d..dc7c628e81e 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -808,12 +808,16 @@ also select the new frame." | |||
| 808 | new-frame)) | 808 | new-frame)) |
| 809 | 809 | ||
| 810 | (defvar before-make-frame-hook nil | 810 | (defvar before-make-frame-hook nil |
| 811 | "Functions to run before `make-frame' creates a new frame.") | 811 | "Functions to run before `make-frame' creates a new frame. |
| 812 | Note that these functions are usually not run for the initial | ||
| 813 | frame, unless you add them to the hook in your early-init file.") | ||
| 812 | 814 | ||
| 813 | (defvar after-make-frame-functions nil | 815 | (defvar after-make-frame-functions nil |
| 814 | "Functions to run after `make-frame' created a new frame. | 816 | "Functions to run after `make-frame' created a new frame. |
| 815 | The functions are run with one argument, the newly created | 817 | The functions are run with one argument, the newly created |
| 816 | frame.") | 818 | frame. |
| 819 | Note that these functions are usually not run for the initial | ||
| 820 | frame, unless you add them to the hook in your early-init file.") | ||
| 817 | 821 | ||
| 818 | (defvar after-setting-font-hook nil | 822 | (defvar after-setting-font-hook nil |
| 819 | "Functions to run after a frame's font has been changed.") | 823 | "Functions to run after a frame's font has been changed.") |