diff options
author | Kenichi Handa <handa@m17n.org> | 2004-01-15 11:31:57 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2004-01-15 11:31:57 +0000 |
commit | 8046052576e208af420cf72646a99b4d1cefa02a (patch) | |
tree | 2234743a66d5b2bca3430439a8a0c352a55ab3d6 /src/search.c | |
parent | e75c1a57f7d262845b072f1789ca646fc952528f (diff) | |
download | emacs-8046052576e208af420cf72646a99b4d1cefa02a.tar.gz |
(Freplace_match): Use make_multibyte_string or
make_unibyte_string according to the buffer multibyteness.
Diffstat (limited to 'src/search.c')
-rw-r--r-- | src/search.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/search.c b/src/search.c index 538cb8dfa64..020573b75a1 100644 --- a/src/search.c +++ b/src/search.c @@ -2553,8 +2553,16 @@ since only regular expressions have distinguished subexpressions. */) } if (really_changed) - newtext = make_string (substed, substed_len); + { + if (buf_multibyte) + { + int nchars = multibyte_chars_in_text (substed, substed_len); + newtext = make_multibyte_string (substed, nchars, substed_len); + } + else + newtext = make_unibyte_string (substed, substed_len); + } xfree (substed); } |