emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 42335c2c1f1: Fix value history shown for 'gc-cons-percentage'


From: Eli Zaretskii
Subject: emacs-29 42335c2c1f1: Fix value history shown for 'gc-cons-percentage'
Date: Sun, 12 Mar 2023 10:21:44 -0400 (EDT)

branch: emacs-29
commit 42335c2c1f18c250719dd621a1923d0f40b82927
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix value history shown for 'gc-cons-percentage'
    
    When Emacs is built, temacs is run in batch mode, so if we enlarge
    'gc-cons-percentage' in that case, the enlarged value will be
    "remembered" by the dumped Emacs, and will show confusing
    information in "C-h v", claiming that the original value was 1.0.
    Keeping the value at 0.1 during dumping avoids that.
    
    * src/emacs.c (main): Increase 'gc-cons-percentage' in batch mode
    only if we are not initializing (a.k.a. "dumping") Emacs.
---
 src/emacs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/emacs.c b/src/emacs.c
index 214e2e2a296..e63b0924282 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1954,7 +1954,7 @@ Using an Emacs configured with --with-x-toolkit=lucid 
does not have this problem
   /* Do less garbage collection in batch mode (since these tend to be
      more short-lived, and the memory is returned to the OS on exit
      anyway).  */
-  Vgc_cons_percentage = make_float (noninteractive? 1.0: 0.1);
+  Vgc_cons_percentage = make_float (noninteractive && initialized ? 1.0 : 0.1);
 
   no_loadup
     = argmatch (argv, argc, "-nl", "--no-loadup", 6, NULL, &skip_args);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]