diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-04-08 14:05:57 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-04-08 14:05:57 +0000 |
commit | 516db9801633350eb638bbcb71a635fee5cfae74 (patch) | |
tree | 9e62573f08a673f4fcbcfb0fdc1d3531ea3dd019 | |
parent | 6321b250e75387c7cd94955b87d40bbe85a3f437 (diff) | |
download | emacs-516db9801633350eb638bbcb71a635fee5cfae74.tar.gz |
(garbage_collection_messages): New variable.
(syms_of_alloc): Set up Lisp variable.
(Fgarbage_collect): Variable controls whether to display messages.
-rw-r--r-- | src/alloc.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/alloc.c b/src/alloc.c index c667acecdfc..bb27a5df109 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -88,6 +88,9 @@ int gc_cons_threshold; /* Nonzero during gc */ int gc_in_progress; +/* Nonzero means display messages at beginning and end of GC. */ +int garbage_collection_messages; + #ifndef VIRT_ADDR_VARIES extern #endif /* VIRT_ADDR_VARIES */ @@ -1490,7 +1493,7 @@ Garbage collection happens automatically if you cons more than\n\ } #endif /* MAX_SAVE_STACK > 0 */ - if (!noninteractive) + if (garbage_collection_messages) message1_nolog ("Garbage collecting..."); /* Don't keep command history around forever */ @@ -1606,10 +1609,13 @@ Garbage collection happens automatically if you cons more than\n\ if (gc_cons_threshold < 10000) gc_cons_threshold = 10000; - if (omessage || minibuf_level > 0) - message2_nolog (omessage, omessage_length); - else if (!noninteractive) - message1_nolog ("Garbage collecting...done"); + if (garbage_collection_messages) + { + if (omessage || minibuf_level > 0) + message2_nolog (omessage, omessage_length); + else + message1_nolog ("Garbage collecting...done"); + } return Fcons (Fcons (make_number (total_conses), make_number (total_free_conses)), @@ -2611,6 +2617,10 @@ The size is counted as the number of bytes occupied,\n\ which includes both saved text and other data."); undo_strong_limit = 30000; + DEFVAR_BOOL ("garbage-collection-messages", &garbage_collection_messages, + "Non-nil means display messages at start and end of garbage collection."); + garbage_collection_messages = 0; + /* We build this in advance because if we wait until we need it, we might not be able to allocate the memory to hold it. */ memory_signal_data |