- (cond ((looking-at "^J90-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\)")
- (setq ccs 'japanese-jisx0208-1990
- code (string-to-int (match-string 1) 16)
- ucs-pat "\tJU[+-]\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]+\\)"
- ucs-ccs 'ucs-jis)
- (goto-char (match-end 0))
- )
- ((looking-at "^JSP-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\)")
- (setq ccs 'japanese-jisx0212
- code (string-to-int (match-string 1) 16)
- ucs-pat "\tJU[+-]\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]+\\)"
- ucs-ccs '=ucs-jis-1990)
- (goto-char (match-end 0))
- )
- ((looking-at "^JX1-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\)")
- (setq ccs '=jis-x0213-1-2000
- code (string-to-int (match-string 1) 16)
- ucs-pat "\tJU[+-]\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]+\\)"
- ucs-ccs '=ucs-jis-2000)
- (goto-char (match-end 0))
- )
- ((looking-at "^JX2-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\)")
- (setq ccs '=jis-x0213-2-2000
- code (string-to-int (match-string 1) 16)
- ucs-pat "\tJU[+-]\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]+\\)"
- ucs-ccs 'ucs-jis)
- (goto-char (match-end 0))
- )
- ((looking-at "^C1-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\)")
- (setq ccs 'chinese-cns11643-1
- code (string-to-int (match-string 1) 16)
- ucs-pat "\tCU[+-]\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]+\\)"
- ucs-ccs 'ucs-cns)
- (goto-char (match-end 0))
- )
- ((looking-at "^C2-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\)")
- (setq ccs 'chinese-cns11643-2
- code (string-to-int (match-string 1) 16)
- ucs-pat "\tCU[+-]\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]+\\)"
- ucs-ccs 'ucs-cns)
- (goto-char (match-end 0))
- )
- ((looking-at "^C3-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\)")
- (setq ccs 'chinese-cns11643-3
- code (string-to-int (match-string 1) 16)
- ucs-pat "\tCU[+-]\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]+\\)"
- ucs-ccs 'ucs-cns)
- (goto-char (match-end 0))
- )
- ((looking-at "^C4-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\)")
- (setq ccs 'chinese-cns11643-4
- code (string-to-int (match-string 1) 16)
- ucs-pat "\tCU[+-]\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]+\\)"
- ucs-ccs 'ucs-cns)
- (goto-char (match-end 0))
- )
- ((looking-at "^B-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\)")
- (setq ccs 'chinese-big5
- code (string-to-int (match-string 1) 16)
- ucs-pat "\tBU[+-]\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]+\\)"
- ucs-ccs 'ucs-big5)
- (goto-char (match-end 0))
- )
- ((looking-at "^JC3-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\)")
- (setq ccs '=jef-china3
- code (string-to-int (match-string 1) 16)
- ucs-pat nil
- ucs-ccs nil)
- (goto-char (match-end 0))
- )
- (t
- (setq ccs nil
- code nil
- ucs-pat nil
- ucs-ccs nil)
- ))
+ (setq rest mapping-table-ccs-setting-alist)
+ (catch 'matched
+ (while rest
+ (setq setting (car rest)
+ ccs (pop setting))
+ (when (looking-at (pop setting))
+ (setq code (string-to-int (match-string (pop setting))
+ (pop setting))
+ ucs-ccs (pop setting)
+ ucs-pat (car setting)
+ drep-ccs (intern (format "=%s" ccs))
+ drep-ucs-ccs (intern (format "=%s" ucs-ccs)))
+ (unless (find-charset drep-ccs)
+ (setq drep-ccs nil))
+ (unless (find-charset drep-ucs-ccs)
+ (setq drep-ucs-ccs nil))
+ (goto-char (match-end 0))
+ (throw 'matched t))
+ (setq rest (cdr rest)))
+ (setq ccs nil
+ code nil
+ ucs-pat nil
+ ucs-ccs nil
+ drep-ccs nil
+ drep-ucs-ccs nil))