[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/casefiddle.c [emacs-unicode-2]
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] Changes to emacs/src/casefiddle.c [emacs-unicode-2] |
Date: |
Mon, 06 Dec 2004 02:48:17 -0500 |
Index: emacs/src/casefiddle.c
diff -c emacs/src/casefiddle.c:1.43.6.3 emacs/src/casefiddle.c:1.43.6.4
*** emacs/src/casefiddle.c:1.43.6.3 Mon Jun 28 07:29:19 2004
--- emacs/src/casefiddle.c Mon Dec 6 07:41:56 2004
***************
*** 236,256 ****
}
else if (ASCII_CHAR_P (c2) && ASCII_CHAR_P (c))
FETCH_BYTE (start_byte) = c;
! else if (len == CHAR_BYTES (c))
{
int j;
unsigned char str[MAX_MULTIBYTE_LENGTH];
CHAR_STRING (c, str);
! for (j = 0; j < len; ++j)
! FETCH_BYTE (start_byte + j) = str[j];
! }
! else
! {
! TEMP_SET_PT_BOTH (start, start_byte);
! del_range_2 (start, start_byte, start + 1, start_byte + len, 0);
! insert_char (c);
! len = CHAR_BYTES (c);
}
}
start++;
--- 236,264 ----
}
else if (ASCII_CHAR_P (c2) && ASCII_CHAR_P (c))
FETCH_BYTE (start_byte) = c;
! else
{
+ int tolen = CHAR_BYTES (c);
int j;
unsigned char str[MAX_MULTIBYTE_LENGTH];
CHAR_STRING (c, str);
! if (len == tolen)
! {
! /* Length is unchanged. */
! for (j = 0; j < len; ++j)
! FETCH_BYTE (start_byte + j) = str[j];
! }
! else
! {
! /* Replace one character with the other,
! keeping text properties the same. */
! replace_range_2 (start, start_byte,
! start + 1, start_byte + len,
! str, 1, tolen,
! 0);
! len = tolen;
! }
}
}
start++;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/src/casefiddle.c [emacs-unicode-2],
Kenichi Handa <=