diff options
| author | Richard M. Stallman | 2002-02-01 04:32:24 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-02-01 04:32:24 +0000 |
| commit | f203cf07e4abc4b580bceb5e970a58624c491fdc (patch) | |
| tree | cbdaf5ff9d05b62c90423250ba21ce4198860ba7 /src/callint.c | |
| parent | 65de839b4340ee962767768e6ebb398ba3ebd806 (diff) | |
| download | emacs-f203cf07e4abc4b580bceb5e970a58624c491fdc.tar.gz emacs-f203cf07e4abc4b580bceb5e970a58624c491fdc.zip | |
(check_mark): New arg to specify clearer error message.
Callers changed.
Diffstat (limited to 'src/callint.c')
| -rw-r--r-- | src/callint.c | 10 |
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 | ||
| 162 | static void | 162 | static void |
| 163 | check_mark () | 163 | check_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); |