diff options
| author | Stefan Monnier | 2005-12-30 21:48:35 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2005-12-30 21:48:35 +0000 |
| commit | 0db017c09391a170a0fbd21f51875d49222c9ee8 (patch) | |
| tree | 7c086ed219cb44eba7d789e0573733d461d7a08f /src | |
| parent | 4dd68f44332b1c8418d47675d2be052f3cbeff32 (diff) | |
| download | emacs-0db017c09391a170a0fbd21f51875d49222c9ee8.tar.gz emacs-0db017c09391a170a0fbd21f51875d49222c9ee8.zip | |
(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".
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/term.c | 16 |
2 files changed, 21 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index fb902384969..b1fc39a4100 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2005-12-30 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * term.c (visible_cursor): New boolean var. | ||
| 4 | (set_terminal_modes, tty_show_cursor): Use "vs" or "ve" depending on | ||
| 5 | visible_cursor. | ||
| 6 | (syms_of_term): Export the new var as "visible-cursor". | ||
| 7 | |||
| 1 | 2005-12-30 Eli Zaretskii <eliz@gnu.org> | 8 | 2005-12-30 Eli Zaretskii <eliz@gnu.org> |
| 2 | 9 | ||
| 3 | * .gdbinit: Tell users not to worry about GDB warnings that some | 10 | * .gdbinit: Tell users not to worry about GDB warnings that some |
diff --git a/src/term.c b/src/term.c index e53e5f78306..e2c2fc39fc5 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -87,6 +87,10 @@ extern Lisp_Object Qspace, QCalign_to, QCwidth; | |||
| 87 | 87 | ||
| 88 | Lisp_Object Vring_bell_function; | 88 | Lisp_Object Vring_bell_function; |
| 89 | 89 | ||
| 90 | /* If true, use "vs", otherwise use "ve" to make the cursor visible. */ | ||
| 91 | |||
| 92 | static int visible_cursor; | ||
| 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 | ||
| @@ -460,7 +464,7 @@ set_terminal_modes () | |||
| 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 | } |
| @@ -615,7 +619,8 @@ tty_show_cursor () | |||
| 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 | ||
| @@ -2726,6 +2731,13 @@ This variable can be used by terminal emulator packages. */); | |||
| 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); |