comparison src/term.c @ 67935:52bbc53dbce1

(visible_cursor): New boolean var. (set_terminal_modes, tty_show_cursor): Use "vs" or "ve" depending on visible_cursor. (syms_of_term): Export the new var as "visible-cursor".
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 30 Dec 2005 21:48:35 +0000
parents d3f5aa0f18c4
children 3bd95f4f2941 c69d44922688 7beb78bc1f8e
comparison
equal deleted inserted replaced
67934:83b7f7a9b7c9 67935:52bbc53dbce1
84 extern Lisp_Object Qspace, QCalign_to, QCwidth; 84 extern Lisp_Object Qspace, QCalign_to, QCwidth;
85 85
86 /* Function to use to ring the bell. */ 86 /* Function to use to ring the bell. */
87 87
88 Lisp_Object Vring_bell_function; 88 Lisp_Object Vring_bell_function;
89
90 /* If true, use "vs", otherwise use "ve" to make the cursor visible. */
91
92 static int visible_cursor;
89 93
90 /* Terminal characteristics that higher levels want to look at. 94 /* Terminal characteristics that higher levels want to look at.
91 These are all extern'd in termchar.h */ 95 These are all extern'd in termchar.h */
92 96
93 int must_write_spaces; /* Nonzero means spaces in the text 97 int must_write_spaces; /* Nonzero means spaces in the text
458 int i; 462 int i;
459 for (i = 0; i < FRAME_LINES (XFRAME (selected_frame)); i++) 463 for (i = 0; i < FRAME_LINES (XFRAME (selected_frame)); i++)
460 putchar ('\n'); 464 putchar ('\n');
461 } 465 }
462 466
463 OUTPUT_IF (TS_cursor_visible); 467 OUTPUT_IF (visible_cursor ? TS_cursor_visible : TS_cursor_normal);
464 OUTPUT_IF (TS_keypad_mode); 468 OUTPUT_IF (TS_keypad_mode);
465 losecursor (); 469 losecursor ();
466 } 470 }
467 else 471 else
468 (*set_terminal_modes_hook) (); 472 (*set_terminal_modes_hook) ();
613 { 617 {
614 if (tty_cursor_hidden) 618 if (tty_cursor_hidden)
615 { 619 {
616 tty_cursor_hidden = 0; 620 tty_cursor_hidden = 0;
617 OUTPUT_IF (TS_cursor_normal); 621 OUTPUT_IF (TS_cursor_normal);
618 OUTPUT_IF (TS_cursor_visible); 622 if (visible_cursor)
623 OUTPUT_IF (TS_cursor_visible);
619 } 624 }
620 } 625 }
621 626
622 627
623 /* Set standout mode to the state it should be in for 628 /* Set standout mode to the state it should be in for
2724 DEFVAR_LISP ("ring-bell-function", &Vring_bell_function, 2729 DEFVAR_LISP ("ring-bell-function", &Vring_bell_function,
2725 doc: /* Non-nil means call this function to ring the bell. 2730 doc: /* Non-nil means call this function to ring the bell.
2726 The function should accept no arguments. */); 2731 The function should accept no arguments. */);
2727 Vring_bell_function = Qnil; 2732 Vring_bell_function = Qnil;
2728 2733
2734 DEFVAR_BOOL ("visible-cursor", &visible_cursor,
2735 doc: /* Non-nil means to make the cursor very visible.
2736 This only has an effect when running in a text terminal.
2737 What means \"very visible\" is up to your terminal. It may make the cursor
2738 bigger, or it may make it blink, or it may do nothing at all. */);
2739 visible_cursor = 1;
2740
2729 defsubr (&Stty_display_color_p); 2741 defsubr (&Stty_display_color_p);
2730 defsubr (&Stty_display_color_cells); 2742 defsubr (&Stty_display_color_cells);
2731 defsubr (&Stty_no_underline); 2743 defsubr (&Stty_no_underline);
2732 } 2744 }
2733 2745