You should have received a copy of the GNU General Public License
along with GNU Emacs; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
#include <config.h>
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;
}
the region to operate on. When used as a command, the text between\n\
point and the mark is operated on.\n\
See also `capitalize-region'.")
- (b, e)
- Lisp_Object b, e;
+ (beg, end)
+ Lisp_Object beg, end;
{
- casify_region (CASE_UP, b, e);
+ casify_region (CASE_UP, beg, end);
return Qnil;
}
These arguments specify the starting and ending character numbers of\n\
the region to operate on. When used as a command, the text between\n\
point and the mark is operated on.")
- (b, e)
- Lisp_Object b, e;
+ (beg, end)
+ Lisp_Object beg, end;
{
- casify_region (CASE_DOWN, b, e);
+ casify_region (CASE_DOWN, beg, end);
return Qnil;
}
and the rest of it is lower case.\n\
In programs, give two arguments, the starting and ending\n\
character positions to operate on.")
- (b, e)
- Lisp_Object b, e;
+ (beg, end)
+ Lisp_Object beg, end;
{
- casify_region (CASE_CAPITALIZE, b, e);
+ casify_region (CASE_CAPITALIZE, beg, end);
return Qnil;
}
Subsequent letters of each word are not changed.\n\
In programs, give two arguments, the starting and ending\n\
character positions to operate on.")
- (b, e)
- Lisp_Object b, e;
+ (beg, end)
+ Lisp_Object beg, end;
{
- casify_region (CASE_CAPITALIZE_UP, b, e);
+ casify_region (CASE_CAPITALIZE_UP, beg, end);
return Qnil;
}
\f
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);