emacs-diffs
[Top][All Lists]
Advanced

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

feature/native-comp a55415a: Add 'EMACSNATIVELOADPATH' env variable supp


From: Andrea Corallo
Subject: feature/native-comp a55415a: Add 'EMACSNATIVELOADPATH' env variable support (bug#44726)
Date: Fri, 20 Nov 2020 05:01:34 -0500 (EST)

branch: feature/native-comp
commit a55415af7ea8ddc09dfda32ccb866c6556bb71c1
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>

    Add 'EMACSNATIVELOADPATH' env variable support (bug#44726)
    
        * lisp/startup.el (normal-top-level): Read 'EMACSNATIVELOADPATH'
        and add entries too `comp-eln-load-path'.
        * lisp/mail/emacsbug.el (report-emacs-bug): Dump
        also 'EMACSNATIVELOADPATH'.
---
 lisp/mail/emacsbug.el |  2 +-
 lisp/startup.el       | 10 +++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index d524b26..4af8780 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -313,7 +313,7 @@ usually do not have translators for other languages.\n\n")))
      (lambda (var)
        (let ((val (getenv var)))
         (if val (insert (format "  value of $%s: %s\n" var val)))))
-     '("EMACSDATA" "EMACSDOC" "EMACSLOADPATH" "EMACSPATH"
+     '("EMACSDATA" "EMACSDOC" "EMACSLOADPATH" "EMACSNATIVELOADPATH" "EMACSPATH"
        "LC_ALL" "LC_COLLATE" "LC_CTYPE" "LC_MESSAGES"
        "LC_MONETARY" "LC_NUMERIC" "LC_TIME" "LANG" "XMODIFIERS"))
     (insert (format "  locale-coding-system: %s\n" locale-coding-system))
diff --git a/lisp/startup.el b/lisp/startup.el
index 89b1d59..2beeaa1 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -534,9 +534,13 @@ It is the default value of the variable `top-level'."
     (setq user-emacs-directory
          (startup--xdg-or-homedot startup--xdg-config-home-emacs nil))
 
-    (when (boundp 'comp-eln-load-path)
-      (setq comp-eln-load-path (cons (concat user-emacs-directory "eln-cache/")
-                                     comp-eln-load-path)))
+    (when (featurep 'nativecomp)
+      (let ((path-env (getenv "EMACSNATIVELOADPATH")))
+        (when path-env
+          (dolist (path (split-string path-env ":"))
+            (unless (string= "" path)
+              (push path comp-eln-load-path)))))
+      (push (concat user-emacs-directory "eln-cache/") comp-eln-load-path))
     ;; Look in each dir in load-path for a subdirs.el file.  If we
     ;; find one, load it, which will add the appropriate subdirs of
     ;; that dir into load-path.  This needs to be done before setting



reply via email to

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