]> git.eshelyaron.com Git - emacs.git/commitdiff
Prefer expand-file-name to concat in native-compilation code
authorEli Zaretskii <eliz@gnu.org>
Mon, 15 Mar 2021 14:56:08 +0000 (16:56 +0200)
committerEli Zaretskii <eliz@gnu.org>
Mon, 15 Mar 2021 14:56:08 +0000 (16:56 +0200)
* lisp/emacs-lisp/comp.el (comp-eln-load-path-eff):
* src/comp.c (Fcomp_el_to_eln_filename)
(eln_load_path_final_clean_up): Prefer expand-file-name to concat.
(Bug#43725)

lisp/emacs-lisp/comp.el
src/comp.c

index 97efd1ab0c73f3f556c7aa75e621b31d6f019d7b..5a4a2f6ef152d206d1507b3bcff8859e707be3d9 100644 (file)
@@ -3691,9 +3691,9 @@ Prepare every function for final compilation and drive the C back-end."
   "Return a list of effective eln load directories.
 Account for `comp-load-path' and `comp-native-version-dir'."
   (mapcar (lambda (dir)
-            (concat (file-name-as-directory
-                     (expand-file-name dir invocation-directory))
-                    comp-native-version-dir))
+            (expand-file-name comp-native-version-dir
+                              (file-name-as-directory
+                               (expand-file-name dir invocation-directory))))
           comp-eln-load-path))
 
 (defun comp-trampoline-filename (subr-name)
index a79ee4ad87b386f3dd352e6983b243d355592d42..29b16c78ac06d97ef8a81b0dd0b7ae2f7beebb1a 100644 (file)
@@ -4121,8 +4121,8 @@ If BASE-DIR is nil use the first entry in `comp-eln-load-path'.  */)
     base_dir = Fexpand_file_name (base_dir, Vinvocation_directory);
 
   return Fexpand_file_name (filename,
-                           concat2 (Ffile_name_as_directory (base_dir),
-                                    Vcomp_native_version_dir));
+                           Fexpand_file_name (Vcomp_native_version_dir,
+                                              base_dir));
 }
 
 DEFUN ("comp--install-trampoline", Fcomp__install_trampoline,
@@ -4613,8 +4613,8 @@ eln_load_path_final_clean_up (void)
     {
       Lisp_Object files_in_dir =
        internal_condition_case_5 (Fdirectory_files,
-                                  concat2 (XCAR (dir_tail),
-                                           Vcomp_native_version_dir),
+                                  Fexpand_file_name (Vcomp_native_version_dir,
+                                                     XCAR (dir_tail)),
                                   Qt, build_string ("\\.eln\\.old\\'"), Qnil,
                                   Qnil, Qt, return_nil);
       FOR_EACH_TAIL (files_in_dir)