diff options
| author | Eli Zaretskii | 2019-08-17 14:21:47 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2019-08-17 14:21:47 +0300 |
| commit | 5f992d1990d9f351cf907dcf2066f573e0fe9407 (patch) | |
| tree | 2a58a368a13c949a852f3cad7e16fe6e14bec354 | |
| parent | 3a04be20056f19c5ffbf448128ccce067d11e99e (diff) | |
| download | emacs-5f992d1990d9f351cf907dcf2066f573e0fe9407.tar.gz emacs-5f992d1990d9f351cf907dcf2066f573e0fe9407.zip | |
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)
| -rw-r--r-- | lisp/composite.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/composite.el b/lisp/composite.el index e50e5d381ec..76722f93c41 100644 --- a/lisp/composite.el +++ b/lisp/composite.el | |||
| @@ -554,6 +554,11 @@ All non-spacing characters have this function in | |||
| 554 | ;; This sequence doesn't start with a proper base character. | 554 | ;; This sequence doesn't start with a proper base character. |
| 555 | ((memq (get-char-code-property (lgstring-char gstring 0) | 555 | ((memq (get-char-code-property (lgstring-char gstring 0) |
| 556 | 'general-category) | 556 | 'general-category) |
| 557 | ;; "Improper" base characters are of the following general | ||
| 558 | ;; categories: | ||
| 559 | ;; Mark (nonspacing, combining, enclosing) | ||
| 560 | ;; Separator (space, line, paragraph) | ||
| 561 | ;; Other (control, format, surrogate) | ||
| 557 | '(Mn Mc Me Zs Zl Zp Cc Cf Cs)) | 562 | '(Mn Mc Me Zs Zl Zp Cc Cf Cs)) |
| 558 | nil) | 563 | nil) |
| 559 | 564 | ||
| @@ -646,6 +651,7 @@ All non-spacing characters have this function in | |||
| 646 | de (+ de yoff))) | 651 | de (+ de yoff))) |
| 647 | ((and (= class 0) | 652 | ((and (= class 0) |
| 648 | (eq (get-char-code-property (lglyph-char glyph) | 653 | (eq (get-char-code-property (lglyph-char glyph) |
| 654 | ;; Me = enclosing mark | ||
| 649 | 'general-category) 'Me)) | 655 | 'general-category) 'Me)) |
| 650 | ;; Artificially laying out glyphs in an enclosing | 656 | ;; Artificially laying out glyphs in an enclosing |
| 651 | ;; mark is difficult. All we can do is to adjust | 657 | ;; mark is difficult. All we can do is to adjust |
| @@ -771,7 +777,8 @@ prepending a space before it." | |||
| 771 | 'general-category) | 777 | 'general-category) |
| 772 | 'Cf) | 778 | 'Cf) |
| 773 | (progn | 779 | (progn |
| 774 | ;; Compose by replacing with a space. | 780 | ;; Compose Cf (format) control characters by |
| 781 | ;; replacing with a space. | ||
| 775 | (lglyph-set-char glyph 32) | 782 | (lglyph-set-char glyph 32) |
| 776 | (lglyph-set-width glyph 1) | 783 | (lglyph-set-width glyph 1) |
| 777 | (setq i (1+ i))) | 784 | (setq i (1+ i))) |