[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]]
From: |
Kim F. Storm |
Subject: |
Re: address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]] |
Date: |
27 Aug 2002 17:56:51 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
address@hidden (Gerd Moellmann) writes:
> Gerd Moellmann <address@hidden> writes:
>
> P.S.
>
> Can I now have the 21.2 cursor shapes back, as I requested a couple of
> times? The new cursor shapes for the off-state of the blinking cursor
> and in non-selected windows drive me up the wall. Why was that change
> made, for heaven's sake?
>
Try this patch [X version only, but easily ported to mac and w32].
It changes cursor-in-non-selected-windows to a lisp object with
(almost) same values as cursor-type, and adds alternative-cursor-type
for the "off-state" of the blinking cursor.
Anyone else think this is nice to have?
Index: dispextern.h
===================================================================
RCS file: /cvs/emacs/src/dispextern.h,v
retrieving revision 1.137
diff -c -r1.137 dispextern.h
*** dispextern.h 16 Jul 2002 19:48:08 -0000 1.137
--- dispextern.h 27 Aug 2002 14:48:45 -0000
***************
*** 2268,2274 ****
extern void add_to_log P_ ((char *, Lisp_Object, Lisp_Object));
extern int help_echo_showing_p;
extern int current_mode_line_height, current_header_line_height;
! extern int cursor_in_non_selected_windows;
/* Defined in sysdep.c */
--- 2268,2275 ----
extern void add_to_log P_ ((char *, Lisp_Object, Lisp_Object));
extern int help_echo_showing_p;
extern int current_mode_line_height, current_header_line_height;
! extern Lisp_Object Vcursor_in_non_selected_windows;
! extern Lisp_Object Valternate_cursor_type;
/* Defined in sysdep.c */
Index: lisp.h
===================================================================
RCS file: /cvs/emacs/src/lisp.h,v
retrieving revision 1.438
diff -c -r1.438 lisp.h
*** lisp.h 14 Aug 2002 10:35:03 -0000 1.438
--- lisp.h 27 Aug 2002 14:48:45 -0000
***************
*** 2364,2369 ****
--- 2364,2370 ----
extern Lisp_Object Qinhibit_eval_during_redisplay;
extern Lisp_Object Qmessage_truncate_lines;
extern Lisp_Object Qcursor_in_non_selected_windows;
+ extern Lisp_Object Qalternate_cursor_type;
extern Lisp_Object Vmessage_log_max;
extern int message_enable_multibyte;
extern Lisp_Object echo_area_buffer[2];
Index: xdisp.c
===================================================================
RCS file: /cvs/emacs/src/xdisp.c,v
retrieving revision 1.778
diff -c -r1.778 xdisp.c
*** xdisp.c 27 Aug 2002 00:59:55 -0000 1.778
--- xdisp.c 27 Aug 2002 14:48:46 -0000
***************
*** 528,539 ****
static int message_cleared_p;
! /* Non-zero means we want a hollow cursor in windows that are not
! selected. Zero means there's no cursor in such windows. */
! int cursor_in_non_selected_windows;
Lisp_Object Qcursor_in_non_selected_windows;
/* A scratch glyph row with contents used for generating truncation
glyphs. Also used in direct_output_for_insert. */
--- 528,547 ----
static int message_cleared_p;
! /* Specifies the cursor type to display in windows that are not
! selected. t means we want a hollow cursor in such windows.
! nil means there's no cursor in such windows. */
! Lisp_Object Vcursor_in_non_selected_windows;
Lisp_Object Qcursor_in_non_selected_windows;
+ /* Specifies the desired cursor-type to use to show the blinking
+ cursor off state and cursor shown in non-selected windows.
+ t means to use the default. */
+
+ Lisp_Object Valternate_cursor_type;
+ Lisp_Object Qalternate_cursor_type;
+
/* A scratch glyph row with contents used for generating truncation
glyphs. Also used in direct_output_for_insert. */
***************
*** 15293,15298 ****
--- 15301,15308 ----
staticpro (&Qmessage_truncate_lines);
Qcursor_in_non_selected_windows = intern ("cursor-in-non-selected-windows");
staticpro (&Qcursor_in_non_selected_windows);
+ Qalternate_cursor_type = intern ("alternate-cursor-type");
+ staticpro (&Qalternate_cursor_type);
Qgrow_only = intern ("grow-only");
staticpro (&Qgrow_only);
Qinhibit_menubar_update = intern ("inhibit-menubar-update");
***************
*** 15513,15523 ****
go back to their normal size. */);
Vresize_mini_windows = Qgrow_only;
! DEFVAR_BOOL ("cursor-in-non-selected-windows",
! &cursor_in_non_selected_windows,
! doc: /* *Non-nil means display a hollow cursor in non-selected windows.
! nil means don't display a cursor there. */);
! cursor_in_non_selected_windows = 1;
DEFVAR_BOOL ("auto-hscroll-mode", &automatic_hscrolling_p,
doc: /* *Non-nil means scroll the display automatically to make point
visible. */);
--- 15523,15538 ----
go back to their normal size. */);
Vresize_mini_windows = Qgrow_only;
! DEFVAR_LISP ("cursor-in-non-selected-windows",
! &Vcursor_in_non_selected_windows,
! doc: /* *Cursor type to display in non-selected windows.
! t means display a hollow cursor in non-selected windows, nil means
! don't display a cursor there. See `cursor-type' for other values. */);
! Vcursor_in_non_selected_windows = Qt;
!
! DEFVAR_LISP ("alternate-cursor-type", &Valternate_cursor_type,
! doc: /* *Cursor type displayed in the blinking cursor off state. */);
! Valternate_cursor_type = Qt;
DEFVAR_BOOL ("auto-hscroll-mode", &automatic_hscrolling_p,
doc: /* *Non-nil means scroll the display automatically to make point
visible. */);
Index: xterm.c
===================================================================
RCS file: /cvs/emacs/src/xterm.c,v
retrieving revision 1.750
diff -c -r1.750 xterm.c
*** xterm.c 14 Aug 2002 00:59:01 -0000 1.750
--- xterm.c 27 Aug 2002 14:48:47 -0000
***************
*** 11808,11813 ****
--- 11808,11814 ----
int on, hpos, vpos, x, y;
{
struct frame *f = XFRAME (w->frame);
+ Lisp_Object alt_cursor;
int new_cursor_type;
int new_cursor_width;
int cursor_off_state = 0;
***************
*** 11849,11854 ****
--- 11850,11856 ----
the cursor type given by the frame parameter. If explicitly
marked off, draw no cursor. In all other cases, we want a hollow
box cursor. */
+ alt_cursor = Qalternate_cursor_type;
new_cursor_width = -1;
new_cursor_type = -2;
***************
*** 11859,11866 ****
{
if (w == XWINDOW (echo_area_window))
new_cursor_type = FRAME_DESIRED_CURSOR (f);
! else if (NILP (Fbuffer_local_value (Qcursor_in_non_selected_windows,
! w->buffer)))
new_cursor_type = NO_CURSOR;
else
cursor_off_state = 1;
--- 11861,11868 ----
{
if (w == XWINDOW (echo_area_window))
new_cursor_type = FRAME_DESIRED_CURSOR (f);
! else if ((alt_cursor = Fbuffer_local_value
(Qcursor_in_non_selected_windows,
! w->buffer), NILP
(alt_cursor)))
new_cursor_type = NO_CURSOR;
else
cursor_off_state = 1;
***************
*** 11871,11878 ****
|| w != XWINDOW (f->selected_window))
{
if ((MINI_WINDOW_P (w) && minibuf_level == 0)
! || NILP (Fbuffer_local_value (Qcursor_in_non_selected_windows,
! w->buffer))
|| NILP (XBUFFER (w->buffer)->cursor_type))
new_cursor_type = NO_CURSOR;
else
--- 11873,11880 ----
|| w != XWINDOW (f->selected_window))
{
if ((MINI_WINDOW_P (w) && minibuf_level == 0)
! || (alt_cursor = Fbuffer_local_value (Qcursor_in_non_selected_windows,
! w->buffer), NILP (alt_cursor))
|| NILP (XBUFFER (w->buffer)->cursor_type))
new_cursor_type = NO_CURSOR;
else
***************
*** 11898,11904 ****
if it has blinked off or for nonselected windows. */
if (w->cursor_off_p || cursor_off_state)
{
! 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;
--- 11900,11912 ----
if it has blinked off or for nonselected windows. */
if (w->cursor_off_p || cursor_off_state)
{
! if ((!EQ (alt_cursor, Qalternate_cursor_type) ||
! (alt_cursor = Fbuffer_local_value (Qalternate_cursor_type,
! w->buffer))) &&
! !EQ (alt_cursor, Qt))
! new_cursor_type = x_specified_cursor_type (alt_cursor,
! &new_cursor_width);
! else 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;
--
Kim F. Storm <address@hidden> http://www.cua.dk
- address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]], Richard Stallman, 2002/08/25
- Re: address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]], Gerd Moellmann, 2002/08/26
- Re: vc-annotate causes Emacs to die, Andre Spiegel, 2002/08/26
- Re: address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]], Alan Shutko, 2002/08/26
- Re: address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]], Gerd Moellmann, 2002/08/26
- Re: address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]], Gerd Moellmann, 2002/08/26
- Re: address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]], Miles Bader, 2002/08/26
- Re: address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]], Gerd Moellmann, 2002/08/27
- Re: address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]], Miles Bader, 2002/08/27
- Re: address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]], Gerd Moellmann, 2002/08/28
- Re: address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]],
Kim F. Storm <=
- Re: address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]], Gerd Moellmann, 2002/08/27
- Re: address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]], Richard Stallman, 2002/08/27
- Re: address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]], Alan Shutko, 2002/08/27
- Re: address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]], Richard Stallman, 2002/08/28
- Re: address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]], Juanma Barranquero, 2002/08/29
- Re: address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]], Miles Bader, 2002/08/29
- Re: address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]], Gerd Moellmann, 2002/08/28
- Re: address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]], Richard Stallman, 2002/08/28
- Re: address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]], Kim F. Storm, 2002/08/30
Re: address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]], Richard Stallman, 2002/08/27