aboutsummaryrefslogtreecommitdiffstats
path: root/src/frame.c
diff options
context:
space:
mode:
authorKaroly Lorentey <[email protected]>2005-07-06 01:41:56 +0000
committerKaroly Lorentey <[email protected]>2005-07-06 01:41:56 +0000
commite519a50bf7b0d7074f07ce492abb3cd544f79f59 (patch)
tree7efd8903ced9bdd6829caf0c3ef45d0ce46d5af5 /src/frame.c
parent626ea340bcdbe7ea4ea17b67ead430f2037ac69c (diff)
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: [email protected]/emacs--multi-tty--0--patch-375
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/frame.c b/src/frame.c
index f32ad7a936..8ebcbc90b1 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -4326,7 +4326,14 @@ when the mouse is over clickable text. */);
DEFVAR_LISP ("delete-frame-functions", &Vdelete_frame_functions,
doc: /* Functions to be run before deleting a frame.
The functions are run with one arg, the frame to be deleted.
-See `delete-frame'. */);
+See `delete-frame'.
+
+Note that functions in this list may be called twice on the same
+frame. In the second invocation, the frame is already deleted, and
+the function should do nothing. (You can use `frame-live-p' to check
+for this.) This wrinkle happens when an earlier function in
+`delete-frame-functions' (indirectly) calls delete-frame
+recursively. */);
Vdelete_frame_functions = Qnil;
DEFVAR_KBOARD ("default-minibuffer-frame", Vdefault_minibuffer_frame,