From bfd1426943601edbd4cd7abc90b8fac2cf0bd066 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Sat, 24 Feb 2007 01:26:22 +0000 Subject: [PATCH] (utf-8-pre-write-conversion): Handle the case that BEG is a string. --- lisp/ChangeLog | 5 +++++ lisp/international/utf-8.el | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) 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) -- 2.39.5