# HG changeset patch # User Richard M. Stallman # Date 792754934 0 # Node ID e4d6f6f1fc1787f3d2a2be78510a15a435afad8f # Parent 2bbb48f3dd0cc993596f2b5be6e91d01c75e33c5 (x_set_cursor_type): Set cursor_width field. Handle args of form (bar . WIDTH). diff -r 2bbb48f3dd0c -r e4d6f6f1fc17 src/xfns.c --- a/src/xfns.c Tue Feb 14 09:41:37 1995 +0000 +++ b/src/xfns.c Tue Feb 14 09:42:14 1995 +0000 @@ -1305,19 +1305,21 @@ Lisp_Object arg, oldval; { if (EQ (arg, Qbar)) - FRAME_DESIRED_CURSOR (f) = bar_cursor; + { + FRAME_DESIRED_CURSOR (f) = bar_cursor; + f->display.x->cursor_width = 2; + } + else if (CONSP (arg) && EQ (XCONS (arg)->car, Qbar) + && INTEGERP (XCONS (arg)->cdr)) + { + FRAME_DESIRED_CURSOR (f) = bar_cursor; + f->display.x->cursor_width = XINT (XCONS (arg)->cdr); + } else -#if 0 - if (EQ (arg, Qbox)) -#endif - FRAME_DESIRED_CURSOR (f) = filled_box_cursor; - /* Error messages commented out because people have trouble fixing - .Xdefaults with Emacs, when it has something bad in it. */ -#if 0 - else - error - ("the `cursor-type' frame parameter should be either `bar' or `box'"); -#endif + /* Treat anything unknown as "box cursor". + It was bad to signal an error; people have trouble fixing + .Xdefaults with Emacs, when it has something bad in it. */ + FRAME_DESIRED_CURSOR (f) = filled_box_cursor; /* Make sure the cursor gets redrawn. This is overkill, but how often do people change cursor types? */