From: tomo Date: Thu, 10 Oct 2002 18:07:00 +0000 (+0000) Subject: (ids-read-buffer): Add new optional argument `soft' to avoid to X-Git-Tag: ids-0_0-1~196 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=4d569df69216b3e20b6b9642657339138c986bd7;p=chise%2Fids.git (ids-read-buffer): Add new optional argument `soft' to avoid to overwrite existing `ideographic-structure' properties. (ids-read-file): Likewise. --- diff --git a/ids-read.el b/ids-read.el index f759d14..19abb37 100644 --- a/ids-read.el +++ b/ids-read.el @@ -27,7 +27,7 @@ (require 'ids) ;;;###autoload -(defun ids-read-buffer (buffer &optional simplify) +(defun ids-read-buffer (buffer &optional simplify soft) (interactive "bBuffer = \nP") (save-excursion (set-buffer buffer) @@ -85,6 +85,9 @@ (string-to-int (match-string 1 chs)))) )) (when (and char + (or (not soft) + (null + (get-char-attribute char 'ideographic-structure))) (>= (length ids) 3) (not (string-match "\\?" ids)) (consp (setq structure (ids-parse-string ids simplify)))) @@ -96,11 +99,11 @@ )))) ;;;###autoload -(defun ids-read-file (file &optional simplify) +(defun ids-read-file (file &optional simplify soft) (interactive "fIDS file = \nP") (with-temp-buffer (insert-file-contents file) - (ids-read-buffer (current-buffer) simplify))) + (ids-read-buffer (current-buffer) simplify soft))) ;;; @ End.