Mercurial > emacs
comparison src/xfns.c @ 34476:329225ae6b61
(Fx_hide_tip): Simplified.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Tue, 12 Dec 2000 11:38:14 +0000 |
parents | e381d256c0c2 |
children | d069886667e6 |
comparison
equal
deleted
inserted
replaced
34475:0cb6f08c40bd | 34476:329225ae6b61 |
---|---|
10749 "Hide the current tooltip window, if there is any.\n\ | 10749 "Hide the current tooltip window, if there is any.\n\ |
10750 Value is t is tooltip was open, nil otherwise.") | 10750 Value is t is tooltip was open, nil otherwise.") |
10751 () | 10751 () |
10752 { | 10752 { |
10753 int count; | 10753 int count; |
10754 Lisp_Object deleted; | 10754 Lisp_Object deleted, frame, timer; |
10755 struct gcpro gcpro1, gcpro2; | |
10755 | 10756 |
10756 /* Return quickly if nothing to do. */ | 10757 /* Return quickly if nothing to do. */ |
10757 if (NILP (tip_timer) && !FRAMEP (tip_frame)) | 10758 if (NILP (tip_timer) && NILP (tip_frame)) |
10758 return Qnil; | 10759 return Qnil; |
10759 | 10760 |
10761 frame = tip_frame; | |
10762 timer = tip_timer; | |
10763 GCPRO2 (frame, timer); | |
10764 tip_frame = tip_timer = deleted = Qnil; | |
10765 | |
10760 count = BINDING_STACK_SIZE (); | 10766 count = BINDING_STACK_SIZE (); |
10761 deleted = Qnil; | |
10762 specbind (Qinhibit_redisplay, Qt); | 10767 specbind (Qinhibit_redisplay, Qt); |
10763 specbind (Qinhibit_quit, Qt); | 10768 specbind (Qinhibit_quit, Qt); |
10764 | 10769 |
10765 if (!NILP (tip_timer)) | 10770 if (!NILP (timer)) |
10766 { | 10771 call1 (intern ("cancel-timer"), timer); |
10767 Lisp_Object tem; | 10772 |
10768 struct gcpro gcpro1; | 10773 if (FRAMEP (frame)) |
10769 tem = tip_timer; | 10774 { |
10770 GCPRO1 (tem); | |
10771 tip_timer = Qnil; | |
10772 call1 (intern ("cancel-timer"), tem); | |
10773 UNGCPRO; | |
10774 } | |
10775 | |
10776 if (FRAMEP (tip_frame)) | |
10777 { | |
10778 Lisp_Object frame; | |
10779 struct gcpro gcpro1; | |
10780 | |
10781 frame = tip_frame; | |
10782 GCPRO1 (frame); | |
10783 tip_frame = Qnil; | |
10784 Fdelete_frame (frame, Qnil); | 10775 Fdelete_frame (frame, Qnil); |
10785 deleted = Qt; | 10776 deleted = Qt; |
10786 UNGCPRO; | |
10787 | 10777 |
10788 #ifdef USE_LUCID | 10778 #ifdef USE_LUCID |
10789 /* Bloodcurdling hack alert: The Lucid menu bar widget's | 10779 /* Bloodcurdling hack alert: The Lucid menu bar widget's |
10790 redisplay procedure is not called when a tip frame over menu | 10780 redisplay procedure is not called when a tip frame over menu |
10791 items is unmapped. Redisplay the menu manually... */ | 10781 items is unmapped. Redisplay the menu manually... */ |
10803 } | 10793 } |
10804 } | 10794 } |
10805 #endif /* USE_LUCID */ | 10795 #endif /* USE_LUCID */ |
10806 } | 10796 } |
10807 | 10797 |
10798 UNGCPRO; | |
10808 return unbind_to (count, deleted); | 10799 return unbind_to (count, deleted); |
10809 } | 10800 } |
10810 | 10801 |
10811 | 10802 |
10812 | 10803 |