From f56b8e1343e94bdc6f9125e5413d8591983cc2cd Mon Sep 17 00:00:00 2001 From: MORIOKA Tomohiko Date: Tue, 20 Sep 2022 21:01:48 +0900 Subject: [PATCH] Don't set `==ucs@JP/hanazono' to nil if `==ucs@JP/hanazono' same a value >= #x20000. --- lisp/utf-2000/maps-conf.el | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/lisp/utf-2000/maps-conf.el b/lisp/utf-2000/maps-conf.el index 8ca50c0..661824e 100644 --- a/lisp/utf-2000/maps-conf.el +++ b/lisp/utf-2000/maps-conf.el @@ -291,7 +291,7 @@ '==hanyo-denshi/jd) ) -(let (j-chr) +(let (j-chr ucs-jv) (map-char-attribute (lambda (c v) (if (and (setq j-chr (decode-char '=ucs@JP v)) @@ -304,16 +304,15 @@ '=ucs@unicode) (map-char-attribute (lambda (c v) - (if (and (setq j-chr (decode-char '==ucs@JP v)) - (not (eq j-chr c)) - (not (or (eq (encode-char c '==ucs@jis) - (encode-char c '==ucs@JP/hanazono)) - (eq (encode-char c '==ucs@unicode) - (encode-char c '==ucs@JP/hanazono)) - (eq (encode-char c '==ucs@cns) - (encode-char c '==ucs@JP/hanazono)) - ))) - (put-char-attribute c '==ucs@JP/hanazono nil)) + (or (and (setq ucs-jv (encode-char c '==ucs@JP/hanazono)) + (>= ucs-jv #x20000)) + (if (and (setq j-chr (decode-char '==ucs@JP v)) + (not (eq j-chr c)) + (not (or (eq ucs-jv (encode-char c '==ucs@jis)) + (eq ucs-jv (encode-char c '==ucs@unicode)) + (eq ucs-jv (encode-char c '==ucs@cns)) + ))) + (put-char-attribute c '==ucs@JP/hanazono nil))) nil) '==ucs@unicode) ) -- 1.7.10.4