aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/callint.c10
1 files changed, 6 insertions, 4 deletions
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[]
160 = {"", "point", "mark", "region-beginning", "region-end"}; 160 = {"", "point", "mark", "region-beginning", "region-end"};
161 161
162static void 162static void
163check_mark () 163check_mark (for_region)
164 int for_region;
164{ 165{
165 Lisp_Object tem; 166 Lisp_Object tem;
166 tem = Fmarker_buffer (current_buffer->mark); 167 tem = Fmarker_buffer (current_buffer->mark);
167 if (NILP (tem) || (XBUFFER (tem) != current_buffer)) 168 if (NILP (tem) || (XBUFFER (tem) != current_buffer))
168 error ("The mark is not set now"); 169 error (for_region ? "The mark is not set now, so there is no region"
170 : "The mark is not set now");
169 if (!NILP (Vtransient_mark_mode) && NILP (Vmark_even_if_inactive) 171 if (!NILP (Vtransient_mark_mode) && NILP (Vmark_even_if_inactive)
170 && NILP (current_buffer->mark_active)) 172 && NILP (current_buffer->mark_active))
171 Fsignal (Qmark_inactive, Qnil); 173 Fsignal (Qmark_inactive, Qnil);
@@ -609,7 +611,7 @@ supply if the command inquires which events were used to invoke it. */)
609 break; 611 break;
610 612
611 case 'm': /* Value of mark. Does not do I/O. */ 613 case 'm': /* Value of mark. Does not do I/O. */
612 check_mark (); 614 check_mark (0);
613 /* visargs[i] = Qnil; */ 615 /* visargs[i] = Qnil; */
614 args[i] = current_buffer->mark; 616 args[i] = current_buffer->mark;
615 varies[i] = 2; 617 varies[i] = 2;
@@ -664,7 +666,7 @@ supply if the command inquires which events were used to invoke it. */)
664 break; 666 break;
665 667
666 case 'r': /* Region, point and mark as 2 args. */ 668 case 'r': /* Region, point and mark as 2 args. */
667 check_mark (); 669 check_mark (1);
668 set_marker_both (point_marker, Qnil, PT, PT_BYTE); 670 set_marker_both (point_marker, Qnil, PT, PT_BYTE);
669 /* visargs[i+1] = Qnil; */ 671 /* visargs[i+1] = Qnil; */
670 foo = marker_position (current_buffer->mark); 672 foo = marker_position (current_buffer->mark);