]> git.eshelyaron.com Git - emacs.git/commitdiff
(utf-8-pre-write-conversion): Handle the
authorKenichi Handa <handa@m17n.org>
Sat, 24 Feb 2007 01:26:22 +0000 (01:26 +0000)
committerKenichi Handa <handa@m17n.org>
Sat, 24 Feb 2007 01:26:22 +0000 (01:26 +0000)
case that BEG is a string.

lisp/ChangeLog
lisp/international/utf-8.el

index c6899bdbec8e7c85aa2a4bf6153459dc439cddf7..164dc076daee9d70c4752234332a877e8f26e278 100644 (file)
@@ -1,3 +1,8 @@
+2007-02-24  Kenichi Handa  <handa@m17n.org>
+
+       * international/utf-8.el (utf-8-pre-write-conversion): Handle the
+       case that BEG is a string.
+
 2007-02-24  Chris Moore <dooglus@gmail.com>
 
        * pgg-pgp5.el (pgg-pgp5-encrypt-region):
index 2e4a2f6f49ae63c72faa8dbd24907eea28d7831a..2d8791b49e3ead24f3ad14b5509fbd6a080d25b2 100644 (file)
@@ -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)