[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 8f7da3e: Improve before-make-frame-hook and after-make-frame-func
From: |
Eli Zaretskii |
Subject: |
master 8f7da3e: Improve before-make-frame-hook and after-make-frame-functions docs. |
Date: |
Tue, 7 Dec 2021 12:57:56 -0500 (EST) |
branch: master
commit 8f7da3ecb5e9d03b776a7c6caeb5c76e9ef680dc
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
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)
---
doc/lispref/frames.texi | 4 +++-
lisp/frame.el | 8 ++++++--
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index 923ff19..00332fe 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
file only after creating that frame. However, if the initial frame is
specified to use a separate minibuffer frame (@pxref{Minibuffers and
Frames}), the functions will be run for both, the minibuffer-less and
-the minibuffer frame.
+the minibuffer frame. Alternatively, you can add functions to these
+hooks in your ``early init file'' (@pxref{Init File}), in which case
+they will be in effect for the initial frame as well.
@defvar frame-inherited-parameters
This variable specifies the list of frame parameters that a newly
diff --git a/lisp/frame.el b/lisp/frame.el
index 1319759..dc7c628 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -808,12 +808,16 @@ also select the new frame."
new-frame))
(defvar before-make-frame-hook nil
- "Functions to run before `make-frame' creates a new frame.")
+ "Functions to run before `make-frame' creates a new frame.
+Note that these functions are usually not run for the initial
+frame, unless you add them to the hook in your early-init file.")
(defvar after-make-frame-functions nil
"Functions to run after `make-frame' created a new frame.
The functions are run with one argument, the newly created
-frame.")
+frame.
+Note that these functions are usually not run for the initial
+frame, unless you add them to the hook in your early-init file.")
(defvar after-setting-font-hook nil
"Functions to run after a frame's font has been changed.")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 8f7da3e: Improve before-make-frame-hook and after-make-frame-functions docs.,
Eli Zaretskii <=