From: Richard M. Stallman Date: Mon, 21 Jun 2004 03:24:25 +0000 (+0000) Subject: (match_limit): Cleaner err msg when no match data available. X-Git-Tag: ttn-vms-21-2-B4~5702 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f90a5bf53ae425bee1f729d80c0d426d2500c6ed;p=emacs.git (match_limit): Cleaner err msg when no match data available. --- diff --git a/src/search.c b/src/search.c index 24f21f053a5..ec83065bbc3 100644 --- a/src/search.c +++ b/src/search.c @@ -2622,8 +2622,10 @@ match_limit (num, beginningp) CHECK_NUMBER (num); n = XINT (num); - if (n < 0 || search_regs.num_regs <= 0) - args_out_of_range (num, make_number (search_regs.num_regs)); + if (n < 0) + args_out_of_range (num, 0); + if (search_regs.num_regs <= 0) + error ("No match data, because no search succeeded"); if (n >= search_regs.num_regs || search_regs.start[n] < 0) return Qnil;