diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 13 | ||||
| -rw-r--r-- | src/frame.c | 19 | ||||
| -rw-r--r-- | src/macfns.c | 5 | ||||
| -rw-r--r-- | src/w32fns.c | 5 | ||||
| -rw-r--r-- | src/xfns.c | 7 |
5 files changed, 43 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 05d56cc6b42..e7055f1af2a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2002-10-02 John Paul Wallington <jpw@shootybangbang.com> | ||
| 2 | |||
| 3 | * frame.c (Vdelete_frame_functions): New variable. | ||
| 4 | (syms_of_frame): Initialize and defvar it. | ||
| 5 | (Fdelete_frame): Use it instead of delete-frame-hook. Don't run | ||
| 6 | it when frame's `tooltip' parameter is non-nil. | ||
| 7 | |||
| 8 | * xfns.c (x_create_tip_frame): Set `tooltip' frame parameter to t. | ||
| 9 | |||
| 10 | * w32fns.c (x_create_tip_frame): Likewise | ||
| 11 | |||
| 12 | * macfns.c (x_create_tip_frame): Likewise. | ||
| 13 | |||
| 1 | 2002-09-30 Kenichi Handa <handa@m17n.org> | 14 | 2002-09-30 Kenichi Handa <handa@m17n.org> |
| 2 | 15 | ||
| 3 | * xterm.c (x_encode_char): For DIM=1 charset, set ccl->reg[2] to | 16 | * xterm.c (x_encode_char): For DIM=1 charset, set ccl->reg[2] to |
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 | ||
diff --git a/src/macfns.c b/src/macfns.c index 49e4aad78ca..f1e42d17aec 100644 --- a/src/macfns.c +++ b/src/macfns.c | |||
| @@ -9471,6 +9471,11 @@ x_create_tip_frame (dpyinfo, parms) | |||
| 9471 | f->height = 0; | 9471 | f->height = 0; |
| 9472 | SET_FRAME_WIDTH (f, 0); | 9472 | SET_FRAME_WIDTH (f, 0); |
| 9473 | change_frame_size (f, height, width, 1, 0, 0); | 9473 | change_frame_size (f, height, width, 1, 0, 0); |
| 9474 | |||
| 9475 | /* Add `tooltip' frame parameter's default value. */ | ||
| 9476 | if (NILP (Fframe_parameter (frame, intern ("tooltip")))) | ||
| 9477 | Fmodify_frame_parameters (frame, Fcons (Fcons (intern ("tooltip"), Qt), | ||
| 9478 | Qnil)); | ||
| 9474 | 9479 | ||
| 9475 | f->no_split = 1; | 9480 | f->no_split = 1; |
| 9476 | 9481 | ||
diff --git a/src/w32fns.c b/src/w32fns.c index 574b321a932..2e0352ab68a 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -13812,6 +13812,11 @@ x_create_tip_frame (dpyinfo, parms, text) | |||
| 13812 | SET_FRAME_WIDTH (f, 0); | 13812 | SET_FRAME_WIDTH (f, 0); |
| 13813 | change_frame_size (f, height, width, 1, 0, 0); | 13813 | change_frame_size (f, height, width, 1, 0, 0); |
| 13814 | 13814 | ||
| 13815 | /* Add `tooltip' frame parameter's default value. */ | ||
| 13816 | if (NILP (Fframe_parameter (frame, intern ("tooltip")))) | ||
| 13817 | Fmodify_frame_parameters (frame, Fcons (Fcons (intern ("tooltip"), Qt), | ||
| 13818 | Qnil)); | ||
| 13819 | |||
| 13815 | /* Set up faces after all frame parameters are known. This call | 13820 | /* Set up faces after all frame parameters are known. This call |
| 13816 | also merges in face attributes specified for new frames. | 13821 | also merges in face attributes specified for new frames. |
| 13817 | 13822 | ||
diff --git a/src/xfns.c b/src/xfns.c index 2703565dbeb..c20c0d0480d 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -11143,7 +11143,12 @@ x_create_tip_frame (dpyinfo, parms, text) | |||
| 11143 | f->height = 0; | 11143 | f->height = 0; |
| 11144 | SET_FRAME_WIDTH (f, 0); | 11144 | SET_FRAME_WIDTH (f, 0); |
| 11145 | change_frame_size (f, height, width, 1, 0, 0); | 11145 | change_frame_size (f, height, width, 1, 0, 0); |
| 11146 | 11146 | ||
| 11147 | /* Add `tooltip' frame parameter's default value. */ | ||
| 11148 | if (NILP (Fframe_parameter (frame, intern ("tooltip")))) | ||
| 11149 | Fmodify_frame_parameters (frame, Fcons (Fcons (intern ("tooltip"), Qt), | ||
| 11150 | Qnil)); | ||
| 11151 | |||
| 11147 | /* Set up faces after all frame parameters are known. This call | 11152 | /* Set up faces after all frame parameters are known. This call |
| 11148 | also merges in face attributes specified for new frames. | 11153 | also merges in face attributes specified for new frames. |
| 11149 | 11154 | ||