]> git.eshelyaron.com Git - emacs.git/commitdiff
Allow Zs characters to be composed
authorEli Zaretskii <eliz@gnu.org>
Sat, 7 Sep 2019 09:19:06 +0000 (12:19 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 7 Sep 2019 09:19:06 +0000 (12:19 +0300)
* 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
src/composite.c

index d0f20949438adf7cdbb2af3b6fb9936113d39f00..b3661cc2fa09426cf37c875408adc46644d60ae7 100644 (file)
@@ -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.
index a6606d5fc45059312e2cb9365f31f31b603031b1..efbd055cef2d5ef591f956142bb1edac5411d748 100644 (file)
@@ -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