From ae782866b6f5602ac113a7058feeb9b3b422d50a Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Thu, 18 Jan 2001 14:48:38 +0000 Subject: [PATCH] (Qcancel_timer): New variable. (syms_of_xfns): Initialize and staticpro it. (Fx_hide_tip, Fx_show_tip): Use it. (Fx_show_tip): Make sure to set tip_timer to nil when canceling the timer. (toplevel): Lisp code for generating parts of syms_of_xfns removed. --- src/xfns.c | 47 +++++++++-------------------------------------- 1 file changed, 9 insertions(+), 38 deletions(-) diff --git a/src/xfns.c b/src/xfns.c index a0abfc1ee64..02c3ded61d8 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -174,41 +174,6 @@ Lisp_Object Vx_bitmap_file_path; Lisp_Object Vx_pixel_size_width_font_regexp; -/* Evaluate this expression to rebuild the section of syms_of_xfns - that initializes and staticpros the symbols declared below. Note - that Emacs 18 has a bug that keeps C-x C-e from being able to - evaluate this expression. - -(progn - ;; Accumulate a list of the symbols we want to initialize from the - ;; declarations at the top of the file. - (goto-char (point-min)) - (search-forward "/\*&&& symbols declared here &&&*\/\n") - (let (symbol-list) - (while (looking-at "Lisp_Object \\(Q[a-z_]+\\)") - (setq symbol-list - (cons (buffer-substring (match-beginning 1) (match-end 1)) - symbol-list)) - (forward-line 1)) - (setq symbol-list (nreverse symbol-list)) - ;; Delete the section of syms_of_... where we initialize the symbols. - (search-forward "\n /\*&&& init symbols here &&&*\/\n") - (let ((start (point))) - (while (looking-at "^ Q") - (forward-line 2)) - (kill-region start (point))) - ;; Write a new symbol initialization section. - (while symbol-list - (insert (format " %s = intern (\"" (car symbol-list))) - (let ((start (point))) - (insert (substring (car symbol-list) 1)) - (subst-char-in-region start (point) ?_ ?-)) - (insert (format "\");\n staticpro (&%s);\n" (car symbol-list))) - (setq symbol-list (cdr symbol-list))))) - - */ - -/*&&& symbols declared here &&&*/ Lisp_Object Qauto_raise; Lisp_Object Qauto_lower; Lisp_Object Qbar; @@ -243,7 +208,7 @@ Lisp_Object Quser_size; extern Lisp_Object Qdisplay; Lisp_Object Qscroll_bar_foreground, Qscroll_bar_background; Lisp_Object Qscreen_gamma, Qline_spacing, Qcenter; -Lisp_Object Qcompound_text; +Lisp_Object Qcompound_text, Qcancel_timer; /* The below are defined in frame.c. */ @@ -10805,7 +10770,11 @@ DY added (default is -10).") /* Only DX and DY have changed. */ if (!NILP (tip_timer)) - call1 (intern ("cancel-timer"), tip_timer); + { + Lisp_Object timer = tip_timer; + tip_timer = Qnil; + call1 (Qcancel_timer, timer); + } BLOCK_INPUT; compute_tip_xy (f, parms, dx, dy, &root_x, &root_y); @@ -10948,7 +10917,7 @@ Value is t is tooltip was open, nil otherwise.") specbind (Qinhibit_quit, Qt); if (!NILP (timer)) - call1 (intern ("cancel-timer"), timer); + call1 (Qcancel_timer, timer); if (FRAMEP (frame)) { @@ -11339,6 +11308,8 @@ syms_of_xfns () staticpro (&Qcenter); Qcompound_text = intern ("compound-text"); staticpro (&Qcompound_text); + Qcancel_timer = intern ("cancel-timer"); + staticpro (&Qcancel_timer); /* This is the end of symbol initialization. */ /* Text property `display' should be nonsticky by default. */ -- 2.39.5