1 |
@c -*-texinfo-*- |
@c -*-texinfo-*- |
2 |
@c This is part of the GNU Emacs Lisp Reference Manual. |
@c This is part of the GNU Emacs Lisp Reference Manual. |
3 |
@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999 |
@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2004 |
4 |
@c Free Software Foundation, Inc. |
@c Free Software Foundation, Inc. |
5 |
@c See the file elisp.texi for copying conditions. |
@c See the file elisp.texi for copying conditions. |
6 |
@setfilename ../info/os |
@setfilename ../info/os |
2062 |
@code{emacs-save-session-functions}. Each function in this hook is |
@code{emacs-save-session-functions}. Each function in this hook is |
2063 |
called when the session manager tells Emacs that the window system is |
called when the session manager tells Emacs that the window system is |
2064 |
shutting down. The functions are called with the current buffer set |
shutting down. The functions are called with the current buffer set |
2065 |
to a temporary buffer. Each functions can use @code{insert} to add |
to a temporary buffer. Each function can use @code{insert} to add |
2066 |
Lisp code to this buffer. At the end, Emacs saves the buffer in a |
Lisp code to this buffer. At the end, Emacs saves the buffer in a |
2067 |
file that Emacs will load in order to restart the saved session. |
file that another Emacs will later load in order to restart the saved session. |
2068 |
|
|
2069 |
If a function in @code{emacs-save-session-functions} returns |
If a function in @code{emacs-save-session-functions} returns |
2070 |
non-@code{nil}, Emacs tells the session manager to cancel the |
non-@code{nil}, Emacs tells the session manager to cancel the |
2071 |
shutdown. |
shutdown. |
2072 |
@end defvar |
@end defvar |
2073 |
|
|
2074 |
Here is an example that just inserts some text into *scratch* when |
Here is an example that just inserts some text into @samp{*scratch*} when |
2075 |
Emacs is restarted by the session manager. |
Emacs is restarted by the session manager. |
2076 |
|
|
2077 |
@example |
@example |