]> code.delx.au - gnu-emacs/commitdiff
(Fcall_interactively): Make the parsing of interactive
authorDavid Kastrup <dak@gnu.org>
Mon, 25 Jun 2007 19:48:37 +0000 (19:48 +0000)
committerDavid Kastrup <dak@gnu.org>
Mon, 25 Jun 2007 19:48:37 +0000 (19:48 +0000)
specs somewhat more readable.

src/ChangeLog
src/callint.c

index 825292054ac187b387d7a5a04ca2ed99039189c5..b425016766caa31a4bd782998c75564b9e0be20c 100644 (file)
@@ -1,3 +1,8 @@
+2007-06-25  David Kastrup  <dak@gnu.org>
+
+       * callint.c (Fcall_interactively): Make the parsing of interactive
+       specs somewhat more readable.
+
 2007-06-23  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
        * macterm.c (x_draw_fringe_bitmap) [MAC_OSX]: Extend fringe background
index a989f9afe6d5fec126a14ca9a7713fc41847e960..887f87630e30d362ecab7e43671bf176c61e776e 100644 (file)
@@ -473,16 +473,19 @@ invoke it.  If KEYS is omitted or nil, the return value of
   /* Count the number of arguments the interactive spec would have
      us give to the function.  */
   tem = string;
-  for (j = 0; *tem; j++)
+  for (j = 0; *tem;)
     {
       /* 'r' specifications ("point and mark as 2 numeric args")
         produce *two* arguments.  */
-      if (*tem == 'r') j++;
+      if (*tem == 'r')
+       j += 2;
+      else
+       j++;
       tem = (unsigned char *) index (tem, '\n');
       if (tem)
-       tem++;
+       ++tem;
       else
-       tem = (unsigned char *) "";
+       break;
     }
   count = j;