mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-27 07:37:33 +00:00
Allow Zs characters to be composed
* src/composite.c (char_composable_p): Allow SPC and other Zs characters to be composed. * lisp/composite.el (compose-gstring-for-graphic): Don't reject characters whose general category is Zs. (Bug#14461)
This commit is contained in:
parent
f425099559
commit
7eaca940ce
@ -558,9 +558,9 @@ All non-spacing characters have this function in
|
||||
;; "Improper" base characters are of the following general
|
||||
;; categories:
|
||||
;; Mark (nonspacing, combining, enclosing)
|
||||
;; Separator (space, line, paragraph)
|
||||
;; Separator (line, paragraph)
|
||||
;; Other (control, format, surrogate)
|
||||
'(Mn Mc Me Zs Zl Zp Cc Cf Cs))
|
||||
'(Mn Mc Me Zl Zp Cc Cf Cs))
|
||||
nil)
|
||||
|
||||
;; A base character and the following non-spacing characters.
|
||||
|
@ -919,16 +919,17 @@ autocmp_chars (Lisp_Object rule, ptrdiff_t charpos, ptrdiff_t bytepos,
|
||||
}
|
||||
|
||||
/* 1 iff the character C is composable. Characters of general
|
||||
category Z? or C? are not composable except for ZWNJ and ZWJ. */
|
||||
category Z? or C? are not composable except for ZWNJ and ZWJ,
|
||||
and characters of category Zs. */
|
||||
|
||||
static bool
|
||||
char_composable_p (int c)
|
||||
{
|
||||
Lisp_Object val;
|
||||
return (c > ' '
|
||||
return (c >= ' '
|
||||
&& (c == ZERO_WIDTH_NON_JOINER || c == ZERO_WIDTH_JOINER
|
||||
|| (val = CHAR_TABLE_REF (Vunicode_category_table, c),
|
||||
(FIXNUMP (val) && (XFIXNUM (val) <= UNICODE_CATEGORY_So)))));
|
||||
(FIXNUMP (val) && (XFIXNUM (val) <= UNICODE_CATEGORY_Zs)))));
|
||||
}
|
||||
|
||||
/* Update cmp_it->stop_pos to the next position after CHARPOS (and
|
||||
|
Loading…
Reference in New Issue
Block a user