[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Block cursor in a tty
From: |
Stefan Monnier |
Subject: |
Re: Block cursor in a tty |
Date: |
Mon, 26 Dec 2005 11:20:06 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
>>>>> "Giorgos" == Giorgos Keramidas <address@hidden> writes:
> I would not object to having an option to turn off use of
> vs. However, it will be nontrivial to implement one, since
> term_init is called before any Lisp code runs. So it can't
> be controlled by the init file.
> Currently, term_init sets TS_cursor_visible to tgetstr("vs", address),
> which then gets used in set_terminal_modes(). We could probably add
> term_init_cursor() and arrange for it to be called twice, once with the
> default "vs" capability before the init file is loaded and once if the
> init file specifies something different later on. By making an option
> that the init file can use to make TS_cursor_visible equal to
> TS_cursor_normal, we're set :)
> I'm not very acquainted with the way the terminal handling works though,
> so it may take a time before I have a patch ready and tested.
> - Giorgos
Guaranteed 100% untested sample patch.
Doesn't include the update to cus-start.el to make it customizable.
Stefan
--- term.c 20 oct 2005 15:44:27 -0400 1.170
+++ term.c 26 déc 2005 11:17:31 -0500
@@ -87,6 +87,10 @@
Lisp_Object Vring_bell_function;
+/* If non-nil, use "vs", otherwise use "ve" to make the cursor visible. */
+
+Lisp_Object Vvisible_cursor;
+
/* Terminal characteristics that higher levels want to look at.
These are all extern'd in termchar.h */
@@ -460,7 +464,7 @@
putchar ('\n');
}
- OUTPUT_IF (TS_cursor_visible);
+ OUTPUT_IF (NILP (Vvisible_cursor) ? TS_cursor_normal :
TS_cursor_visible);
OUTPUT_IF (TS_keypad_mode);
losecursor ();
}
@@ -615,6 +619,7 @@
{
tty_cursor_hidden = 0;
OUTPUT_IF (TS_cursor_normal);
+ if (!NILP (Vvisible_cursor))
OUTPUT_IF (TS_cursor_visible);
}
}
@@ -2726,6 +2731,10 @@
The function should accept no arguments. */);
Vring_bell_function = Qnil;
+ DEFVAR_LISP ("visible-cursor", &Vvisible_cursor,
+ doc: /* Non-nil means to make the cursor very visible. */);
+ Vvisible_cursor = Qt;
+
defsubr (&Stty_display_color_p);
defsubr (&Stty_display_color_cells);
defsubr (&Stty_no_underline);
- Block cursor in a tty, Stefan Monnier, 2005/12/22
- Re: Block cursor in a tty, David Kastrup, 2005/12/22
- Re: Block cursor in a tty, Richard M. Stallman, 2005/12/23
- Re: Block cursor in a tty, Giorgos Keramidas, 2005/12/23
- Re: Block cursor in a tty, Juri Linkov, 2005/12/23
- Re: Block cursor in a tty, Richard M. Stallman, 2005/12/23
- Re: Block cursor in a tty, Giorgos Keramidas, 2005/12/23
- Re: Block cursor in a tty, Richard M. Stallman, 2005/12/24
- Re: Block cursor in a tty, Giorgos Keramidas, 2005/12/25
- Re: Block cursor in a tty, Richard M. Stallman, 2005/12/25
- Re: Block cursor in a tty,
Stefan Monnier <=
- Re: Block cursor in a tty, Richard M. Stallman, 2005/12/26
- Re: Block cursor in a tty, Stefan Monnier, 2005/12/27
- Re: Block cursor in a tty, Richard M. Stallman, 2005/12/27
- Re: Block cursor in a tty, Stefan Monnier, 2005/12/28
- Re: Block cursor in a tty, Giorgos Keramidas, 2005/12/29
- Re: Block cursor in a tty, Giorgos Keramidas, 2005/12/30
- Re: Block cursor in a tty, Stefan Monnier, 2005/12/30
- Re: Block cursor in a tty, Richard M. Stallman, 2005/12/29