From: MORIOKA Tomohiko Date: Wed, 17 Apr 2019 06:58:14 +0000 (+0900) Subject: (char-db-dump-additional-idc): New function. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=becd9edb615a6e73eb37ab6780e3289169a2e925;p=chise%2Ftomoyo-tools.git (char-db-dump-additional-idc): New function. --- diff --git a/char-db-dump.el b/char-db-dump.el index 2f717af..98a51bc 100644 --- a/char-db-dump.el +++ b/char-db-dump.el @@ -207,6 +207,38 @@ (expand-file-name "additional-precomposed.el" directory))))) +;;;###autoload +(defun char-db-dump-additional-idc (directory) + (interactive "DDump additional-precomposed : ") + (let ((coding-system-for-write char-db-file-coding-system) + chars i chr ret) + (with-temp-buffer + (insert (format ";; -*- coding: %s -*-\n" + char-db-file-coding-system)) + (setq i #x2FF0) + (while (<= i #x2ffB) + (setq chr (decode-char '=ucs i)) + (dolist (f '(<-denotational <-denotational@component + <-denotational@arg-reversed)) + (setq ret (get-char-attribute chr f)) + (if (characterp ret) + (unless (memq ret chars) + (insert-char-data ret) + (setq chars (cons ret chars))) + (dolist (c (get-char-attribute chr f)) + (unless (memq c chars) + (insert-char-data c) + (setq chars (cons c chars)))))) + (dolist (ccs '(=ucs-var-001 =ucs-var-002 =ucs-var-003 =ucs-itaiji-001)) + (when (setq chr (decode-char ccs i 'defined-only 'without-inheritance)) + (unless (memq chr chars) + (insert-char-data chr) + (setq chars (cons chr chars))))) + (setq i (1+ i))) + (write-region (point-min)(point-max) + (expand-file-name + "additional-idc.el" directory))))) + ;;;###autoload (defun char-db-dump (directory)