emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 5f992d1: Improve commentary in composite.el


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-26 5f992d1: Improve commentary in composite.el
Date: Sat, 17 Aug 2019 07:22:29 -0400 (EDT)

branch: emacs-26
commit 5f992d1990d9f351cf907dcf2066f573e0fe9407
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Improve commentary in composite.el
    
    * lisp/composite.el (compose-gstring-for-graphic)
    (compose-gstring-for-terminal): Add comments that explain
    Unicode General Category mnemonics in human-readable terms.
    (Bug#14461)
---
 lisp/composite.el | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lisp/composite.el b/lisp/composite.el
index e50e5d3..76722f9 100644
--- a/lisp/composite.el
+++ b/lisp/composite.el
@@ -554,6 +554,11 @@ All non-spacing characters have this function in
      ;; This sequence doesn't start with a proper base character.
      ((memq (get-char-code-property (lgstring-char gstring 0)
                                    'general-category)
+            ;; "Improper" base characters are of the following general
+            ;; categories:
+            ;;   Mark (nonspacing, combining, enclosing)
+            ;;   Separator (space, line, paragraph)
+            ;;   Other (control, format, surrogate)
            '(Mn Mc Me Zs Zl Zp Cc Cf Cs))
       nil)
 
@@ -646,6 +651,7 @@ All non-spacing characters have this function in
                          de (+ de yoff)))
                   ((and (= class 0)
                         (eq (get-char-code-property (lglyph-char glyph)
+                                                     ;; Me = enclosing mark
                                                     'general-category) 'Me))
                    ;; Artificially laying out glyphs in an enclosing
                    ;; mark is difficult.  All we can do is to adjust
@@ -771,7 +777,8 @@ prepending a space before it."
                                            'general-category)
                    'Cf)
                (progn
-                 ;; Compose by replacing with a space.
+                 ;; Compose Cf (format) control characters by
+                 ;; replacing with a space.
                  (lglyph-set-char glyph 32)
                  (lglyph-set-width glyph 1)
                  (setq i (1+ i)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]