aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJared Finder2025-12-29 12:35:24 -0800
committerSean Whitton2026-01-10 12:49:43 +0000
commit4e779d20f1840fef380f5688ceb2cd80658bde0b (patch)
tree79ad054524a73dced6d382a99d0a6a476f7ad1f9 /doc
parent88d3101fdd10f5e922aae9d99fcfd103a33747db (diff)
downloademacs-4e779d20f1840fef380f5688ceb2cd80658bde0b.tar.gz
emacs-4e779d20f1840fef380f5688ceb2cd80658bde0b.zip
Update cursor display using Xterm escape sequences
* lisp/term/xterm.el (xterm-update-cursor): New user option. (xterm--init): Use it. (xterm--post-command-hook): New function for all xterm functionality installed in 'post-command-hook'. (xterm--init-frame-title): Install it. (xterm--init-update-cursor, xterm--set-cursor-type) (xterm--update-cursor-type, xterm--update-cursor-color): New functions. (xterm--cursor-type-to-int): New constant. * doc/emacs/display.texi (Cursor Display): * etc/NEWS: Document the new feature.
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/display.texi53
1 files changed, 33 insertions, 20 deletions
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index 05a25323543..d475fc3cfde 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -2048,20 +2048,41 @@ variable @code{visible-cursor} is @code{nil} when Emacs starts or
2048resumes, it uses the normal cursor. 2048resumes, it uses the normal cursor.
2049 2049
2050@vindex cursor-type 2050@vindex cursor-type
2051 On a graphical display, many more properties of the text cursor can 2051 On a graphical display and many Xterm-compatible text terminals, the
2052be altered. To customize its color, change the @code{:background} 2052color and shape of the text cursor can be altered. To customize its
2053attribute of the face named @code{cursor} (@pxref{Face 2053color, change the @code{:background} attribute of the face named
2054Customization}). (The other attributes of this face have no effect; 2054@code{cursor} (@pxref{Face Customization}). (The other attributes of
2055the text shown under the cursor is drawn using the frame's background 2055this face have no effect; the text shown under the cursor is drawn using
2056color.) To change its shape, customize the buffer-local variable 2056the frame's background color.) To change its shape, customize the
2057@code{cursor-type}; possible values are @code{box} (the default), 2057buffer-local variable @code{cursor-type}; possible values are @code{box}
2058@code{(box . @var{size})} (box cursor becoming a hollow box under 2058(the default), @code{(box . @var{size})} (box cursor becoming a hollow
2059masked images larger than @var{size} pixels in either dimension), 2059box under masked images larger than @var{size} pixels in either
2060@code{hollow} (a hollow box), @code{bar} (a vertical bar), @code{(bar 2060dimension), @code{hollow} (a hollow box), @code{bar} (a vertical bar),
2061. @var{n})} (a vertical bar @var{n} pixels wide), @code{hbar} (a 2061@code{(bar . @var{n})} (a vertical bar @var{n} pixels wide), @code{hbar}
2062horizontal bar), @code{(hbar . @var{n})} (a horizontal bar @var{n} 2062(a horizontal bar), @code{(hbar . @var{n})} (a horizontal bar @var{n}
2063pixels tall), or @code{nil} (no cursor at all). 2063pixels tall), or @code{nil} (no cursor at all).
2064 2064
2065@vindex xterm-update-cursor
2066 On Xterm-compatible text terminals cursor customiztaion is controlled
2067by the user option @code{xterm-update-cursor}. Valid values are:
2068@code{t} to update the cursor's color and shape, @code{type} to update
2069the cursor's shape only, @code{color} to update the cursor's color only,
2070and @code{nil} to not update the cursor's appearance. Xterm-compatible
2071text terminals can not display a hollow box and instead use a filled
2072box. Similarly, Xterm-compatible text terminals ignore the pixel sizes
2073for @code{bar} and @code{hbar}.
2074
2075@findex hl-line-mode
2076@findex global-hl-line-mode
2077@cindex highlight current line
2078 To make the cursor even more visible, you can use HL Line mode, a
2079minor mode that highlights the line containing point. Use @kbd{M-x
2080hl-line-mode} to enable or disable it in the current buffer. @kbd{M-x
2081global-hl-line-mode} enables or disables the same mode globally.
2082
2083 The remaining controls only work on graphical displays where Emacs can
2084fully control the way the cursor appears.
2085
2065@findex blink-cursor-mode 2086@findex blink-cursor-mode
2066@cindex cursor, blinking 2087@cindex cursor, blinking
2067@cindex blinking cursor 2088@cindex blinking cursor
@@ -2105,14 +2126,6 @@ non-blinking hollow box. (For a bar cursor, it instead appears as a
2105thinner bar.) To turn off cursors in non-selected windows, change the 2126thinner bar.) To turn off cursors in non-selected windows, change the
2106variable @code{cursor-in-non-selected-windows} to @code{nil}. 2127variable @code{cursor-in-non-selected-windows} to @code{nil}.
2107 2128
2108@findex hl-line-mode
2109@findex global-hl-line-mode
2110@cindex highlight current line
2111 To make the cursor even more visible, you can use HL Line mode, a
2112minor mode that highlights the line containing point. Use @kbd{M-x
2113hl-line-mode} to enable or disable it in the current buffer. @kbd{M-x
2114global-hl-line-mode} enables or disables the same mode globally.
2115
2116@node Line Truncation 2129@node Line Truncation
2117@section Line Truncation 2130@section Line Truncation
2118 2131