From e537a1c449598802e1129f1347b0ae5f9d38d528 Mon Sep 17 00:00:00 2001 From: tomo Date: Wed, 3 Apr 2002 18:08:05 +0000 Subject: [PATCH] (iddef-read-buffer): Add new optional argument `ucs-only'. (iddef-read-file): Likewise. --- iddef.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/iddef.el b/iddef.el index d72966c..0593729 100644 --- a/iddef.el +++ b/iddef.el @@ -34,7 +34,7 @@ (require 'ids-util) ;;;###autoload -(defun iddef-read-buffer (buffer) +(defun iddef-read-buffer (buffer &optional ucs-only) (with-current-buffer buffer (goto-char (point-min)) (let (ucs @@ -52,7 +52,7 @@ (consp (setq struct (cdr (assq 'ideographic-structure ret))))) (setq char (decode-char 'ucs ucs)) - (unless (get-char-attribute char 'ideograph-daikanwa) + (unless (or ucs-only (get-char-attribute char 'ideograph-daikanwa)) (when (and (setq morohashi (get-char-attribute char 'morohashi-daikanwa)) (>= (length morohashi) 3)) @@ -87,12 +87,12 @@ ))))) ;;;###autoload -(defun iddef-read-file (file) - (interactive "fIDDef file : ") +(defun iddef-read-file (file &optional ucs-only) + (interactive "fIDDef file : \nP") (with-temp-buffer (let ((coding-system-for-read 'utf-8)) (insert-file-contents file)) - (iddef-read-buffer (current-buffer)))) + (iddef-read-buffer (current-buffer) ucs-only))) ;;;###autoload (defun iddef-check-mapping-buffer (buffer) -- 1.7.10.4