summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>1999-09-23 22:17:40 +0000
committerGerd Moellmann <gerd@gnu.org>1999-09-23 22:17:40 +0000
commit937248bc7fe010f1e56dea8613e671ad6bb6e138 (patch)
treea609b19827caafce8c19df1999f7e552035c93dc
parent86c8e8237595aefe8ec7073d1318d6b5724c2d16 (diff)
downloademacs-937248bc7fe010f1e56dea8613e671ad6bb6e138.tar.gz
(add_to_log): Moved from xfaces.c. Remove frame
parameter.
-rw-r--r--src/xdisp.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index e8bb7b72f73..cd05bbda5de 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -4585,6 +4585,37 @@ move_it_by_lines (it, dvpos, need_y_p)
***********************************************************************/
+/* Add a message with format string FORMAT and arguments ARG1 and ARG2
+ to *Messages*. */
+
+void
+add_to_log (format, arg1, arg2)
+ char *format;
+ Lisp_Object arg1, arg2;
+{
+ Lisp_Object args[3];
+ Lisp_Object msg, fmt;
+ char *buffer;
+ int len;
+ struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
+
+ fmt = msg = Qnil;
+ GCPRO4 (fmt, msg, arg1, arg2);
+
+ args[0] = fmt = build_string (format);
+ args[1] = arg1;
+ args[2] = arg2;
+ msg = Fformat (make_number (3), args);
+
+ len = STRING_BYTES (XSTRING (msg)) + 1;
+ buffer = (char *) alloca (len);
+ strcpy (buffer, XSTRING (msg)->data);
+
+ message_dolog (buffer, len, 1, 0);
+ UNGCPRO;
+}
+
+
/* Output a newline in the *Messages* buffer if "needs" one. */
void