;;; Code:
(defun ids-index-store-char (product component)
- (let ((ret (char-feature component 'ideographic-products)))
+ (let ((ret (char-feature ; get-char-attribute
+ component 'ideographic-products)))
(unless (memq product ret)
(put-char-attribute component 'ideographic-products
(cons product ret)))
((setq ret (assq 'ideographic-structure cell))
(ids-index-store-structure product (cdr ret)))
((setq ret (find-char cell))
- (ids-index-store-char product ret))))))
+ (ids-index-store-char product ret))
+ ))))
;;;###autoload
(defun ids-update-index ()
(setq products (cons product products))))))
(setq dest products)))
(setq i (1+ i)))
- dest))
+ products))
(defun ideographic-structure-char= (c1 c2)
(with-current-buffer (get-buffer-create ids-find-result-buffer)
(setq buffer-read-only nil)
(erase-buffer)
- (dolist (c (ideographic-products-find components))
- (insert (ids-find-format-line
- c (char-feature c 'ideographic-structure)))
+ (let (is)
+ (dolist (c (ideographic-products-find components))
+ (setq is (char-feature c 'ideographic-structure))
+ ;; to avoid problems caused by wrong indexes
+ (when (every (lambda (c)
+ (ideographic-structure-member c is))
+ components)
+ (insert (ids-find-format-line c is))
+ )
+ )
;; (forward-line -1)
)
(goto-char (point-min)))