[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 7eaca94: Allow Zs characters to be composed
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 7eaca94: Allow Zs characters to be composed |
Date: |
Sat, 7 Sep 2019 05:19:46 -0400 (EDT) |
branch: master
commit 7eaca940ceecc812d6099de64bf7e7a5081fdfb2
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
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)
---
lisp/composite.el | 4 ++--
src/composite.c | 7 ++++---
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/lisp/composite.el b/lisp/composite.el
index d0f2094..b3661cc 100644
--- a/lisp/composite.el
+++ b/lisp/composite.el
@@ -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.
diff --git a/src/composite.c b/src/composite.c
index a6606d5..efbd055 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 7eaca94: Allow Zs characters to be composed,
Eli Zaretskii <=