aboutsummaryrefslogtreecommitdiffstats
path: root/mac/src
diff options
context:
space:
mode:
authorAndrew Choi2000-12-12 04:50:33 +0000
committerAndrew Choi2000-12-12 04:50:33 +0000
commitec5c56845cee284751af9d2ca9ed6404afc22c5b (patch)
tree90075e5ed06d220cd00d59e4ece493d926396837 /mac/src
parentd00b5871254062628661828cd53bd0bf9ec96ac7 (diff)
downloademacs-ec5c56845cee284751af9d2ca9ed6404afc22c5b.tar.gz
emacs-ec5c56845cee284751af9d2ca9ed6404afc22c5b.zip
* src/macfns.c (x_create_tip_frame, Fx_hide_tip): change to handle
Lisp_Object type tip_frame (was struct frame *) as in xfns.c.
Diffstat (limited to 'mac/src')
-rw-r--r--mac/src/macfns.c39
1 files changed, 27 insertions, 12 deletions
diff --git a/mac/src/macfns.c b/mac/src/macfns.c
index bb3ba197cac..490da7979fe 100644
--- a/mac/src/macfns.c
+++ b/mac/src/macfns.c
@@ -8970,7 +8970,7 @@ static Lisp_Object x_create_tip_frame P_ ((struct w32_display_info *,
8970 8970
8971/* The frame of a currently visible tooltip, or null. */ 8971/* The frame of a currently visible tooltip, or null. */
8972 8972
8973struct frame *tip_frame; 8973Lisp_Object tip_frame;
8974 8974
8975/* If non-nil, a timer started that hides the last tooltip when it 8975/* If non-nil, a timer started that hides the last tooltip when it
8976 fires. */ 8976 fires. */
@@ -9272,7 +9272,7 @@ TIMEOUT nil means use the default timeout of 5 seconds.")
9272 /* Create a frame for the tooltip, and record it in the global 9272 /* Create a frame for the tooltip, and record it in the global
9273 variable tip_frame. */ 9273 variable tip_frame. */
9274 frame = x_create_tip_frame (FRAME_MAC_DISPLAY_INFO (f), parms); 9274 frame = x_create_tip_frame (FRAME_MAC_DISPLAY_INFO (f), parms);
9275 tip_frame = f = XFRAME (frame); 9275 f = XFRAME (frame);
9276 9276
9277 /* Set up the frame's root window. Currently we use a size of 80 9277 /* Set up the frame's root window. Currently we use a size of 80
9278 columns x 40 lines. If someone wants to show a larger tip, he 9278 columns x 40 lines. If someone wants to show a larger tip, he
@@ -9363,28 +9363,43 @@ DEFUN ("x-hide-tip", Fx_hide_tip, Sx_hide_tip, 0, 0, 0,
9363Value is t is tooltip was open, nil otherwise.") 9363Value is t is tooltip was open, nil otherwise.")
9364 () 9364 ()
9365{ 9365{
9366 int count = specpdl_ptr - specpdl; 9366 int count;
9367 int deleted_p = 0; 9367 Lisp_Object deleted;
9368
9369 /* Return quickly if nothing to do. */
9370 if (NILP (tip_timer) && !FRAMEP (tip_frame))
9371 return Qnil;
9368 9372
9373 count = BINDING_STACK_SIZE ();
9374 deleted = Qnil;
9369 specbind (Qinhibit_redisplay, Qt); 9375 specbind (Qinhibit_redisplay, Qt);
9376 specbind (Qinhibit_quit, Qt);
9370 9377
9371 if (!NILP (tip_timer)) 9378 if (!NILP (tip_timer))
9372 { 9379 {
9373 call1 (intern ("cancel-timer"), tip_timer); 9380 Lisp_Object tem;
9381 struct gcpro gcpro1;
9382 tem = tip_timer;
9383 GCPRO1 (tem);
9374 tip_timer = Qnil; 9384 tip_timer = Qnil;
9385 call1 (intern ("cancel-timer"), tem);
9386 UNGCPRO;
9375 } 9387 }
9376 9388
9377 if (tip_frame) 9389 if (FRAMEP (tip_frame))
9378 { 9390 {
9379 Lisp_Object frame; 9391 Lisp_Object frame;
9380 9392 struct gcpro gcpro1;
9381 XSETFRAME (frame, tip_frame); 9393
9382 Fdelete_frame (frame, Qt); 9394 frame = tip_frame;
9383 tip_frame = NULL; 9395 GCPRO1 (frame);
9384 deleted_p = 1; 9396 tip_frame = Qnil;
9397 Fdelete_frame (frame, Qnil);
9398 deleted = Qt;
9399 UNGCPRO;
9385 } 9400 }
9386 9401
9387 return unbind_to (count, deleted_p ? Qt : Qnil); 9402 return unbind_to (count, deleted);
9388} 9403}
9389 9404
9390 9405