* src/editfns.c, src/lisp.h (format2): Remove.
It is more trouble than it's worth, now that we have CALLN.
This is just a minor refactoring.
* src/buffer.c (Fkill_buffer):
* src/dbusbind.c (XD_OBJECT_TO_STRING):
* src/fileio.c (barf_or_query_if_file_exists):
Adjust to format2 going away.
&& BUF_MODIFF (b) > BUF_SAVE_MODIFF (b))
{
GCPRO1 (buffer);
- tem = do_yes_or_no_p (format2 ("Buffer %s modified; kill anyway? ",
- BVAR (b, name), make_number (0)));
+ AUTO_STRING (format, "Buffer %s modified; kill anyway? ");
+ tem = do_yes_or_no_p (CALLN (Fformat, format, BVAR (b, name)));
UNGCPRO;
if (NILP (tem))
return unbind_to (count, Qnil);
/* Transform the object to its string representation for debug
messages. */
-#define XD_OBJECT_TO_STRING(object) \
- SDATA (format2 ("%s", object, Qnil))
+static char *
+XD_OBJECT_TO_STRING (Lisp_Object object)
+{
+ AUTO_STRING (format, "%s");
+ return SSDATA (CALLN (Fformat, format, object));
+}
#define XD_DBUS_VALIDATE_BUS_ADDRESS(bus) \
do { \
return val;
}
-
-Lisp_Object
-format2 (const char *string1, Lisp_Object arg0, Lisp_Object arg1)
-{
- AUTO_STRING (format, string1);
- return CALLN (Fformat, format, arg0, arg1);
-}
\f
DEFUN ("char-equal", Fchar_equal, Schar_equal, 2, 2, 0,
doc: /* Return t if two characters match, optionally ignoring case.
xsignal2 (Qfile_already_exists,
build_string ("File already exists"), absname);
GCPRO1 (absname);
- tem = format2 ("File %s already exists; %s anyway? ",
- absname, build_string (querystring));
+ AUTO_STRING (format, "File %s already exists; %s anyway? ");
+ tem = CALLN (Fformat, format, absname, build_string (querystring));
if (quick)
tem = call1 (intern ("y-or-n-p"), tem);
else
/* Defined in editfns.c. */
extern void insert1 (Lisp_Object);
-extern Lisp_Object format2 (const char *, Lisp_Object, Lisp_Object);
extern Lisp_Object save_excursion_save (void);
extern Lisp_Object save_restriction_save (void);
extern void save_excursion_restore (Lisp_Object);