Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
e8cce5af
Commit
e8cce5af
authored
Nov 12, 1999
by
Kenichi Handa
Browse files
(Ftranslate_region): Check the buffer multibyteness.
parent
1bf21027
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
src/editfns.c
src/editfns.c
+5
-1
No files found.
src/editfns.c
View file @
e8cce5af
...
...
@@ -2425,6 +2425,7 @@ It returns the number of characters changed.")
int cnt; /* Number of changes made. */
int size; /* Size of translate table. */
int pos;
int multibyte = !NILP (current_buffer->enable_multibyte_characters);
validate_region (&start, &end);
CHECK_STRING (table, 2);
...
...
@@ -2445,7 +2446,10 @@ It returns the number of characters changed.")
int oc;
int pos_byte_next;
oc = STRING_CHAR_AND_LENGTH (p, stop - pos_byte, len);
if (multibyte)
oc = STRING_CHAR_AND_LENGTH (p, stop - pos_byte, len);
else
oc = *p, len = 1;
pos_byte_next = pos_byte + len;
if (oc < size && len == 1)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment