changeset 50168:56e32316c94b

(ctext-post-read-conversion): Convert the search pattern to multibyte by string-to-multibyte.
author Kenichi Handa <handa@m17n.org>
date Mon, 17 Mar 2003 05:35:04 +0000
parents 7f0f2a8f1963
children 8825f03fc68a
files lisp/international/mule.el
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule.el	Sun Mar 16 22:38:48 2003 +0000
+++ b/lisp/international/mule.el	Mon Mar 17 05:35:04 2003 +0000
@@ -1410,11 +1410,13 @@
 	  (newpt (make-marker))
 	  (modified-p (buffer-modified-p))
 	  (case-fold-search nil)
+	  ;; We need multibyte conversion of "TO" type because the
+	  ;; buffer may be multibyte, and, in that case, the pattern
+	  ;; must contain eight-bit-control/graphic characters.
+	  (pattern (string-to-multibyte "\\(\e\\)%/[0-4]\\([\200-\377][\200-\377]\\)\\([^\002]+\\)\002\\|\e%G[^\e]+\e%@"))
 	  last-coding-system-used
 	  encoding textlen chset)
-      (while (re-search-forward
-	      "\\(\e\\)%/[0-4]\\([\200-\377][\200-\377]\\)\\([^\002]+\\)\002\\|\e%G[^\e]+\e%@"
-	      nil 'move)
+      (while (re-search-forward pattern nil 'move)
 	(set-marker newpt (point))
 	(set-marker pt (match-beginning 0))
 	(if (= (preceding-char) ?@)