From 9d922bac1947eebc3005b72317ccc50fa79c1d0b Mon Sep 17 00:00:00 2001 From: MORIOKA Tomohiko Date: Tue, 29 Sep 2020 18:58:55 +0900 Subject: [PATCH] (char-db-dump-shuowen): Split into ShuoWen-SRnnn.el. (char-db-dump): Call `char-db-dump-additional-idc'. --- char-db-dump.el | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/char-db-dump.el b/char-db-dump.el index 8404118..f0ff61f 100644 --- a/char-db-dump.el +++ b/char-db-dump.el @@ -1,6 +1,6 @@ ;;; char-db-dump.el --- Dump utility of char-spec files -;; Copyright (C) 2002,2003,2004,2005,2010,2018,2019 MORIOKA Tomohiko +;; Copyright (C) 2002,2003,2004,2005,2010,2018,2019,2020 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko ;; Keywords: Ideographs, Character Database, CHISE, UCS, Unicode @@ -162,16 +162,28 @@ (interactive "DDump Shuowen : ") (let ((coding-system-for-write char-db-file-coding-system) (code 1) - chr) + chr chr radical radical0) (with-temp-buffer - (insert (format ";; -*- coding: %s -*-\n" - char-db-file-coding-system)) (while (<= code 52101) (when (setq chr (decode-char '=shuowen-jiguge code 'defined-only)) + (setq radical (get-char-attribute chr 'shuowen-radical)) + (if radical0 + (unless (eq radical0 radical) + (goto-char (point-min)) + (insert (format ";; -*- coding: %s -*-\n" + char-db-file-coding-system)) + (write-region (point-min)(point-max) + (expand-file-name + (format "ShuoWen-SR%03d.el" radical0) + directory)) + (erase-buffer) + (setq radical0 radical)) + (setq radical0 radical)) (insert-char-data-with-variant chr)) (setq code (1+ code))) (write-region (point-min)(point-max) - (expand-file-name "ShuoWen.el" directory))))) + (expand-file-name + (format "ShuoWen-SR%03d.el" radical0) directory))))) ;;;###autoload (defun char-db-dump-ruimoku6 (directory) @@ -248,7 +260,8 @@ (char-db-dump-oracle-bones directory) (char-db-dump-shuowen directory) (char-db-dump-ruimoku6 directory) - (char-db-dump-additional-precomposed directory)) + (char-db-dump-additional-precomposed directory) + (char-db-dump-additional-idc directory)) ;;; @ End. -- 1.7.10.4