From: tomo Date: Wed, 3 Apr 2002 18:08:05 +0000 (+0000) Subject: (iddef-read-buffer): Add new optional argument `ucs-only'. X-Git-Tag: chise-base-0_23~91 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e537a1c449598802e1129f1347b0ae5f9d38d528;p=chise%2Ftomoyo-tools.git (iddef-read-buffer): Add new optional argument `ucs-only'. (iddef-read-file): Likewise. --- 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)