aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorEli Zaretskii2018-03-10 13:48:49 +0200
committerEli Zaretskii2018-03-10 13:48:49 +0200
commita8be860e17e2a737bda7a4c5075b71f0fb627a92 (patch)
tree3e972e54fd96c0f671778d56a304ab6352182c04 /doc
parentbbf53d99b57bd3d7fc0427d378df2efc6fa10e00 (diff)
downloademacs-a8be860e17e2a737bda7a4c5075b71f0fb627a92.tar.gz
emacs-a8be860e17e2a737bda7a4c5075b71f0fb627a92.zip
Improve support for desktop restoration in daemon mode
* lisp/server.el (server-after-make-frame-hook): New hook. (server-execute): Call it after creating a new frame or before switching to a buffer shown in a client frame. (Bug#30421) * doc/emacs/misc.texi (Saving Emacs Sessions): Adjust advice for restoring desktop in daemon mode to the new hook. * doc/lispref/frames.texi (Creating Frames, Standard Hooks): Document server-after-make-frame-hook. * etc/NEWS: Mention server-after-make-frame-hook.
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/misc.texi2
-rw-r--r--doc/lispref/frames.texi6
-rw-r--r--doc/lispref/hooks.texi1
3 files changed, 8 insertions, 1 deletions
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 60986347a71..68bd308983f 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -2529,7 +2529,7 @@ e.g., the daemon cannot use GUI features, so parameters such as frame
2529position, size, and decorations cannot be restored. For that reason, 2529position, size, and decorations cannot be restored. For that reason,
2530you may wish to delay restoring the desktop in daemon mode until the 2530you may wish to delay restoring the desktop in daemon mode until the
2531first client connects, by calling @code{desktop-read} in a hook 2531first client connects, by calling @code{desktop-read} in a hook
2532function that you add to @code{after-make-frame-functions} 2532function that you add to @code{server-after-make-frame-hook}
2533(@pxref{Creating Frames,,, elisp, The Emacs Lisp Reference Manual}). 2533(@pxref{Creating Frames,,, elisp, The Emacs Lisp Reference Manual}).
2534 2534
2535@node Recursive Edit 2535@node Recursive Edit
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index 2f9bb398865..459f05cb1c9 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -181,6 +181,12 @@ the value of that parameter in the created frame to its value in the
181selected frame. 181selected frame.
182@end defvar 182@end defvar
183 183
184@defopt server-after-make-frame-hook
185A normal hook run when the Emacs server creates a client frame. When
186this hook is called, the created frame is the selected one.
187@xref{Emacs Server,,, emacs, The GNU Emacs Manual}.
188@end defopt
189
184 190
185@node Multiple Terminals 191@node Multiple Terminals
186@section Multiple Terminals 192@section Multiple Terminals
diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi
index db4e413921f..e374d02defb 100644
--- a/doc/lispref/hooks.texi
+++ b/doc/lispref/hooks.texi
@@ -66,6 +66,7 @@ not exactly a hook, but does a similar job.
66 66
67@item after-make-frame-functions 67@item after-make-frame-functions
68@itemx before-make-frame-hook 68@itemx before-make-frame-hook
69@itemx server-after-make-frame-hook
69@xref{Creating Frames}. 70@xref{Creating Frames}.
70 71
71@c Not general enough? 72@c Not general enough?