aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Paul Wallington2002-10-02 08:28:17 +0000
committerJohn Paul Wallington2002-10-02 08:28:17 +0000
commitcd1d850fd1eef0e98a018c224ed2fe4852c17de3 (patch)
treea4f6b7270f76db85c354e95ce2fe591abefc4d90 /src
parenta1b4049dc24f9be1036b66a95c99c6257b8551f6 (diff)
downloademacs-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')
-rw-r--r--src/ChangeLog13
-rw-r--r--src/frame.c19
-rw-r--r--src/macfns.c5
-rw-r--r--src/w32fns.c5
-rw-r--r--src/xfns.c7
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 @@
12002-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
12002-09-30 Kenichi Handa <handa@m17n.org> 142002-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;
80Lisp_Object Vdefault_frame_alist; 80Lisp_Object Vdefault_frame_alist;
81Lisp_Object Vmouse_position_function; 81Lisp_Object Vmouse_position_function;
82Lisp_Object Vmouse_highlight; 82Lisp_Object Vmouse_highlight;
83Lisp_Object Vdelete_frame_functions;
83 84
84static void 85static void
85set_menu_bar_lines_1 (window, n) 86set_menu_bar_lines_1 (window, n)
@@ -1092,8 +1093,9 @@ A frame may not be deleted if its minibuffer is used by other frames.
1092Normally, you may not delete a frame if all other frames are invisible, 1093Normally, you may not delete a frame if all other frames are invisible,
1093but if the second optional argument FORCE is non-nil, you may do so. 1094but if the second optional argument FORCE is non-nil, you may do so.
1094 1095
1095This function runs `delete-frame-hook' before actually deleting the 1096This function runs `delete-frame-functions' before actually deleting the
1096frame. The hook is called with one argument FRAME. */) 1097frame, unless the frame is a tooltip.
1098The 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
2529when the mouse is over clickable text. */); 2532when 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.
2537The functions are run with one arg, the frame to be deleted.
2538See `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