]> git.eshelyaron.com Git - emacs.git/commit
Fix loading *.eln files when Emacs is installed via symlinks
authorEli Zaretskii <eliz@gnu.org>
Sat, 17 Apr 2021 13:49:16 +0000 (16:49 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 17 Apr 2021 13:49:16 +0000 (16:49 +0300)
commit9aa5203b542f0c9ea7d074c6cfde2a28b466f5d1
tree0eb9faeeb7b1881aafca2795036e1989dae9d35d
parentf9c1008ced59f003d48dd7be39e9ec4aa0f02484
Fix loading *.eln files when Emacs is installed via symlinks

* src/emacs.c (real_filename, set_invocation_vars)
(init_vars_for_load): Functions deleted; callers adjusted.
(init_cmdargs): Put back all the code which was extracted into
set_invocation_vars.
(load_pdump_find_executable): Make sure the return value has any
symlinks in it expanded.
(load_pdump): Accept only 2 arguments, not 3.  Determine both the
file name of the Emacs executable and of the dump file in
synchronized manner, so that if we decided to look for the dump
file in its hardcoded installation directory, the directory of the
Emacs executable will also be where we expect it to be installed.
Pass only 2 arguments to pdumper_load.  (Bug#47800)  (Bug#44128)
* src/pdumper.c (dump_do_dump_relocation): Use emacs_execdir
instead of Vinvocation_directory to produce absolute file names of
*.eln files that are recorded in the pdumper file.  Pass the full
.eln file name to fixup_eln_load_path.
(pdumper_set_emacs_execdir) [HAVE_NATIVE_COMP]: New function.
(pdumper_load) [HAVE_NATIVE_COMP]: Call pdumper_set_emacs_execdir.
* src/comp.c (fixup_eln_load_path): Use Fsubstring_no_properties
instead of Fsubstring.  No need to cons a file name, as the caller
already did that.  Use explicit const string to avoid "magic"
values.

* lisp/startup.el (normal-top-level): Use expand-file-name instead
of concat.  Decode comp-eln-load-path and expand-file-name its
members.
lisp/startup.el
src/comp.c
src/comp.h
src/emacs.c
src/lisp.h
src/pdumper.c
src/pdumper.h