# HG changeset patch # User Richard M. Stallman # Date 1012537944 0 # Node ID 531bd3a9e67a768d0defd4a9e3685413b5dab906 # Parent 45598283ce0de3cf30a99db7204ef09e1b0bb8ae (check_mark): New arg to specify clearer error message. Callers changed. diff -r 45598283ce0d -r 531bd3a9e67a src/callint.c --- a/src/callint.c Fri Feb 01 04:29:36 2002 +0000 +++ b/src/callint.c Fri Feb 01 04:32:24 2002 +0000 @@ -160,12 +160,14 @@ = {"", "point", "mark", "region-beginning", "region-end"}; static void -check_mark () +check_mark (for_region) + int for_region; { Lisp_Object tem; tem = Fmarker_buffer (current_buffer->mark); if (NILP (tem) || (XBUFFER (tem) != current_buffer)) - error ("The mark is not set now"); + error (for_region ? "The mark is not set now, so there is no region" + : "The mark is not set now"); if (!NILP (Vtransient_mark_mode) && NILP (Vmark_even_if_inactive) && NILP (current_buffer->mark_active)) Fsignal (Qmark_inactive, Qnil); @@ -609,7 +611,7 @@ break; case 'm': /* Value of mark. Does not do I/O. */ - check_mark (); + check_mark (0); /* visargs[i] = Qnil; */ args[i] = current_buffer->mark; varies[i] = 2; @@ -664,7 +666,7 @@ break; case 'r': /* Region, point and mark as 2 args. */ - check_mark (); + check_mark (1); set_marker_both (point_marker, Qnil, PT, PT_BYTE); /* visargs[i+1] = Qnil; */ foo = marker_position (current_buffer->mark);