From 4d569df69216b3e20b6b9642657339138c986bd7 Mon Sep 17 00:00:00 2001 From: tomo Date: Thu, 10 Oct 2002 18:07:00 +0000 Subject: [PATCH] (ids-read-buffer): Add new optional argument `soft' to avoid to overwrite existing `ideographic-structure' properties. (ids-read-file): Likewise. --- ids-read.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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. -- 1.7.10.4