+2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
+
+ * editfns.c (region_limit): Simplify by using clip_to_bounds.
+
2012-07-05 Jan Djärv <jan.h.d@swipnet.se>
* gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
if (NILP (m))
error ("The mark is not set now, so there is no region");
- if ((PT < XFASTINT (m)) == (beginningp != 0))
- return make_number (PT);
- else
- { /* Clip to the current narrowing (bug#11770). */
- ptrdiff_t mark = XFASTINT (m);
- return make_number (mark < BEGV ? BEGV : mark > ZV ? ZV : mark);
- }
+ /* Clip to the current narrowing (bug#11770). */
+ return make_number ((PT < XFASTINT (m)) == (beginningp != 0)
+ ? PT
+ : clip_to_bounds (BEGV, XFASTINT (m), ZV));
}
DEFUN ("region-beginning", Fregion_beginning, Sregion_beginning, 0, 0, 0,