aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorGerd Moellmann1999-08-21 19:28:42 +0000
committerGerd Moellmann1999-08-21 19:28:42 +0000
commit6efc7df7b88f2315138b507360363cee33a28229 (patch)
tree733530e8a5324295ca7f467c36956370080a6186 /src/alloc.c
parent572da0fe1ea5261e730aa728dbc6c5c470ff0757 (diff)
downloademacs-6efc7df7b88f2315138b507360363cee33a28229.tar.gz
emacs-6efc7df7b88f2315138b507360363cee33a28229.zip
(Fgarbage_collect): Use push_message, restore_message,
pop_message.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/alloc.c b/src/alloc.c
index c0da91bf61b..978c4240a28 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1746,19 +1746,16 @@ Garbage collection happens automatically if you cons more than\n\
1746 struct handler *handler; 1746 struct handler *handler;
1747 register struct backtrace *backlist; 1747 register struct backtrace *backlist;
1748 register Lisp_Object tem; 1748 register Lisp_Object tem;
1749 char *omessage = echo_area_glyphs;
1750 Lisp_Object omessage_string = echo_area_message;
1751 int omessage_length = echo_area_glyphs_length;
1752 int oldmultibyte = message_enable_multibyte;
1753 char stack_top_variable; 1749 char stack_top_variable;
1754 register int i; 1750 register int i;
1755 struct gcpro gcpro1; 1751 int message_p;
1756 1752
1757 /* In case user calls debug_print during GC, 1753 /* In case user calls debug_print during GC,
1758 don't let that cause a recursive GC. */ 1754 don't let that cause a recursive GC. */
1759 consing_since_gc = 0; 1755 consing_since_gc = 0;
1760 1756
1761 GCPRO1 (omessage_string); 1757 /* Save what's currently displayed in the echo area. */
1758 message_p = push_message ();
1762 1759
1763 /* Save a copy of the contents of the stack, for debugging. */ 1760 /* Save a copy of the contents of the stack, for debugging. */
1764#if MAX_SAVE_STACK > 0 1761#if MAX_SAVE_STACK > 0
@@ -1942,15 +1939,14 @@ Garbage collection happens automatically if you cons more than\n\
1942 1939
1943 if (garbage_collection_messages) 1940 if (garbage_collection_messages)
1944 { 1941 {
1945 if (STRINGP (omessage_string)) 1942 if (message_p || minibuf_level > 0)
1946 message3_nolog (omessage_string, omessage_length, oldmultibyte); 1943 restore_message ();
1947 if (omessage || minibuf_level > 0)
1948 message2_nolog (omessage, omessage_length, oldmultibyte);
1949 else 1944 else
1950 message1_nolog ("Garbage collecting...done"); 1945 message1_nolog ("Garbage collecting...done");
1951 } 1946 }
1952 1947
1953 UNGCPRO; 1948 pop_message ();
1949
1954 return Fcons (Fcons (make_number (total_conses), 1950 return Fcons (Fcons (make_number (total_conses),
1955 make_number (total_free_conses)), 1951 make_number (total_free_conses)),
1956 Fcons (Fcons (make_number (total_symbols), 1952 Fcons (Fcons (make_number (total_symbols),