diff options
| author | John Paul Wallington | 2002-10-02 08:28:17 +0000 |
|---|---|---|
| committer | John Paul Wallington | 2002-10-02 08:28:17 +0000 |
| commit | cd1d850fd1eef0e98a018c224ed2fe4852c17de3 (patch) | |
| tree | a4f6b7270f76db85c354e95ce2fe591abefc4d90 /src/frame.c | |
| parent | a1b4049dc24f9be1036b66a95c99c6257b8551f6 (diff) | |
| download | emacs-cd1d850fd1eef0e98a018c224ed2fe4852c17de3.tar.gz emacs-cd1d850fd1eef0e98a018c224ed2fe4852c17de3.zip | |
* frame.c (Vdelete_frame_functions): New variable.
(syms_of_frame): Initialize and defvar it.
(Fdelete_frame): Use it instead of delete-frame-hook. Don't run
it when frame's `tooltip' parameter is non-nil.
* xfns.c (x_create_tip_frame): Set `tooltip' frame parameter to t.
* w32fns.c (x_create_tip_frame): Likewise
* macfns.c (x_create_tip_frame): Likewise.
Diffstat (limited to 'src/frame.c')
| -rw-r--r-- | src/frame.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/frame.c b/src/frame.c index ffd0c5ade10..b8fb2e1546d 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -80,6 +80,7 @@ Lisp_Object Vterminal_frame; | |||
| 80 | Lisp_Object Vdefault_frame_alist; | 80 | Lisp_Object Vdefault_frame_alist; |
| 81 | Lisp_Object Vmouse_position_function; | 81 | Lisp_Object Vmouse_position_function; |
| 82 | Lisp_Object Vmouse_highlight; | 82 | Lisp_Object Vmouse_highlight; |
| 83 | Lisp_Object Vdelete_frame_functions; | ||
| 83 | 84 | ||
| 84 | static void | 85 | static void |
| 85 | set_menu_bar_lines_1 (window, n) | 86 | set_menu_bar_lines_1 (window, n) |
| @@ -1092,8 +1093,9 @@ A frame may not be deleted if its minibuffer is used by other frames. | |||
| 1092 | Normally, you may not delete a frame if all other frames are invisible, | 1093 | Normally, you may not delete a frame if all other frames are invisible, |
| 1093 | but if the second optional argument FORCE is non-nil, you may do so. | 1094 | but if the second optional argument FORCE is non-nil, you may do so. |
| 1094 | 1095 | ||
| 1095 | This function runs `delete-frame-hook' before actually deleting the | 1096 | This function runs `delete-frame-functions' before actually deleting the |
| 1096 | frame. The hook is called with one argument FRAME. */) | 1097 | frame, unless the frame is a tooltip. |
| 1098 | The functions are run with one arg, the frame to be deleted. */) | ||
| 1097 | (frame, force) | 1099 | (frame, force) |
| 1098 | Lisp_Object frame, force; | 1100 | Lisp_Object frame, force; |
| 1099 | { | 1101 | { |
| @@ -1152,11 +1154,12 @@ frame. The hook is called with one argument FRAME. */) | |||
| 1152 | } | 1154 | } |
| 1153 | } | 1155 | } |
| 1154 | 1156 | ||
| 1155 | /* Run `delete-frame-hook'. */ | 1157 | /* Run `delete-frame-functions' unless frame is a tooltip. */ |
| 1156 | if (!NILP (Vrun_hooks)) | 1158 | if (!NILP (Vrun_hooks) |
| 1159 | && NILP (Fframe_parameter (frame, intern ("tooltip")))) | ||
| 1157 | { | 1160 | { |
| 1158 | Lisp_Object args[2]; | 1161 | Lisp_Object args[2]; |
| 1159 | args[0] = intern ("delete-frame-hook"); | 1162 | args[0] = intern ("delete-frame-functions"); |
| 1160 | args[1] = frame; | 1163 | args[1] = frame; |
| 1161 | Frun_hook_with_args (2, args); | 1164 | Frun_hook_with_args (2, args); |
| 1162 | } | 1165 | } |
| @@ -2529,6 +2532,12 @@ is over the clickable text. However, the mouse shape still indicates | |||
| 2529 | when the mouse is over clickable text. */); | 2532 | when the mouse is over clickable text. */); |
| 2530 | Vmouse_highlight = Qt; | 2533 | Vmouse_highlight = Qt; |
| 2531 | 2534 | ||
| 2535 | DEFVAR_LISP ("delete-frame-functions", &Vdelete_frame_functions, | ||
| 2536 | doc: /* Functions to be run before deleting a frame. | ||
| 2537 | The functions are run with one arg, the frame to be deleted. | ||
| 2538 | See `delete-frame'. */); | ||
| 2539 | Vdelete_frame_functions = Qnil; | ||
| 2540 | |||
| 2532 | DEFVAR_KBOARD ("default-minibuffer-frame", Vdefault_minibuffer_frame, | 2541 | DEFVAR_KBOARD ("default-minibuffer-frame", Vdefault_minibuffer_frame, |
| 2533 | doc: /* Minibufferless frames use this frame's minibuffer. | 2542 | doc: /* Minibufferless frames use this frame's minibuffer. |
| 2534 | 2543 | ||