From f5942cac07342b6df879b7d7097b24985ed1ddde Mon Sep 17 00:00:00 2001 From: tomo Date: Mon, 23 Sep 2002 03:46:00 +0000 Subject: [PATCH] (char-ref=): Add optional argument `tester'. (char-spec=): Likewise. --- lisp/utf-2000/update-cdb.el | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/lisp/utf-2000/update-cdb.el b/lisp/utf-2000/update-cdb.el index 3666b41..f5186f8 100644 --- a/lisp/utf-2000/update-cdb.el +++ b/lisp/utf-2000/update-cdb.el @@ -90,26 +90,29 @@ (pureload file)) )) -(defun char-ref= (cr1 cr2) +(defun char-ref= (cr1 cr2 &optional tester) (cond ((char-ref-p cr1) (if (char-ref-p cr2) (char-spec= (plist-get cr1 :char) - (plist-get cr2 :char)) - (char-spec= (plist-get cr1 :char) cr2))) + (plist-get cr2 :char) tester) + (char-spec= (plist-get cr1 :char) cr2 tester))) (t (char-spec= cr1 (if (char-ref-p cr2) (plist-get cr2 :char) - cr2))))) + cr2) + tester)))) -(defun char-spec= (cs1 cs2) +(defun char-spec= (cs1 cs2 &optional tester) + (unless tester + (setq tester #'eq)) (if (characterp cs1) (if (characterp cs2) - (eq cs1 cs2) - (eq cs1 (find-char cs2))) + (funcall tester cs1 cs2) + (funcall tester cs1 (find-char cs2))) (if (characterp cs2) - (eq (find-char cs1) cs2) - (eq (find-char cs1) (find-char cs2))))) + (funcall tester (find-char cs1) cs2) + (funcall tester (find-char cs1) (find-char cs2))))) (let (ret) (map-char-attribute -- 1.7.10.4