From: Gerd Moellmann Date: Wed, 8 Mar 2000 14:48:16 +0000 (+0000) Subject: (x_set_cursor_type): If ARG is nil, give frame no cursor. X-Git-Tag: emacs-pretest-21.0.90~4725 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=08ac8554879dbb254972cc7e40e0ec62d807a533;p=emacs.git (x_set_cursor_type): If ARG is nil, give frame no cursor. --- diff --git a/src/xfns.c b/src/xfns.c index 7f88e227034..0282f651d0e 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1695,12 +1695,16 @@ x_set_cursor_type (f, arg, oldval) FRAME_DESIRED_CURSOR (f) = BAR_CURSOR; f->output_data.x->cursor_width = 2; } - else if (CONSP (arg) && EQ (XCAR (arg), Qbar) - && INTEGERP (XCDR (arg))) + else if (CONSP (arg) + && EQ (XCAR (arg), Qbar) + && INTEGERP (XCDR (arg)) + && XINT (XCDR (arg)) >= 0) { FRAME_DESIRED_CURSOR (f) = BAR_CURSOR; f->output_data.x->cursor_width = XINT (XCDR (arg)); } + else if (NILP (arg)) + FRAME_DESIRED_CURSOR (f) = NO_CURSOR; else /* Treat anything unknown as "box cursor". It was bad to signal an error; people have trouble fixing