From: tomo Date: Wed, 6 Apr 2005 19:45:18 +0000 (+0000) Subject: (ids-dump-format-list): New function; convert `=ucs@unicode' or X-Git-Tag: chise-core-0_22~61 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c13abc2fb7ad3c98b687388899af691a6c86762;p=chise%2Fids.git (ids-dump-format-list): New function; convert `=ucs@unicode' or `=ucs@iso' characters to corresponding '=ucs' characters. (ids-dump-insert-line): Use `ids-dump-format-list' instead of `ids-format-list'. (ids-dump-insert-jis-x0208-1990): Likewise. --- diff --git a/ids-dump.el b/ids-dump.el index ea54637..8833b87 100644 --- a/ids-dump.el +++ b/ids-dump.el @@ -1,6 +1,6 @@ ;;; ids-dump.el --- Dump utility of IDS-* files -;; Copyright (C) 2002,2003 MORIOKA Tomohiko +;; Copyright (C) 2002,2003,2004,2005 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko ;; Keywords: IDS, IDC, Ideographs, UCS, Unicode @@ -26,6 +26,20 @@ (require 'ids) +(defun ids-dump-format-list (ids-list) + (if ids-list + (let (ucs) + (mapconcat + (lambda (c) + (char-to-string + (if (setq ucs + (unless (encode-char c '=ucs 'defined-only) + (or (get-char-attribute c '=ucs@unicode) + (get-char-attribute c '=ucs@iso)))) + (decode-char '=ucs ucs) + c))) + (ids-format-list ids-list) "")))) + (defun ids-dump-insert-line (ccs line-spec code) (let ((chr (decode-char ccs code)) id-list) @@ -34,7 +48,7 @@ (insert (format line-spec code (decode-builtin-char ccs code) (if id-list - (ids-format-list id-list) + (ids-dump-format-list id-list) (char-to-string chr))))))) (defun ids-dump-insert-ccs-ranges (ccs line-spec &rest ranges) @@ -145,7 +159,7 @@ h l (decode-builtin-char 'japanese-jisx0208-1990 (logior (lsh h 8) l)) - (or (ids-format-list + (or (ids-dump-format-list (get-char-attribute chr 'ideographic-structure)) ""))) (setq cell (1+ cell))) @@ -160,7 +174,7 @@ h l (decode-builtin-char 'japanese-jisx0208-1990 (logior (lsh h 8) l)) - (or (ids-format-list + (or (ids-dump-format-list (get-char-attribute chr 'ideographic-structure)) ""))) (setq cell (1+ cell)))))