aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey2005-07-06 01:41:56 +0000
committerKaroly Lorentey2005-07-06 01:41:56 +0000
commite519a50bf7b0d7074f07ce492abb3cd544f79f59 (patch)
tree7efd8903ced9bdd6829caf0c3ef45d0ce46d5af5 /src
parent626ea340bcdbe7ea4ea17b67ead430f2037ac69c (diff)
downloademacs-e519a50bf7b0d7074f07ce492abb3cd544f79f59.tar.gz
emacs-e519a50bf7b0d7074f07ce492abb3cd544f79f59.zip
Handle and document that `delete-frame' may call functions in `delete-frame-functions' twice.
* src/frame.c (syms_of_frame): Add warning to `delete-frame-functions' description. * lisp/frame.el (terminal-handle-delete-frame): Check that the frame is alive. * lisp/server.el (server-handle-delete-frame): Ditto. Remove bogus comment. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-375
Diffstat (limited to 'src')
-rw-r--r--src/frame.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/frame.c b/src/frame.c
index f32ad7a9363..8ebcbc90b15 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -4326,7 +4326,14 @@ when the mouse is over clickable text. */);
4326 DEFVAR_LISP ("delete-frame-functions", &Vdelete_frame_functions, 4326 DEFVAR_LISP ("delete-frame-functions", &Vdelete_frame_functions,
4327 doc: /* Functions to be run before deleting a frame. 4327 doc: /* Functions to be run before deleting a frame.
4328The functions are run with one arg, the frame to be deleted. 4328The functions are run with one arg, the frame to be deleted.
4329See `delete-frame'. */); 4329See `delete-frame'.
4330
4331Note that functions in this list may be called twice on the same
4332frame. In the second invocation, the frame is already deleted, and
4333the function should do nothing. (You can use `frame-live-p' to check
4334for this.) This wrinkle happens when an earlier function in
4335`delete-frame-functions' (indirectly) calls delete-frame
4336recursively. */);
4330 Vdelete_frame_functions = Qnil; 4337 Vdelete_frame_functions = Qnil;
4331 4338
4332 DEFVAR_KBOARD ("default-minibuffer-frame", Vdefault_minibuffer_frame, 4339 DEFVAR_KBOARD ("default-minibuffer-frame", Vdefault_minibuffer_frame,