From: Kenichi Handa Date: Tue, 14 May 2002 07:48:11 +0000 (+0000) Subject: Setup char-width-table for CJK characters. X-Git-Tag: emacs-pretest-23.0.90~8295^2~1864^2~894 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ed0cb46526376a3a2754cf1ef60210b9690f5b97;p=emacs.git Setup char-width-table for CJK characters. --- 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