]> code.delx.au - gnu-emacs/blobdiff - src/callint.c
Merge from emacs--devo--0
[gnu-emacs] / src / callint.c
index 8f118de5a5990ada9289f7181247546d5487a0e1..57c86f0a63315713667bed58974917d8c8d61e12 100644 (file)
@@ -1,12 +1,12 @@
 /* Call a Lisp function interactively.
-   Copyright (C) 1985, 1986, 1993, 1994, 1995, 1997, 2000, 2002, 2003,
-                 2004, 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1985, 1986, 1993, 1994, 1995, 1997, 2000, 2001, 2002,
+                 2003, 2004, 2005, 2006, 2007  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
 GNU Emacs is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
 any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
@@ -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;
 
@@ -585,7 +588,7 @@ invoke it.  If KEYS is omitted or nil, the return value of
        case 'G':               /* Possibly nonexistent file name,
                                   default to directory alone. */
          args[i] = Fread_file_name (callint_message,
-                                    Qnil, Qnil, Qnil, build_string (""), Qnil);
+                                    Qnil, Qnil, Qnil, empty_unibyte_string, Qnil);
          break;
 
        case 'i':               /* Ignore an argument -- Does not do I/O */