From: tomo Date: Mon, 23 Sep 2002 03:46:00 +0000 (+0000) Subject: (char-ref=): Add optional argument `tester'. X-Git-Tag: r21-4-6-utf-2000-0_19-cr~2 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=f5942cac07342b6df879b7d7097b24985ed1ddde;p=chise%2Fxemacs-chise.git (char-ref=): Add optional argument `tester'. (char-spec=): Likewise. --- 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