changeset 34476:329225ae6b61

(Fx_hide_tip): Simplified.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 12 Dec 2000 11:38:14 +0000
parents 0cb6f08c40bd
children 73b00b4dd2a6
files src/xfns.c
diffstat 1 files changed, 14 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfns.c	Tue Dec 12 10:38:08 2000 +0000
+++ b/src/xfns.c	Tue Dec 12 11:38:14 2000 +0000
@@ -10751,39 +10751,29 @@
   ()
 {
   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 (FRAMEP (tip_frame))
-    {
-      Lisp_Object frame;
-      struct gcpro gcpro1;
-
-      frame = tip_frame;
-      GCPRO1 (frame);
-      tip_frame = Qnil;
+  if (!NILP (timer))
+    call1 (intern ("cancel-timer"), timer);
+
+  if (FRAMEP (frame))
+    {
       Fdelete_frame (frame, Qnil);
       deleted = Qt;
-      UNGCPRO;
 
 #ifdef USE_LUCID
       /* Bloodcurdling hack alert: The Lucid menu bar widget's
@@ -10805,6 +10795,7 @@
 #endif /* USE_LUCID */
     }
 
+  UNGCPRO;
   return unbind_to (count, deleted);
 }