emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Choice for not using hollow box cursor


From: Tak Ota
Subject: Re: Choice for not using hollow box cursor
Date: Sat, 23 Mar 2002 12:45:56 -0800 (PST)

13 Mar 2002 14:48:35 +0100: address@hidden (Kim F. Storm) wrote:

> Richard Stallman <address@hidden> writes:
> 
> >     Shouldn't it be the user choice? (the choice: blink between filled box
> >     and hollow box or blink between filled box and blank).
> > 
> > Is this user option really necessary?  We should not add a new user
> > option just because its definition is meaningful and *someone* might
> > want it, because that would make Emacs even more bloated.  We have to
> > *try* to keep the growth of user options in check, by adding only
> > those that are substantially important--those that we expect
> > more than a few users would want.
> 
> There is already one user option: Turn off the blinking cursor.

I have been thinking how to achieve what I want without introducing a
new option.  I want the cursor to be blinking because it is easy to
find it at a glance.  But I don't want the hollow box cursor while it
blinks because it really obscures the character beneath it on my
display.

By default the hollow box cursor is used in non-selected buffers also,
so I turn it off by setting `cursor-in-non-selected-windows' to nil
as well.

I wonder if it is an acceptable behavior to disable hollow box cursor
when `cursor-in-non-selected-windows' is nil?  I tried it and found
that it intuitively and visually made sense (although the logic is a
little bit mixed up) since `cursor-in-non-selected-windows' controls
the appearance/disappearance of hollow box cursor both in the selected
window and non-selected windows all together.

The patch for this is quite simple.  Could you try and feel it?

-Tak

*** ../../tmp/emacs-21.2.50/src/xterm.c Fri Mar 22 07:52:48 2002
--- xterm.c     Sat Mar 23 12:10:11 2002
***************
*** 11662,11668 ****
                                                       &new_cursor_width);
          if (w->cursor_off_p)
            {
!             if (new_cursor_type == FILLED_BOX_CURSOR)
                new_cursor_type = HOLLOW_BOX_CURSOR;
              else if (new_cursor_type == BAR_CURSOR && new_cursor_width > 1)
                new_cursor_width = 1;
--- 11662,11668 ----
                                                       &new_cursor_width);
          if (w->cursor_off_p)
            {
!             if (new_cursor_type == FILLED_BOX_CURSOR && cursor_non_selected)
                new_cursor_type = HOLLOW_BOX_CURSOR;
              else if (new_cursor_type == BAR_CURSOR && new_cursor_width > 1)
                new_cursor_width = 1;
address@hidden src]$ diff -c ../../tmp/emacs-21.2.50/src/w32term.c w32term.c
*** ../../tmp/emacs-21.2.50/src/w32term.c       Fri Mar 22 20:58:02 2002
--- w32term.c   Sat Mar 23 12:09:10 2002
***************
*** 9772,9778 ****
                                                       &new_cursor_width);
          if (w->cursor_off_p)
            {
!             if (new_cursor_type == FILLED_BOX_CURSOR)
                new_cursor_type = HOLLOW_BOX_CURSOR;
              else if (new_cursor_type == BAR_CURSOR && new_cursor_width > 1)
                new_cursor_width = 1;
--- 9772,9778 ----
                                                       &new_cursor_width);
          if (w->cursor_off_p)
            {
!             if (new_cursor_type == FILLED_BOX_CURSOR && cursor_non_selected)
                new_cursor_type = HOLLOW_BOX_CURSOR;
              else if (new_cursor_type == BAR_CURSOR && new_cursor_width > 1)
                new_cursor_width = 1;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]