]> git.eshelyaron.com Git - emacs.git/commitdiff
Support character composition for Hangul jamo
authorEli Zaretskii <eliz@gnu.org>
Wed, 8 Apr 2020 09:50:57 +0000 (12:50 +0300)
committerEli Zaretskii <eliz@gnu.org>
Wed, 8 Apr 2020 09:50:57 +0000 (12:50 +0300)
* lisp/language/korean.el: Add composition rules for conjoining
Hangul jamo.  (Bug#40502)

lisp/language/korean.el

index 210d0fabaf7fb05e14e69251c96590d5bc6411a1..7e758159a4814adc5d3c6b2fad8ffaa16be5280e 100644 (file)
@@ -84,6 +84,18 @@ and the following key bindings are available within Korean input methods:
   F9, Hangul_Hanja:    hangul-to-hanja-conversion")
            ))
 
+;; For auto-composing conjoining jamo.
+(let* ((choseong "[\u1100-\u115F\uA960-\uA97C]")
+       (jungseong "[\u1160-\u11A7\uD7B0-\uD7C6]")
+       (jongseong "[\u11A8-\u11FF\uD7CB-\uD7FB]?")
+       (pattern (concat choseong jungseong jongseong)))
+  (set-char-table-range composition-function-table
+                        '(#x1100 . #x115F)
+                        (list (vector pattern 0 'font-shape-gstring)))
+  (set-char-table-range composition-function-table
+                        '(#xA960 . #xA97C)
+                        (list (vector pattern 0 'font-shape-gstring))))
+
 (provide 'korean)
 
 ;;; korean.el ends here