aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann1999-09-23 22:17:40 +0000
committerGerd Moellmann1999-09-23 22:17:40 +0000
commit937248bc7fe010f1e56dea8613e671ad6bb6e138 (patch)
treea609b19827caafce8c19df1999f7e552035c93dc /src
parent86c8e8237595aefe8ec7073d1318d6b5724c2d16 (diff)
downloademacs-937248bc7fe010f1e56dea8613e671ad6bb6e138.tar.gz
emacs-937248bc7fe010f1e56dea8613e671ad6bb6e138.zip
(add_to_log): Moved from xfaces.c. Remove frame
parameter.
Diffstat (limited to 'src')
-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)
4585 ***********************************************************************/ 4585 ***********************************************************************/
4586 4586
4587 4587
4588/* Add a message with format string FORMAT and arguments ARG1 and ARG2
4589 to *Messages*. */
4590
4591void
4592add_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
4590void 4621void