Commit f90a5bf5 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(match_limit): Cleaner err msg when no match data available.

parent 3cb7143c
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment