[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/casefiddle.c [lexbind]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/src/casefiddle.c [lexbind] |
Date: |
Thu, 04 Nov 2004 08:29:16 -0500 |
Index: emacs/src/casefiddle.c
diff -c emacs/src/casefiddle.c:1.40.4.6 emacs/src/casefiddle.c:1.40.4.7
*** emacs/src/casefiddle.c:1.40.4.6 Fri Oct 29 02:05:09 2004
--- emacs/src/casefiddle.c Thu Nov 4 13:12:22 2004
***************
*** 235,240 ****
--- 235,244 ----
else if (!UPPERCASEP (c)
&& (!inword || flag != CASE_CAPITALIZE_UP))
c = UPCASE1 (c);
+ if (multibyte && c >= 0x80)
+ /* A multibyte result character can't be handled in this
+ simple loop. */
+ break;
FETCH_BYTE (i) = c;
if (c != c2)
changed = 1;
***************
*** 272,293 ****
tolen = CHAR_STRING (c2, str),
fromlen == tolen)
{
for (j = 0; j < tolen; ++j)
FETCH_BYTE (i + j) = str[j];
}
else
! {
! error ("Can't casify letters that change length");
! #if 0 /* This is approximately what we'd like to be able to do here */
! if (tolen < fromlen)
! del_range_1 (i + tolen, i + fromlen, 0, 0);
! else if (tolen > fromlen)
! {
! TEMP_SET_PT (i + fromlen);
! insert_1 (str + fromlen, tolen - fromlen, 1, 0, 0);
! }
! #endif
! }
}
if ((int) flag >= (int) CASE_CAPITALIZE)
inword = SYNTAX (c2) == Sword;
--- 276,292 ----
tolen = CHAR_STRING (c2, str),
fromlen == tolen)
{
+ /* Length is unchanged. */
for (j = 0; j < tolen; ++j)
FETCH_BYTE (i + j) = str[j];
}
else
! /* Replace one character with the other,
! keeping text properties the same. */
! replace_range_2 (start + 1, i + tolen,
! start + 2, i + tolen + fromlen,
! str, 1, tolen,
! 0);
}
if ((int) flag >= (int) CASE_CAPITALIZE)
inword = SYNTAX (c2) == Sword;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/src/casefiddle.c [lexbind],
Miles Bader <=