Commit 6d6d9cd6 authored by Paul Eggert's avatar Paul Eggert
Browse files

* src/casefiddle.c (casify_word): Simplify.

parent 6fdecd4a
......@@ -378,24 +378,12 @@ character positions to operate on. */)
static Lisp_Object
casify_word (enum case_action flag, Lisp_Object arg)
Lisp_Object beg, end;
ptrdiff_t newpoint;
iarg = XINT (arg);
newpoint = scan_words (PT, iarg);
if (!newpoint)
newpoint = iarg > 0 ? ZV : BEGV;
XSETFASTINT (end, newpoint);
if (PT > newpoint)
newpoint = PT;
casify_region (flag, beg, end);
ptrdiff_t farend = scan_words (PT, XINT (arg));
if (!farend)
farend = XINT (arg) <= 0 ? BEGV : ZV;
ptrdiff_t newpoint = max (PT, farend);
casify_region (flag, make_number (PT), make_number (farend));
SET_PT (newpoint);
return Qnil;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment