From: Richard M. Stallman Date: Fri, 1 Feb 2002 04:32:24 +0000 (+0000) Subject: (check_mark): New arg to specify clearer error message. X-Git-Tag: ttn-vms-21-2-B4~16903 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f203cf07e4abc4b580bceb5e970a58624c491fdc;p=emacs.git (check_mark): New arg to specify clearer error message. Callers changed. --- diff --git a/src/callint.c b/src/callint.c index 6e835d51b18..35e1047bc70 100644 --- a/src/callint.c +++ b/src/callint.c @@ -160,12 +160,14 @@ char *callint_argfuns[] = {"", "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 @@ supply if the command inquires which events were used to invoke it. */) 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 @@ supply if the command inquires which events were used to invoke it. */) 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);