diff options
| author | Karoly Lorentey | 2005-07-06 01:41:56 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-07-06 01:41:56 +0000 |
| commit | e519a50bf7b0d7074f07ce492abb3cd544f79f59 (patch) | |
| tree | 7efd8903ced9bdd6829caf0c3ef45d0ce46d5af5 /src | |
| parent | 626ea340bcdbe7ea4ea17b67ead430f2037ac69c (diff) | |
| download | emacs-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.c | 9 |
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. |
| 4328 | The functions are run with one arg, the frame to be deleted. | 4328 | The functions are run with one arg, the frame to be deleted. |
| 4329 | See `delete-frame'. */); | 4329 | See `delete-frame'. |
| 4330 | |||
| 4331 | Note that functions in this list may be called twice on the same | ||
| 4332 | frame. In the second invocation, the frame is already deleted, and | ||
| 4333 | the function should do nothing. (You can use `frame-live-p' to check | ||
| 4334 | for this.) This wrinkle happens when an earlier function in | ||
| 4335 | `delete-frame-functions' (indirectly) calls delete-frame | ||
| 4336 | recursively. */); | ||
| 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, |