diff options
| author | Gerd Moellmann | 2001-01-18 14:48:38 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-01-18 14:48:38 +0000 |
| commit | ae782866b6f5602ac113a7058feeb9b3b422d50a (patch) | |
| tree | d81b5e0d9c0b0d01f1e75e6a897f436448167665 /src | |
| parent | a93c8ba89a47e6cfe90be033c7183b2b746d7c9a (diff) | |
| download | emacs-ae782866b6f5602ac113a7058feeb9b3b422d50a.tar.gz emacs-ae782866b6f5602ac113a7058feeb9b3b422d50a.zip | |
(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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfns.c | 47 |
1 files 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; | |||
| 174 | 174 | ||
| 175 | Lisp_Object Vx_pixel_size_width_font_regexp; | 175 | Lisp_Object Vx_pixel_size_width_font_regexp; |
| 176 | 176 | ||
| 177 | /* Evaluate this expression to rebuild the section of syms_of_xfns | ||
| 178 | that initializes and staticpros the symbols declared below. Note | ||
| 179 | that Emacs 18 has a bug that keeps C-x C-e from being able to | ||
| 180 | evaluate this expression. | ||
| 181 | |||
| 182 | (progn | ||
| 183 | ;; Accumulate a list of the symbols we want to initialize from the | ||
| 184 | ;; declarations at the top of the file. | ||
| 185 | (goto-char (point-min)) | ||
| 186 | (search-forward "/\*&&& symbols declared here &&&*\/\n") | ||
| 187 | (let (symbol-list) | ||
| 188 | (while (looking-at "Lisp_Object \\(Q[a-z_]+\\)") | ||
| 189 | (setq symbol-list | ||
| 190 | (cons (buffer-substring (match-beginning 1) (match-end 1)) | ||
| 191 | symbol-list)) | ||
| 192 | (forward-line 1)) | ||
| 193 | (setq symbol-list (nreverse symbol-list)) | ||
| 194 | ;; Delete the section of syms_of_... where we initialize the symbols. | ||
| 195 | (search-forward "\n /\*&&& init symbols here &&&*\/\n") | ||
| 196 | (let ((start (point))) | ||
| 197 | (while (looking-at "^ Q") | ||
| 198 | (forward-line 2)) | ||
| 199 | (kill-region start (point))) | ||
| 200 | ;; Write a new symbol initialization section. | ||
| 201 | (while symbol-list | ||
| 202 | (insert (format " %s = intern (\"" (car symbol-list))) | ||
| 203 | (let ((start (point))) | ||
| 204 | (insert (substring (car symbol-list) 1)) | ||
| 205 | (subst-char-in-region start (point) ?_ ?-)) | ||
| 206 | (insert (format "\");\n staticpro (&%s);\n" (car symbol-list))) | ||
| 207 | (setq symbol-list (cdr symbol-list))))) | ||
| 208 | |||
| 209 | */ | ||
| 210 | |||
| 211 | /*&&& symbols declared here &&&*/ | ||
| 212 | Lisp_Object Qauto_raise; | 177 | Lisp_Object Qauto_raise; |
| 213 | Lisp_Object Qauto_lower; | 178 | Lisp_Object Qauto_lower; |
| 214 | Lisp_Object Qbar; | 179 | Lisp_Object Qbar; |
| @@ -243,7 +208,7 @@ Lisp_Object Quser_size; | |||
| 243 | extern Lisp_Object Qdisplay; | 208 | extern Lisp_Object Qdisplay; |
| 244 | Lisp_Object Qscroll_bar_foreground, Qscroll_bar_background; | 209 | Lisp_Object Qscroll_bar_foreground, Qscroll_bar_background; |
| 245 | Lisp_Object Qscreen_gamma, Qline_spacing, Qcenter; | 210 | Lisp_Object Qscreen_gamma, Qline_spacing, Qcenter; |
| 246 | Lisp_Object Qcompound_text; | 211 | Lisp_Object Qcompound_text, Qcancel_timer; |
| 247 | 212 | ||
| 248 | /* The below are defined in frame.c. */ | 213 | /* The below are defined in frame.c. */ |
| 249 | 214 | ||
| @@ -10805,7 +10770,11 @@ DY added (default is -10).") | |||
| 10805 | 10770 | ||
| 10806 | /* Only DX and DY have changed. */ | 10771 | /* Only DX and DY have changed. */ |
| 10807 | if (!NILP (tip_timer)) | 10772 | if (!NILP (tip_timer)) |
| 10808 | call1 (intern ("cancel-timer"), tip_timer); | 10773 | { |
| 10774 | Lisp_Object timer = tip_timer; | ||
| 10775 | tip_timer = Qnil; | ||
| 10776 | call1 (Qcancel_timer, timer); | ||
| 10777 | } | ||
| 10809 | 10778 | ||
| 10810 | BLOCK_INPUT; | 10779 | BLOCK_INPUT; |
| 10811 | compute_tip_xy (f, parms, dx, dy, &root_x, &root_y); | 10780 | compute_tip_xy (f, parms, dx, dy, &root_x, &root_y); |
| @@ -10948,7 +10917,7 @@ Value is t is tooltip was open, nil otherwise.") | |||
| 10948 | specbind (Qinhibit_quit, Qt); | 10917 | specbind (Qinhibit_quit, Qt); |
| 10949 | 10918 | ||
| 10950 | if (!NILP (timer)) | 10919 | if (!NILP (timer)) |
| 10951 | call1 (intern ("cancel-timer"), timer); | 10920 | call1 (Qcancel_timer, timer); |
| 10952 | 10921 | ||
| 10953 | if (FRAMEP (frame)) | 10922 | if (FRAMEP (frame)) |
| 10954 | { | 10923 | { |
| @@ -11339,6 +11308,8 @@ syms_of_xfns () | |||
| 11339 | staticpro (&Qcenter); | 11308 | staticpro (&Qcenter); |
| 11340 | Qcompound_text = intern ("compound-text"); | 11309 | Qcompound_text = intern ("compound-text"); |
| 11341 | staticpro (&Qcompound_text); | 11310 | staticpro (&Qcompound_text); |
| 11311 | Qcancel_timer = intern ("cancel-timer"); | ||
| 11312 | staticpro (&Qcancel_timer); | ||
| 11342 | /* This is the end of symbol initialization. */ | 11313 | /* This is the end of symbol initialization. */ |
| 11343 | 11314 | ||
| 11344 | /* Text property `display' should be nonsticky by default. */ | 11315 | /* Text property `display' should be nonsticky by default. */ |