(setq ret (or (char-feature ret '<-simplified@JP/Jouyou)
(char-feature ret '<-simplified@JP))))
(if (cdr ret)
- (ideo-trans-select-char ret (format "%c => " chr))
+ (funcall selector ret)
(car ret)))
((setq ret (char-feature chr '=>ucs@jis))
(decode-char '=ucs@jis ret))
'japanese-traditionalize-string)
;;;###autoload
-(defun japanese-traditionalize-region (start end)
+(defun japanese-traditionalize-region (start end &optional selector)
"Convert Japanese simplified Kanji in the region into traditional characters."
(interactive "r")
+ (unless selector
+ (setq selector
+ (lambda (chars)
+ (ideo-trans-select-char chars (format "%c => " chr)))))
(save-excursion
(save-restriction
(narrow-to-region start end)
(progn
(if (cdr ret)
(progn
- (setq rret (ideo-trans-select-char ret))
+ (setq rret (funcall selector ret))
(delete-char)
(insert rret))
(delete-char)