From 58b8be1cfe873434395ee1ad7d71ea84f2e8b385 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 17 Mar 2003 05:38:39 +0000 Subject: [PATCH] (ctext-post-read-conversion): Convert the search pattern to multibyte by string-to-multibyte. --- lisp/ChangeLog | 5 +++++ lisp/international/mule.el | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1d418634ed3..efb16cf9370 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2003-03-17 Kenichi Handa + + * international/mule.el (ctext-post-read-conversion): Convert the + search pattern to multibyte by string-to-multibyte. + 2003-03-16 Deepak Goel * calc/calc-forms.el (math-tzone-names): Introduce UTC as an alias diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 8e81dfb0679..9ba35cd32b9 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -1410,11 +1410,13 @@ The cdr of each element is the corresponding Emacs charset or coding system.") (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) ?@) -- 2.39.2