From 325060bf5f5f06be24c8d87e89f54a8f32dbf7f3 Mon Sep 17 00:00:00 2001 From: tomo Date: Thu, 4 Apr 2002 07:32:51 +0000 Subject: [PATCH] (ideographic-structure-convert-to-daikanwa): Try to replace converted sub-tree with corresponding combined character. --- ids-util.el | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ids-util.el b/ids-util.el index 5259594..027ab0f 100644 --- a/ids-util.el +++ b/ids-util.el @@ -1,6 +1,6 @@ ;;; ids-util.el --- Utilities about ideographic-structure -*- coding: utf-8 -*- -;; Copyright (C) 2001 MORIOKA Tomohiko +;; Copyright (C) 2001,2002 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko ;; Keywords: ideographic-structure, UTF-2000, database @@ -132,7 +132,7 @@ ;;;###autoload (defun ideographic-structure-convert-to-daikanwa (structure) - (let (dest cell morohashi ret) + (let (dest cell morohashi ret ret2 ret3) (while structure (setq cell (car structure)) (setq dest @@ -177,10 +177,14 @@ (decode-char 'ideograph-daikanwa (car morohashi)) cell))) ((setq ret (assq 'ideographic-structure cell)) - (put-alist 'ideographic-structure - (ideographic-structure-convert-to-daikanwa - (cdr ret)) - (copy-alist cell))) + (setq ret2 + (ideographic-structure-convert-to-daikanwa + (cdr ret))) + (if (setq ret3 (ideographic-structure-find-char ret2)) + ret3 + (put-alist 'ideographic-structure + ret2 + (copy-alist cell)))) (t cell)) dest)) (setq structure (cdr structure))) -- 1.7.10.4