register int i, c, len;
register int inword = flag == CASE_DOWN;
+ /* If the case table is flagged as modified, rescan it. */
+ if (NILP (XCHAR_TABLE (current_buffer->downcase_table)->extras[1]))
+ Fset_case_table (current_buffer->downcase_table);
+
while (1)
{
if (INTEGERP (obj))
/* Not modifying because nothing marked */
return;
+ /* If the case table is flagged as modified, rescan it. */
+ if (NILP (XCHAR_TABLE (current_buffer->downcase_table)->extras[1]))
+ Fset_case_table (current_buffer->downcase_table);
+
validate_region (&b, &e);
start = XFASTINT (b);
end = XFASTINT (e);
for (i = start; i < end; i++)
{
- c = FETCH_CHAR (i);
+ c = FETCH_BYTE (i);
if (inword && flag != CASE_CAPITALIZE_UP)
c = DOWNCASE (c);
else if (!UPPERCASEP (c)
&& (!inword || flag != CASE_CAPITALIZE_UP))
c = UPCASE1 (c);
- FETCH_CHAR (i) = c;
+ FETCH_BYTE (i) = c;
if ((int) flag >= (int) CASE_CAPITALIZE)
inword = SYNTAX (c) == Sword;
}
CHECK_NUMBER (arg, 0);
iarg = XINT (arg);
- farend = scan_words (point, iarg);
+ farend = scan_words (PT, iarg);
if (!farend)
farend = iarg > 0 ? ZV : BEGV;
- *newpoint = point > farend ? point : farend;
+ *newpoint = PT > farend ? PT : farend;
XSETFASTINT (val, farend);
return val;
{
Lisp_Object beg, end;
int newpoint;
- XSETFASTINT (beg, point);
+ XSETFASTINT (beg, PT);
end = operate_on_word (arg, &newpoint);
casify_region (CASE_UP, beg, end);
SET_PT (newpoint);
{
Lisp_Object beg, end;
int newpoint;
- XSETFASTINT (beg, point);
+ XSETFASTINT (beg, PT);
end = operate_on_word (arg, &newpoint);
casify_region (CASE_DOWN, beg, end);
SET_PT (newpoint);
{
Lisp_Object beg, end;
int newpoint;
- XSETFASTINT (beg, point);
+ XSETFASTINT (beg, PT);
end = operate_on_word (arg, &newpoint);
casify_region (CASE_CAPITALIZE, beg, end);
SET_PT (newpoint);