From: tomo Date: Tue, 20 Aug 2002 09:40:02 +0000 (+0000) Subject: (mapping-table-read-file): New function. X-Git-Tag: r21-2-46-utf-2000-0_19-release~3 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=574437f02429c0614216e78f326bffbd29e1ac7b;p=chise%2Fxemacs-chise.git- (mapping-table-read-file): New function. - use `mapping-table-read-file' to read mapping files. --- diff --git a/lisp/utf-2000/read-maps.el b/lisp/utf-2000/read-maps.el index 5d00cf3..eb11b49 100644 --- a/lisp/utf-2000/read-maps.el +++ b/lisp/utf-2000/read-maps.el @@ -24,13 +24,11 @@ ;;; Code: -(with-temp-buffer - (buffer-disable-undo) - (dolist (file '("J90-to-UCS.txt" "JSP-to-UCS.txt" - "JX1-to-UCS.txt" "JX2-to-UCS.txt" - ;; "C3-to-UCS.txt" ; "C4-to-UCS.txt" - "B-to-UCS.txt")) - (insert-file-contents (expand-file-name file "../etc/char-data/")) +(defun mapping-table-read-file (filename) + (interactive "fMapping table : ") + (with-temp-buffer + (buffer-disable-undo) + (insert-file-contents filename) (goto-char (point-min)) (let (line ccs code ucs ucs-pat ucs-ccs ucs-code chr) (while (not (eobp)) @@ -116,7 +114,12 @@ (put-char-attribute chr (if ucs-code '=>ucs ucs-ccs) ucs))) - (forward-line))) - (erase-buffer))) + (forward-line))))) + +(dolist (file '("J90-to-UCS.txt" "JSP-to-UCS.txt" + "JX1-to-UCS.txt" "JX2-to-UCS.txt" + ;; "C3-to-UCS.txt" ; "C4-to-UCS.txt" + "B-to-UCS.txt")) + (mapping-table-read-file (expand-file-name file "../etc/char-data/"))) ;;; read-maps.el ends here