# HG changeset patch # User Gerd Moellmann # Date 935263722 0 # Node ID fe92158a9e839c8042be09ca03cb0ac4052b5974 # Parent 99d49ec31b8a8ed0247034f972cf7478b529c523 (Fgarbage_collect): Use push_message, restore_message, pop_message. diff -r 99d49ec31b8a -r fe92158a9e83 src/alloc.c --- a/src/alloc.c Sat Aug 21 19:27:30 1999 +0000 +++ b/src/alloc.c Sat Aug 21 19:28:42 1999 +0000 @@ -1746,19 +1746,16 @@ struct handler *handler; register struct backtrace *backlist; register Lisp_Object tem; - char *omessage = echo_area_glyphs; - Lisp_Object omessage_string = echo_area_message; - int omessage_length = echo_area_glyphs_length; - int oldmultibyte = message_enable_multibyte; char stack_top_variable; register int i; - struct gcpro gcpro1; + int message_p; /* In case user calls debug_print during GC, don't let that cause a recursive GC. */ consing_since_gc = 0; - GCPRO1 (omessage_string); + /* Save what's currently displayed in the echo area. */ + message_p = push_message (); /* Save a copy of the contents of the stack, for debugging. */ #if MAX_SAVE_STACK > 0 @@ -1942,15 +1939,14 @@ if (garbage_collection_messages) { - if (STRINGP (omessage_string)) - message3_nolog (omessage_string, omessage_length, oldmultibyte); - if (omessage || minibuf_level > 0) - message2_nolog (omessage, omessage_length, oldmultibyte); + if (message_p || minibuf_level > 0) + restore_message (); else message1_nolog ("Garbage collecting...done"); } - UNGCPRO; + pop_message (); + return Fcons (Fcons (make_number (total_conses), make_number (total_free_conses)), Fcons (Fcons (make_number (total_symbols),