diff options
| author | Kim F. Storm | 2002-08-30 12:03:01 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2002-08-30 12:03:01 +0000 |
| commit | 50e363e6cbd1bc10ea7da5d7d1fdeda38b3d0dc8 (patch) | |
| tree | fad9c9d21a538263ade0c8052cfe530654a7f4fb /src | |
| parent | bd59ac2c02356237441a2a9f1d668337a3964bc5 (diff) | |
| download | emacs-50e363e6cbd1bc10ea7da5d7d1fdeda38b3d0dc8.tar.gz emacs-50e363e6cbd1bc10ea7da5d7d1fdeda38b3d0dc8.zip | |
(Vblink_cursor_alist): Removed.
(Qbar, Qhbar, Qbox, Qhollow): Removed.
(syms_of_w32fns): Don't intern, staticpro, or define them.
(x_specified_cursor_type): Removed.
(x_set_cursor_type): Use set_frame_cursor_types.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32fns.c | 95 |
1 files changed, 1 insertions, 94 deletions
diff --git a/src/w32fns.c b/src/w32fns.c index 9901734a4eb..6bc51d638dd 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -202,12 +202,8 @@ Lisp_Object Vw32_charset_info_alist; | |||
| 202 | #define VIETNAMESE_CHARSET 163 | 202 | #define VIETNAMESE_CHARSET 163 |
| 203 | #endif | 203 | #endif |
| 204 | 204 | ||
| 205 | /* How to blink the cursor off. */ | ||
| 206 | Lisp_Object Vblink_cursor_alist; | ||
| 207 | |||
| 208 | Lisp_Object Qauto_raise; | 205 | Lisp_Object Qauto_raise; |
| 209 | Lisp_Object Qauto_lower; | 206 | Lisp_Object Qauto_lower; |
| 210 | Lisp_Object Qbar, Qhbar, Qbox, Qhollow; | ||
| 211 | Lisp_Object Qborder_color; | 207 | Lisp_Object Qborder_color; |
| 212 | Lisp_Object Qborder_width; | 208 | Lisp_Object Qborder_width; |
| 213 | Lisp_Object Qbox; | 209 | Lisp_Object Qbox; |
| @@ -2350,90 +2346,17 @@ x_set_border_color (f, arg, oldval) | |||
| 2350 | update_face_from_frame_parameter (f, Qborder_color, arg); | 2346 | update_face_from_frame_parameter (f, Qborder_color, arg); |
| 2351 | } | 2347 | } |
| 2352 | 2348 | ||
| 2353 | /* Value is the internal representation of the specified cursor type | ||
| 2354 | ARG. If type is BAR_CURSOR, return in *WIDTH the specified width | ||
| 2355 | of the bar cursor. */ | ||
| 2356 | |||
| 2357 | enum text_cursor_kinds | ||
| 2358 | x_specified_cursor_type (arg, width) | ||
| 2359 | Lisp_Object arg; | ||
| 2360 | int *width; | ||
| 2361 | { | ||
| 2362 | enum text_cursor_kinds type; | ||
| 2363 | |||
| 2364 | if (EQ (arg, Qbar)) | ||
| 2365 | { | ||
| 2366 | type = BAR_CURSOR; | ||
| 2367 | *width = 2; | ||
| 2368 | } | ||
| 2369 | else if (CONSP (arg) | ||
| 2370 | && EQ (XCAR (arg), Qbar) | ||
| 2371 | && INTEGERP (XCDR (arg)) | ||
| 2372 | && XINT (XCDR (arg)) >= 0) | ||
| 2373 | { | ||
| 2374 | type = BAR_CURSOR; | ||
| 2375 | *width = XINT (XCDR (arg)); | ||
| 2376 | } | ||
| 2377 | else if (EQ (arg, Qhbar)) | ||
| 2378 | { | ||
| 2379 | type = HBAR_CURSOR; | ||
| 2380 | *width = 2; | ||
| 2381 | } | ||
| 2382 | else if (CONSP (arg) | ||
| 2383 | && EQ (XCAR (arg), Qhbar) | ||
| 2384 | && INTEGERP (XCDR (arg)) | ||
| 2385 | && XINT (XCDR (arg)) >= 0) | ||
| 2386 | { | ||
| 2387 | type = HBAR_CURSOR; | ||
| 2388 | *width = XINT (XCDR (arg)); | ||
| 2389 | } | ||
| 2390 | else if (NILP (arg)) | ||
| 2391 | type = NO_CURSOR; | ||
| 2392 | else if (EQ (arg, Qbox)) | ||
| 2393 | type = FILLED_BOX_CURSOR; | ||
| 2394 | else | ||
| 2395 | /* Treat anything unknown as "hollow box cursor". | ||
| 2396 | It was bad to signal an error; people have trouble fixing | ||
| 2397 | .Xdefaults with Emacs, when it has something bad in it. */ | ||
| 2398 | type = HOLLOW_BOX_CURSOR; | ||
| 2399 | |||
| 2400 | return type; | ||
| 2401 | } | ||
| 2402 | 2349 | ||
| 2403 | void | 2350 | void |
| 2404 | x_set_cursor_type (f, arg, oldval) | 2351 | x_set_cursor_type (f, arg, oldval) |
| 2405 | FRAME_PTR f; | 2352 | FRAME_PTR f; |
| 2406 | Lisp_Object arg, oldval; | 2353 | Lisp_Object arg, oldval; |
| 2407 | { | 2354 | { |
| 2408 | int width; | 2355 | set_frame_cursor_types (f, arg); |
| 2409 | Lisp_Object tem; | ||
| 2410 | |||
| 2411 | FRAME_DESIRED_CURSOR (f) = x_specified_cursor_type (arg, &width); | ||
| 2412 | f->output_data.w32->cursor_width = width; | ||
| 2413 | 2356 | ||
| 2414 | /* Make sure the cursor gets redrawn. This is overkill, but how | 2357 | /* Make sure the cursor gets redrawn. This is overkill, but how |
| 2415 | often do people change cursor types? */ | 2358 | often do people change cursor types? */ |
| 2416 | update_mode_lines++; | 2359 | update_mode_lines++; |
| 2417 | |||
| 2418 | /* By default, set up the blink-off state depending on the on-state. */ | ||
| 2419 | |||
| 2420 | if (FRAME_DESIRED_CURSOR (f) == FILLED_BOX_CURSOR) | ||
| 2421 | FRAME_BLINK_OFF_CURSOR (f) = HOLLOW_BOX_CURSOR; | ||
| 2422 | else if (FRAME_DESIRED_CURSOR (f) == BAR_CURSOR && FRAME_CURSOR_WIDTH (f) > 1) | ||
| 2423 | { | ||
| 2424 | FRAME_BLINK_OFF_CURSOR (f) = BAR_CURSOR; | ||
| 2425 | FRAME_BLINK_OFF_CURSOR_WIDTH (f) = 1; | ||
| 2426 | } | ||
| 2427 | else | ||
| 2428 | FRAME_BLINK_OFF_CURSOR (f) = NO_CURSOR; | ||
| 2429 | |||
| 2430 | tem = Fassoc (arg, Vblink_cursor_alist); | ||
| 2431 | if (!NILP (tem)) | ||
| 2432 | { | ||
| 2433 | FRAME_BLINK_OFF_CURSOR (f) | ||
| 2434 | = x_specified_cursor_type (XCDR (tem), &width); | ||
| 2435 | f->output_data.w32->blink_off_cursor_width = width; | ||
| 2436 | } | ||
| 2437 | } | 2360 | } |
| 2438 | 2361 | ||
| 2439 | void | 2362 | void |
| @@ -14892,14 +14815,6 @@ syms_of_w32fns () | |||
| 14892 | staticpro (&Qauto_raise); | 14815 | staticpro (&Qauto_raise); |
| 14893 | Qauto_lower = intern ("auto-lower"); | 14816 | Qauto_lower = intern ("auto-lower"); |
| 14894 | staticpro (&Qauto_lower); | 14817 | staticpro (&Qauto_lower); |
| 14895 | Qbar = intern ("bar"); | ||
| 14896 | staticpro (&Qbar); | ||
| 14897 | Qhbar = intern ("hbar"); | ||
| 14898 | staticpro (&Qhbar); | ||
| 14899 | Qbox = intern ("box"); | ||
| 14900 | staticpro (&Qbox); | ||
| 14901 | Qhollow = intern ("hollow"); | ||
| 14902 | staticpro (&Qhollow); | ||
| 14903 | Qborder_color = intern ("border-color"); | 14818 | Qborder_color = intern ("border-color"); |
| 14904 | staticpro (&Qborder_color); | 14819 | staticpro (&Qborder_color); |
| 14905 | Qborder_width = intern ("border-width"); | 14820 | Qborder_width = intern ("border-width"); |
| @@ -15140,14 +15055,6 @@ system to handle them. */); | |||
| 15140 | 15055 | ||
| 15141 | init_x_parm_symbols (); | 15056 | init_x_parm_symbols (); |
| 15142 | 15057 | ||
| 15143 | DEFVAR_LISP ("blink-cursor-alist", &Vblink_cursor_alist, | ||
| 15144 | doc: /* Alist specifying how to blink the cursor off. | ||
| 15145 | Each element has the form (ON-STATE . OFF-STATE). Whenever the | ||
| 15146 | `cursor-type' frame-parameter or variable equals ON-STATE, | ||
| 15147 | comparing using `equal', Emacs uses OFF-STATE to specify | ||
| 15148 | how to blink it off. */); | ||
| 15149 | Vblink_cursor_alist = Qnil; | ||
| 15150 | |||
| 15151 | DEFVAR_LISP ("x-bitmap-file-path", &Vx_bitmap_file_path, | 15058 | DEFVAR_LISP ("x-bitmap-file-path", &Vx_bitmap_file_path, |
| 15152 | doc: /* List of directories to search for bitmap files for w32. */); | 15059 | doc: /* List of directories to search for bitmap files for w32. */); |
| 15153 | Vx_bitmap_file_path = decode_env_path ((char *) 0, "PATH"); | 15060 | Vx_bitmap_file_path = decode_env_path ((char *) 0, "PATH"); |