comparison src/xdisp.c @ 25798:775d0eca0cc3

(add_to_log): Moved from xfaces.c. Remove frame parameter.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 23 Sep 1999 22:17:40 +0000
parents a6041d251b77
children a18595261196
comparison
equal deleted inserted replaced
25797:0d73a1e7b7f2 25798:775d0eca0cc3
4583 /*********************************************************************** 4583 /***********************************************************************
4584 Messages 4584 Messages
4585 ***********************************************************************/ 4585 ***********************************************************************/
4586 4586
4587 4587
4588 /* Add a message with format string FORMAT and arguments ARG1 and ARG2
4589 to *Messages*. */
4590
4591 void
4592 add_to_log (format, arg1, arg2)
4593 char *format;
4594 Lisp_Object arg1, arg2;
4595 {
4596 Lisp_Object args[3];
4597 Lisp_Object msg, fmt;
4598 char *buffer;
4599 int len;
4600 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
4601
4602 fmt = msg = Qnil;
4603 GCPRO4 (fmt, msg, arg1, arg2);
4604
4605 args[0] = fmt = build_string (format);
4606 args[1] = arg1;
4607 args[2] = arg2;
4608 msg = Fformat (make_number (3), args);
4609
4610 len = STRING_BYTES (XSTRING (msg)) + 1;
4611 buffer = (char *) alloca (len);
4612 strcpy (buffer, XSTRING (msg)->data);
4613
4614 message_dolog (buffer, len, 1, 0);
4615 UNGCPRO;
4616 }
4617
4618
4588 /* Output a newline in the *Messages* buffer if "needs" one. */ 4619 /* Output a newline in the *Messages* buffer if "needs" one. */
4589 4620
4590 void 4621 void
4591 message_log_maybe_newline () 4622 message_log_maybe_newline ()
4592 { 4623 {