X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ids-rw.el;h=0af6d8483498705026246950333a04a20b59372e;hb=df7e311408c8b04235d5725ad6fc37848d5933d7;hp=088694987992a2941c568df6d80a009837cf3e5d;hpb=39a242a680933fa5d5e71c32fe47ff45a38aad50;p=chise%2Fids.git diff --git a/ids-rw.el b/ids-rw.el index 0886949..0af6d84 100644 --- a/ids-rw.el +++ b/ids-rw.el @@ -1,6 +1,6 @@ ;;; ids-rw.el --- Rewriting utility for ideographic-structure. -;; Copyright (C) 2006 MORIOKA Tomohiko +;; Copyright (C) 2006, 2020 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko ;; Keywords: IDS, TRS, IDC, Ideographs, UCS, Unicode @@ -24,6 +24,8 @@ ;;; Code: +(require 'ids-find) + (defun ideographic-structure-unify-char (structure pattern &optional env) (if (char-ref-p structure) (setq structure (plist-get structure :char))) @@ -144,28 +146,6 @@ (setq structure ret))))) structure)) -;;;###autoload -(defun ideographic-structure-compact (structure) - (let ((rest structure) - cell - ret dest sub) - (while rest - (setq cell (car rest)) - (cond - ((and (consp cell) - (cond ((setq ret (assq 'ideographic-structure cell)) - (setq sub (cdr ret)) - ) - ((atom (car cell)) - (setq sub cell) - ))) - (setq cell - (if (setq ret (ideographic-structure-find-char sub)) - ret - (list (cons 'ideographic-structure sub)))) - )) - (setq dest (cons cell dest))) - (nreverse dest))) ;;; @ End.