From c0006262e9007a4b8b5df498982b12743b072ddb Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Tue, 12 Dec 2000 11:38:41 +0000 Subject: (Fx_hide_tip): Simplified. --- src/ChangeLog | 2 ++ src/xfns.c | 33 ++++++++++++--------------------- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0f8c6810431..e500e14ffe2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2000-12-12 Gerd Moellmann + * xfns.c (Fx_hide_tip): Simplified. + * s/freebsd.h, s/netbsd.h (GC_MARK_STACK): Use GC_MAKE_GCPROS_NOOPS instead of `1'. diff --git a/src/xfns.c b/src/xfns.c index 930269c738f..bd83ce671c9 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -10751,39 +10751,29 @@ Value is t is tooltip was open, nil otherwise.") () { int count; - Lisp_Object deleted; + Lisp_Object deleted, frame, timer; + struct gcpro gcpro1, gcpro2; /* Return quickly if nothing to do. */ - if (NILP (tip_timer) && !FRAMEP (tip_frame)) + if (NILP (tip_timer) && NILP (tip_frame)) return Qnil; + frame = tip_frame; + timer = tip_timer; + GCPRO2 (frame, timer); + tip_frame = tip_timer = deleted = Qnil; + count = BINDING_STACK_SIZE (); - deleted = Qnil; specbind (Qinhibit_redisplay, Qt); specbind (Qinhibit_quit, Qt); - if (!NILP (tip_timer)) - { - Lisp_Object tem; - struct gcpro gcpro1; - tem = tip_timer; - GCPRO1 (tem); - tip_timer = Qnil; - call1 (intern ("cancel-timer"), tem); - UNGCPRO; - } + if (!NILP (timer)) + call1 (intern ("cancel-timer"), timer); - if (FRAMEP (tip_frame)) + if (FRAMEP (frame)) { - Lisp_Object frame; - struct gcpro gcpro1; - - frame = tip_frame; - GCPRO1 (frame); - tip_frame = Qnil; Fdelete_frame (frame, Qnil); deleted = Qt; - UNGCPRO; #ifdef USE_LUCID /* Bloodcurdling hack alert: The Lucid menu bar widget's @@ -10805,6 +10795,7 @@ Value is t is tooltip was open, nil otherwise.") #endif /* USE_LUCID */ } + UNGCPRO; return unbind_to (count, deleted); } -- cgit v1.2.1