From 33b2311e862c021a5dc956e2bc1335735bf8b8aa Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 30 Aug 2002 12:04:18 +0000 Subject: [PATCH] (Vblink_cursor_alist): Removed. (Qbar, Qhbar, Qbox, Qhollow): Removed. (syms_of_xfns): Don't intern, staticpro, or define them. (x_specified_cursor_type): Removed. (x_set_cursor_type): Use set_frame_cursor_types. --- src/xfns.c | 97 +----------------------------------------------------- 1 file changed, 1 insertion(+), 96 deletions(-) diff --git a/src/xfns.c b/src/xfns.c index 882d641e226..f3f16d4abe1 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -183,12 +183,8 @@ Lisp_Object Vx_bitmap_file_path; Lisp_Object Vx_pixel_size_width_font_regexp; -/* How to blink the cursor off. */ -Lisp_Object Vblink_cursor_alist; - Lisp_Object Qauto_raise; Lisp_Object Qauto_lower; -Lisp_Object Qbar, Qhbar, Qbox, Qhollow; Lisp_Object Qborder_color; Lisp_Object Qborder_width; Lisp_Object Qbox; @@ -1837,89 +1833,16 @@ x_set_border_pixel (f, pix) } -/* Value is the internal representation of the specified cursor type - ARG. If type is BAR_CURSOR, return in *WIDTH the specified width - of the bar cursor. */ - -enum text_cursor_kinds -x_specified_cursor_type (arg, width) - Lisp_Object arg; - int *width; -{ - enum text_cursor_kinds type; - - if (EQ (arg, Qbar)) - { - type = BAR_CURSOR; - *width = 2; - } - else if (CONSP (arg) - && EQ (XCAR (arg), Qbar) - && INTEGERP (XCDR (arg)) - && XINT (XCDR (arg)) >= 0) - { - type = BAR_CURSOR; - *width = XINT (XCDR (arg)); - } - else if (EQ (arg, Qhbar)) - { - type = HBAR_CURSOR; - *width = 2; - } - else if (CONSP (arg) - && EQ (XCAR (arg), Qhbar) - && INTEGERP (XCDR (arg)) - && XINT (XCDR (arg)) >= 0) - { - type = HBAR_CURSOR; - *width = XINT (XCDR (arg)); - } - else if (NILP (arg)) - type = NO_CURSOR; - else if (EQ (arg, Qbox)) - type = FILLED_BOX_CURSOR; - else - /* Treat anything unknown as "hollow box cursor". - It was bad to signal an error; people have trouble fixing - .Xdefaults with Emacs, when it has something bad in it. */ - type = HOLLOW_BOX_CURSOR; - - return type; -} void x_set_cursor_type (f, arg, oldval) FRAME_PTR f; Lisp_Object arg, oldval; { - int width; - Lisp_Object tem; - - FRAME_DESIRED_CURSOR (f) = x_specified_cursor_type (arg, &width); - f->output_data.x->cursor_width = width; + set_frame_cursor_types (f, arg); /* Make sure the cursor gets redrawn. */ cursor_type_changed = 1; - - /* By default, set up the blink-off state depending on the on-state. */ - - if (FRAME_DESIRED_CURSOR (f) == FILLED_BOX_CURSOR) - FRAME_BLINK_OFF_CURSOR (f) = HOLLOW_BOX_CURSOR; - else if (FRAME_DESIRED_CURSOR (f) == BAR_CURSOR && FRAME_CURSOR_WIDTH (f) > 1) - { - FRAME_BLINK_OFF_CURSOR (f) = BAR_CURSOR; - FRAME_BLINK_OFF_CURSOR_WIDTH (f) = 1; - } - else - FRAME_BLINK_OFF_CURSOR (f) = NO_CURSOR; - - tem = Fassoc (arg, Vblink_cursor_alist); - if (!NILP (tem)) - { - FRAME_BLINK_OFF_CURSOR (f) - = x_specified_cursor_type (XCDR (tem), &width); - f->output_data.x->blink_off_cursor_width = width; - } } void @@ -11867,20 +11790,10 @@ syms_of_xfns () staticpro (&Qauto_raise); Qauto_lower = intern ("auto-lower"); staticpro (&Qauto_lower); - Qbar = intern ("bar"); - staticpro (&Qbar); - Qhbar = intern ("hbar"); - staticpro (&Qhbar); - Qbox = intern ("box"); - staticpro (&Qbox); - Qhollow = intern ("hollow"); - staticpro (&Qhollow); Qborder_color = intern ("border-color"); staticpro (&Qborder_color); Qborder_width = intern ("border-width"); staticpro (&Qborder_width); - Qbox = intern ("box"); - staticpro (&Qbox); Qcursor_color = intern ("cursor-color"); staticpro (&Qcursor_color); Qcursor_type = intern ("cursor-type"); @@ -11985,14 +11898,6 @@ syms_of_xfns () init_x_parm_symbols (); - DEFVAR_LISP ("blink-cursor-alist", &Vblink_cursor_alist, - doc: /* Alist specifying how to blink the cursor off. -Each element has the form (ON-STATE . OFF-STATE). Whenever the -`cursor-type' frame-parameter or variable equals ON-STATE, -comparing using `equal', Emacs uses OFF-STATE to specify -how to blink it off. */); - Vblink_cursor_alist = Qnil; - DEFVAR_BOOL ("cross-disabled-images", &cross_disabled_images, doc: /* Non-nil means always draw a cross over disabled images. Disabled images are those having an `:conversion disabled' property. -- 2.39.2