From: MORIOKA Tomohiko Date: Wed, 2 Sep 2020 08:22:55 +0000 (+0900) Subject: (ids-read-buffer): Read apparent IDS field even if IDS is not X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=7d07d4b9a85a6095032c0bc4f514391e54b81b6d;p=chise%2Fids.git (ids-read-buffer): Read apparent IDS field even if IDS is not specified. --- diff --git a/ids-read.el b/ids-read.el index 581a8f3..54aff89 100644 --- a/ids-read.el +++ b/ids-read.el @@ -109,26 +109,26 @@ (decode-char 'ideograph-cbeta (string-to-int (match-string 1 chs)))) )) - (when (and char - (>= (length ids) 3) - (not (string-match "\\?" ids)) - (consp (setq structure (ids-parse-string ids simplify)))) - (when (or (not soft) - (null - (get-char-attribute char 'ideographic-structure))) - (put-char-attribute char - 'ideographic-structure - (cdr (car structure)))) - (when (and u-char - (not (eq char u-char)) - (or (not soft) - (null - (get-char-attribute - u-char 'ideographic-structure)))) - (put-char-attribute - u-char 'ideographic-structure - (ideographic-structure-convert-to-domain - (cdr (car structure)) 'unicode))) + (when char + (when (and (>= (length ids) 3) + (not (string-match "\\?" ids)) + (consp (setq structure (ids-parse-string ids simplify)))) + (when (or (not soft) + (null + (get-char-attribute char 'ideographic-structure))) + (put-char-attribute char + 'ideographic-structure + (cdr (car structure)))) + (when (and u-char + (not (eq char u-char)) + (or (not soft) + (null + (get-char-attribute + u-char 'ideographic-structure)))) + (put-char-attribute + u-char 'ideographic-structure + (ideographic-structure-convert-to-domain + (cdr (car structure)) 'unicode)))) (when (and (>= (length apparent-ids) 3) (consp (setq structure (ids-parse-string apparent-ids simplify))))