From ed0cb46526376a3a2754cf1ef60210b9690f5b97 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 14 May 2002 07:48:11 +0000 Subject: [PATCH] Setup char-width-table for CJK characters. --- lisp/international/characters.el | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/lisp/international/characters.el b/lisp/international/characters.el index 79aa4e00295..297cc137f59 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el @@ -1123,6 +1123,32 @@ (set-char-table-range printable-chars '(0 . 31) nil) (set-char-table-range printable-chars '(127 . 159) nil) +;; CJK double width characters. +(let ((l '((#x1100 . #x11FF) + (#x2E80 . #x9FAF) + (#xAC00 . #xD7AF) + (#xF900 . #xFAFF) + (#xFE30 . #xFE4F) + (#xFF00 . #xFF5F) + (#xFFE0 . #xFFEF)))) + (dolist (elt l) + (set-char-table-range char-width-table + (cons (decode-char 'ucs (car elt)) + (decode-char 'ucs (cdr elt))) + 2))) +(map-charset-chars + #'(lambda (range ignore) (set-char-table-range char-width-table range 2)) + 'japanese-jisx0208) +(map-charset-chars + #'(lambda (range ignore) (set-char-table-range char-width-table range 2)) + 'japanese-jisx0212) +(map-charset-chars + #'(lambda (range ignore) (set-char-table-range char-width-table range 2)) + 'japanese-jisx0213-1) +(map-charset-chars + #'(lambda (range ignore) (set-char-table-range char-width-table range 2)) + 'japanese-jisx0213-2) + ;;; Local Variables: ;;; coding: utf-8-emacs -- 2.39.5