diff options
author | Yuan Fu <yuan@debian-BULLSEYE-live-builder-AMD64> | 2022-08-29 11:41:10 -0700 |
---|---|---|
committer | Yuan Fu <yuan@debian-BULLSEYE-live-builder-AMD64> | 2022-08-29 11:41:10 -0700 |
commit | 77d5a0cf9fc4a6dc44f0c6ee5e3295e0eea08273 (patch) | |
tree | 969937ec44ce5ddf9447b074aa15314e0b9e8e95 /src/emacs.c | |
parent | e98b4715bb986524bde9356b62429af9786ae716 (diff) | |
parent | df2f6fb7fc4b79834ae40db8be2ccdc1e4a273f1 (diff) | |
download | emacs-77d5a0cf9fc4a6dc44f0c6ee5e3295e0eea08273.tar.gz |
Merge remote-tracking branch 'origin/master' into feature/tree-sitter
Diffstat (limited to 'src/emacs.c')
-rw-r--r-- | src/emacs.c | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/src/emacs.c b/src/emacs.c index 189692a02ea..8f19c486553 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -979,20 +979,24 @@ load_pdump (int argc, char **argv) sprintf (dump_file, "%s%c%s-%s%s", path_exec, DIRECTORY_SEP, argv0_base, hexbuf, suffix); #if !defined (NS_SELF_CONTAINED) - /* Assume the Emacs binary lives in a sibling directory as set up by - the default installation configuration. */ - const char *go_up = "../../../../bin/"; - needed += (strip_suffix ? strlen (strip_suffix) : 0) - - strlen (suffix) + strlen (go_up); - if (exec_bufsize < needed) + if (!(emacs_executable && *emacs_executable)) { - xfree (emacs_executable); - emacs_executable = xpalloc (NULL, &exec_bufsize, needed - exec_bufsize, - -1, 1); + /* If we didn't find the Emacs binary, assume that it lives in a + sibling directory as set up by the default installation + configuration. */ + const char *go_up = "../../../../bin/"; + needed += (strip_suffix ? strlen (strip_suffix) : 0) + - strlen (suffix) + strlen (go_up); + if (exec_bufsize < needed) + { + xfree (emacs_executable); + emacs_executable = xpalloc (NULL, &exec_bufsize, + needed - exec_bufsize, -1, 1); + } + sprintf (emacs_executable, "%s%c%s%s%s", + path_exec, DIRECTORY_SEP, go_up, argv0_base, + strip_suffix ? strip_suffix : ""); } - sprintf (emacs_executable, "%s%c%s%s%s", - path_exec, DIRECTORY_SEP, go_up, argv0_base, - strip_suffix ? strip_suffix : ""); #endif result = pdumper_load (dump_file, emacs_executable); @@ -1930,9 +1934,6 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem init_bignum (); init_threads (); init_eval (); -#ifdef HAVE_PGTK - init_pgtkterm (); /* Must come before `init_atimer'. */ -#endif running_asynch_code = 0; init_random (); init_xfaces (); @@ -1944,6 +1945,11 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem if (!initialized) syms_of_comp (); + /* 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); + no_loadup = argmatch (argv, argc, "-nl", "--no-loadup", 6, NULL, &skip_args); @@ -2419,11 +2425,11 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem #if defined WINDOWSNT || defined HAVE_NTGUI globals_of_w32select (); #endif + } #ifdef HAVE_HAIKU - init_haiku_select (); + init_haiku_select (); #endif - } init_charset (); |