/[emacs]/emacs/src/casefiddle.c
ViewVC logotype

Diff of /emacs/src/casefiddle.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.40.4.6 by miles, Fri Oct 29 02:05:09 2004 UTC revision 1.40.4.7 by miles, Thu Nov 4 13:12:22 2004 UTC
# Line 235  casify_region (flag, b, e) Line 235  casify_region (flag, b, e)
235        else if (!UPPERCASEP (c)        else if (!UPPERCASEP (c)
236                 && (!inword || flag != CASE_CAPITALIZE_UP))                 && (!inword || flag != CASE_CAPITALIZE_UP))
237          c = UPCASE1 (c);          c = UPCASE1 (c);
238          if (multibyte && c >= 0x80)
239            /* A multibyte result character can't be handled in this
240               simple loop.  */
241            break;
242        FETCH_BYTE (i) = c;        FETCH_BYTE (i) = c;
243        if (c != c2)        if (c != c2)
244          changed = 1;          changed = 1;
# Line 272  casify_region (flag, b, e) Line 276  casify_region (flag, b, e)
276                         tolen = CHAR_STRING (c2, str),                         tolen = CHAR_STRING (c2, str),
277                         fromlen == tolen)                         fromlen == tolen)
278                  {                  {
279                      /* Length is unchanged.  */
280                    for (j = 0; j < tolen; ++j)                    for (j = 0; j < tolen; ++j)
281                      FETCH_BYTE (i + j) = str[j];                      FETCH_BYTE (i + j) = str[j];
282                  }                  }
283                else                else
284                  {                  /* Replace one character with the other,
285                    error ("Can't casify letters that change length");                     keeping text properties the same.  */
286  #if 0 /* This is approximately what we'd like to be able to do here */                  replace_range_2 (start + 1, i + tolen,
287                    if (tolen < fromlen)                                   start + 2, i + tolen + fromlen,
288                      del_range_1 (i + tolen, i + fromlen, 0, 0);                                   str, 1, tolen,
289                    else if (tolen > fromlen)                                   0);
                     {  
                       TEMP_SET_PT (i + fromlen);  
                       insert_1 (str + fromlen, tolen - fromlen, 1, 0, 0);  
                     }  
 #endif  
                 }  
290              }              }
291            if ((int) flag >= (int) CASE_CAPITALIZE)            if ((int) flag >= (int) CASE_CAPITALIZE)
292              inword = SYNTAX (c2) == Sword;              inword = SYNTAX (c2) == Sword;

Legend:
Removed from v.1.40.4.6  
changed lines
  Added in v.1.40.4.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26