changeset 49443:f9f7612c767a

(format2): New function, replaces format1 but takes exactly two Lisp Objects as format args.
author Richard M. Stallman <rms@gnu.org>
date Sat, 25 Jan 2003 19:48:14 +0000
parents 20d2231b6ee7
children a80513b20297
files src/editfns.c
diffstat 1 files changed, 8 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/src/editfns.c	Sat Jan 25 19:47:02 2003 +0000
+++ b/src/editfns.c	Sat Jan 25 19:48:14 2003 +0000
@@ -3648,30 +3648,17 @@
   return val;
 }
 
-
-/* VARARGS 1 */
 Lisp_Object
-#ifdef NO_ARG_ARRAY
-format1 (string1, arg0, arg1, arg2, arg3, arg4)
-     EMACS_INT arg0, arg1, arg2, arg3, arg4;
-#else
-format1 (string1)
-#endif
+format2 (string1, arg0, arg1)
      char *string1;
+     Lisp_Object arg0, arg1;
 {
-  char buf[100];
-#ifdef NO_ARG_ARRAY
-  EMACS_INT args[5];
-  args[0] = arg0;
-  args[1] = arg1;
-  args[2] = arg2;
-  args[3] = arg3;
-  args[4] = arg4;
-  doprnt (buf, sizeof buf, string1, (char *)0, 5, (char **) args);
-#else
-  doprnt (buf, sizeof buf, string1, (char *)0, 5, &string1 + 1);
-#endif
-  return build_string (buf);
+  Lisp_Object args[3];
+  int numargs;
+  args[0] = build_string (string1);
+  args[1] = arg0;
+  args[2] = arg1;
+  return Fformat (3, args);
 }
 
 DEFUN ("char-equal", Fchar_equal, Schar_equal, 2, 2, 0,