From: tomo Date: Thu, 8 Mar 2007 03:34:09 +0000 (+0000) Subject: (ucs-compat-read-file): New command. X-Git-Tag: r21-4-19-chise-0_23-4^20~176 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d1d29aa5b977996f7bc4ffb60f9cb4958f84423f;p=chise%2Fxemacs-chise.git.1 (ucs-compat-read-file): New command. --- diff --git a/lisp/utf-2000/read-maps.el b/lisp/utf-2000/read-maps.el index 3a6bb4a..57e2d2c 100644 --- a/lisp/utf-2000/read-maps.el +++ b/lisp/utf-2000/read-maps.el @@ -187,6 +187,22 @@ UCS-REGEXP is a regular expression to match against (put-char-attribute chr ucs-ccs ucs))))) (forward-line))))) +;;;###autoload +(defun ucs-compat-read-file (filename) + (interactive "fUCS-compat file : ") + (with-temp-buffer + (buffer-disable-undo) + (insert-file-contents filename) + (goto-char (point-min)) + (let (ucs ucs*) + (while (re-search-forward + "^ *U[---+]\\([0-9A-F]+\\)\t *U[---+]\\([0-9A-F]+\\)" nil t) + (setq ucs (string-to-int (match-string 1) 16) + ucs* (string-to-int (match-string 2) 16)) + (put-char-attribute (decode-char '=ucs ucs) '=>ucs* ucs*) + )))) + +;;;###autoload (defun jp-jouyou-read-file (filename) (interactive "fjp-jouyou file : ") (with-temp-buffer