changeset 56175:b53351ef3125

(match_limit): Cleaner err msg when no match data available.
author Richard M. Stallman <rms@gnu.org>
date Mon, 21 Jun 2004 03:24:25 +0000
parents 7b713bd3dad4
children 21c659556daa
files src/search.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/search.c	Mon Jun 21 03:23:27 2004 +0000
+++ b/src/search.c	Mon Jun 21 03:24:25 2004 +0000
@@ -2622,8 +2622,10 @@
 
   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;