aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa1999-09-03 01:28:42 +0000
committerKenichi Handa1999-09-03 01:28:42 +0000
commita260318815a268ae273669e3116274732e1f1945 (patch)
treea696053a96149bbfa718a8b5e377c2fc6b6bed19 /src
parent4659838fc95c262b60650ea584efeaf34b4c4ec7 (diff)
downloademacs-a260318815a268ae273669e3116274732e1f1945.tar.gz
emacs-a260318815a268ae273669e3116274732e1f1945.zip
(Faset): Adjust the way to check byte-combining
possibility for the new handling of multibyte sequence.
Diffstat (limited to 'src')
-rw-r--r--src/data.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/data.c b/src/data.c
index a7e16c93abb..c1cfb817d6a 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1859,13 +1859,14 @@ IDX starts at 0.")
1859 error ("Attempt to change byte length of a string"); 1859 error ("Attempt to change byte length of a string");
1860 1860
1861 /* We can't accept a change causing byte combining. */ 1861 /* We can't accept a change causing byte combining. */
1862 if ((idxval > 0 && !CHAR_HEAD_P (*str) 1862 if (!ASCII_BYTE_P (*str)
1863 && (prev_byte = string_char_to_byte (array, idxval - 1), 1863 && ((idxval > 0 && !CHAR_HEAD_P (*str)
1864 (prev_byte + 1 < idxval_byte 1864 && (prev_byte = string_char_to_byte (array, idxval - 1),
1865 || (p[-1] >= 0x80 && p[-1] < 0xA0)))) 1865 BYTES_BY_CHAR_HEAD (XSTRING (array)->data[prev_byte])
1866 || (idxval < XSTRING (array)->size - 1 1866 > idxval_byte - prev_byte))
1867 && (*str >=0x80 && *str < 0xA0) 1867 || (idxval < XSTRING (array)->size - 1
1868 && !CHAR_HEAD_P (p[actual_len]))) 1868 && !CHAR_HEAD_P (p[actual_len])
1869 && new_len < BYTES_BY_CHAR_HEAD (*str))))
1869 error ("Attempt to change char length of a string"); 1870 error ("Attempt to change char length of a string");
1870 while (new_len--) 1871 while (new_len--)
1871 *p++ = *str++; 1872 *p++ = *str++;