diff options
author | Eli Zaretskii <eliz@gnu.org> | 2021-05-30 11:16:59 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2021-05-30 11:16:59 +0300 |
commit | 23ad0f0c5adbeda9a0bd346138e2950cb5e5a136 (patch) | |
tree | 8ec396ecfdd2aa190b8e98186d728762b169bbea /src/character.h | |
parent | 7671d470781a3e68b4e39b43281c0b1b73c5eaa9 (diff) | |
download | emacs-23ad0f0c5adbeda9a0bd346138e2950cb5e5a136.tar.gz |
Don't account for character compositions in 'format' and friends
'lisp_string_width' is called from 'format' and 'format-message',
which can be called both very early into Emacs initialization and in
other contexts where using the font backend is impossible or
undesirable. So this commit changes 'lisp_string_width' to try
accounting for automatic compositions only when explicitly requested,
and only 'string-width' does that; 'format' and 'format-message'
don't.
* src/character.c (lisp_string_width): Accept an additional
argument AUTO_COMP; attempt accounting for auto-compositions only
if that argument is non-zero. (Bug#48732)
* src/editfns.c (styled_format):
* src/character.c (Fstring_width): Callers of 'lisp_string_width'
adjusted.
Diffstat (limited to 'src/character.h')
-rw-r--r-- | src/character.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/character.h b/src/character.h index 75351cd1edf..1a745484daa 100644 --- a/src/character.h +++ b/src/character.h @@ -573,7 +573,7 @@ extern ptrdiff_t strwidth (const char *, ptrdiff_t); extern ptrdiff_t c_string_width (const unsigned char *, ptrdiff_t, int, ptrdiff_t *, ptrdiff_t *); extern ptrdiff_t lisp_string_width (Lisp_Object, ptrdiff_t, ptrdiff_t, - ptrdiff_t, ptrdiff_t *, ptrdiff_t *); + ptrdiff_t, ptrdiff_t *, ptrdiff_t *, bool); extern Lisp_Object Vchar_unify_table; extern Lisp_Object string_escape_byte8 (Lisp_Object); |