/* 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,
/* 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;
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 */