Skip to content

Commit ac6ba68

Browse files
committed
Minor fixes of the last commit
* src/xdisp.c (get_window_cursor_type): Fix indentation and line-filling. * doc/lispref/frames.texi (Cursor Parameters): * doc/emacs/display.texi (Cursor Display): * etc/NEWS: Fix wording and capitalization of the last change.
1 parent 63fd6c9 commit ac6ba68

File tree

4 files changed

+22
-20
lines changed

4 files changed

+22
-20
lines changed

doc/emacs/display.texi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,8 +1654,8 @@ Customization}). (The other attributes of this face have no effect;
16541654
the text shown under the cursor is drawn using the frame's background
16551655
color.) To change its shape, customize the buffer-local variable
16561656
@code{cursor-type}; possible values are @code{box} (the default),
1657-
@code{(box . @var{SIZE})} (box cursor becoming a hollow box under
1658-
masked images larger than @var{SIZE} pixels in either dimension),
1657+
@code{(box . @var{size})} (box cursor becoming a hollow box under
1658+
masked images larger than @var{size} pixels in either dimension),
16591659
@code{hollow} (a hollow box), @code{bar} (a vertical bar), @code{(bar
16601660
. @var{n})} (a vertical bar @var{n} pixels wide), @code{hbar} (a
16611661
horizontal bar), @code{(hbar . @var{n})} (a horizontal bar @var{n}

doc/lispref/frames.texi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2220,9 +2220,9 @@ How to display the cursor. Legitimate values are:
22202220
@table @code
22212221
@item box
22222222
Display a filled box. (This is the default.)
2223-
@item (box . @var{SIZE})
2223+
@item (box . @var{size})
22242224
Display a filled box. However, display it as a hollow box if point is
2225-
under masked image larger than @var{SIZE} pixels in either dimension.
2225+
under masked image larger than @var{size} pixels in either dimension.
22262226
@item hollow
22272227
Display a hollow box.
22282228
@item nil

etc/NEWS

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ It was declared obsolete in Emacs 27.1.
6565
* Changes in Emacs 28.1
6666

6767
** Support for '(box . SIZE)' cursor-type.
68-
By default, 'box' cursor always has a filled box shape. Unless you
69-
specify cursor-type to be '(box . SIZE)'. In such case, cursor
70-
becomes a hollow box if the point is under masked image larger than
71-
'SIZE' pixels in any dimension.
68+
By default, 'box' cursor always has a filled box shape. But if you
69+
specify cursor-type to be '(box . SIZE)', the cursor becomes a hollow
70+
box if the point is on an image larger than 'SIZE' pixels in any
71+
dimension.
7272

7373

7474
* Editing Changes in Emacs 28.1

src/xdisp.c

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30884,26 +30884,28 @@ get_window_cursor_type (struct window *w, struct glyph *glyph, int *width,
3088430884
if (!w->cursor_off_p)
3088530885
{
3088630886
if (glyph != NULL && glyph->type == XWIDGET_GLYPH)
30887-
return NO_CURSOR;
30887+
return NO_CURSOR;
3088830888
if (glyph != NULL && glyph->type == IMAGE_GLYPH)
3088930889
{
3089030890
if (cursor_type == FILLED_BOX_CURSOR)
3089130891
{
30892-
/* Using a block cursor on large images can be very annoying.
30893-
So use a hollow cursor for "large" images.
30894-
If image is not transparent (no mask), also use hollow cursor. */
30892+
/* Using a block cursor on large images can be very
30893+
annoying. So use a hollow cursor for "large" images.
30894+
If image is not transparent (no mask), also use
30895+
hollow cursor. */
3089530896
struct image *img = IMAGE_OPT_FROM_ID (f, glyph->u.img_id);
3089630897
if (img != NULL && IMAGEP (img->spec))
3089730898
{
30898-
/* Interpret "large" as >SIZExSIZE and >NxN
30899-
where SIZE is the value from cursor-type in form (box . SIZE),
30900-
where N = size of default frame font size.
30901-
So, setting cursor-type to (box . 32) should cover most of
30902-
the "tiny" icons people may use. */
30899+
/* Interpret "large" as >SIZExSIZE and >NxN where
30900+
SIZE is the value from cursor-type of the form
30901+
(box . SIZE), where N = size of default frame
30902+
font size. So, setting cursor-type to (box . 32)
30903+
should cover most of the "tiny" icons people may
30904+
use. */
3090330905
if (!img->mask
30904-
|| (CONSP (BVAR (b, cursor_type))
30905-
&& img->width > max (*width, WINDOW_FRAME_COLUMN_WIDTH (w))
30906-
&& img->height > max (*width, WINDOW_FRAME_LINE_HEIGHT (w))))
30906+
|| (CONSP (BVAR (b, cursor_type))
30907+
&& img->width > max (*width, WINDOW_FRAME_COLUMN_WIDTH (w))
30908+
&& img->height > max (*width, WINDOW_FRAME_LINE_HEIGHT (w))))
3090730909
cursor_type = HOLLOW_BOX_CURSOR;
3090830910
}
3090930911
}

0 commit comments

Comments
 (0)