From c95a34c96013aaba1cdf2166c4a1d0e2c5f3de6a Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Sat, 30 Jul 2022 17:21:54 +0900 Subject: * src/macfont.m (macfont_open): Initialize font->space_width. (Bug#56808) --- src/macfont.m | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/macfont.m b/src/macfont.m index e3dab1c42e0..b30c3c9763c 100644 --- a/src/macfont.m +++ b/src/macfont.m @@ -2628,6 +2628,9 @@ macfont_open (struct frame * f, Lisp_Object entity, int pixel_size) font->pixel_size = size; font->driver = &macfont_driver; font->encoding_charset = font->repertory_charset = -1; + /* Clear font->space_width so macfont_monospace_width_multiplier may + not be confused by an uninitialized value. */ + font->space_width = 0; block_input (); -- cgit v1.2.1 From eb11dae499fc395bbf3d51883ced6244c91019cf Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 30 Jul 2022 19:34:38 +0300 Subject: Improve documentation of column-related functions * doc/lispref/text.texi (Primitive Indent, Columns): * src/indent.c (Fcurrent_indentation, Fmove_to_column): Document that column counting ignores invisible text. (Bug#56837) --- src/indent.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/indent.c b/src/indent.c index f5a2a078b98..5e33fc2e77b 100644 --- a/src/indent.c +++ b/src/indent.c @@ -866,8 +866,10 @@ The return value is the column where the insertion ends. */) DEFUN ("current-indentation", Fcurrent_indentation, Scurrent_indentation, 0, 0, 0, doc: /* Return the indentation of the current line. -This is the horizontal position of the character -following any initial whitespace. */) +This is the horizontal position of the character following any initial +whitespace. +Text that has an invisible property is considered as having width 0, unless +`buffer-invisibility-spec' specifies that it is replaced by an ellipsis. */) (void) { ptrdiff_t posbyte; @@ -985,6 +987,9 @@ as displayed of the previous characters in the line. This function ignores line-continuation; there is no upper limit on the column number a character can have and horizontal scrolling has no effect. +Text that has an invisible property is considered as having width 0, +unless `buffer-invisibility-spec' specifies that it is replaced by +an ellipsis. If specified column is within a character, point goes after that character. If it's past end of line, point goes to end of line. -- cgit v1.2.1