From: Kenichi Handa Date: Sat, 24 Feb 2007 01:26:22 +0000 (+0000) Subject: (utf-8-pre-write-conversion): Handle the X-Git-Tag: emacs-pretest-22.0.95~140 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bfd1426943601edbd4cd7abc90b8fac2cf0bd066;p=emacs.git (utf-8-pre-write-conversion): Handle the case that BEG is a string. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c6899bdbec8..164dc076dae 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-02-24 Kenichi Handa + + * international/utf-8.el (utf-8-pre-write-conversion): Handle the + case that BEG is a string. + 2007-02-24 Chris Moore * pgg-pgp5.el (pgg-pgp5-encrypt-region): diff --git a/lisp/international/utf-8.el b/lisp/international/utf-8.el index 2e4a2f6f49a..2d8791b49e3 100644 --- a/lisp/international/utf-8.el +++ b/lisp/international/utf-8.el @@ -1008,9 +1008,11 @@ Also compose particular scripts if `utf-8-compose-scripts' is non-nil." This is used as a post-read-conversion of utf-8 coding system." (if (and utf-translate-cjk-mode (not utf-translate-cjk-lang-env) - (save-excursion - (goto-char beg) - (re-search-forward "\\cc\\|\\cj\\|\\ch" end t))) + (if (stringp beg) + (string-match "\\cc\\|\\cj\\|\\ch" beg) + (save-excursion + (goto-char beg) + (re-search-forward "\\cc\\|\\cj\\|\\ch" end t)))) (utf-translate-cjk-load-tables)) nil)