comparison lisp/international/utf-8.el @ 76112:bb3eab7f9463

(utf-8-pre-write-conversion): Handle the case that BEG is a string.
author Kenichi Handa <handa@m17n.org>
date Sat, 24 Feb 2007 01:25:37 +0000
parents e3694f1cb928
children 0ccf5ac2795e a0277e80d191
comparison
equal deleted inserted replaced
76111:7dfde5932872 76112:bb3eab7f9463
1006 (defun utf-8-pre-write-conversion (beg end) 1006 (defun utf-8-pre-write-conversion (beg end)
1007 "Prepare for `utf-translate-cjk-mode' to encode text between BEG and END. 1007 "Prepare for `utf-translate-cjk-mode' to encode text between BEG and END.
1008 This is used as a post-read-conversion of utf-8 coding system." 1008 This is used as a post-read-conversion of utf-8 coding system."
1009 (if (and utf-translate-cjk-mode 1009 (if (and utf-translate-cjk-mode
1010 (not utf-translate-cjk-lang-env) 1010 (not utf-translate-cjk-lang-env)
1011 (save-excursion 1011 (if (stringp beg)
1012 (goto-char beg) 1012 (string-match "\\cc\\|\\cj\\|\\ch" beg)
1013 (re-search-forward "\\cc\\|\\cj\\|\\ch" end t))) 1013 (save-excursion
1014 (goto-char beg)
1015 (re-search-forward "\\cc\\|\\cj\\|\\ch" end t))))
1014 (utf-translate-cjk-load-tables)) 1016 (utf-translate-cjk-load-tables))
1015 nil) 1017 nil)
1016 1018
1017 (make-coding-system 1019 (make-coding-system
1018 'mule-utf-8 4 ?u 1020 'mule-utf-8 4 ?u