diff options
Diffstat (limited to 'nixpkgs/pkgs')
-rw-r--r-- | nixpkgs/pkgs/applications/editors/emacs/site-start.el | 11 | ||||
-rw-r--r-- | nixpkgs/pkgs/build-support/emacs/wrapper.sh | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/editors/emacs/site-start.el b/nixpkgs/pkgs/applications/editors/emacs/site-start.el index de4708b88908..f51b6645157e 100644 --- a/nixpkgs/pkgs/applications/editors/emacs/site-start.el +++ b/nixpkgs/pkgs/applications/editors/emacs/site-start.el @@ -22,6 +22,17 @@ least specific (the system profile)" (nix--profile-paths))))) (setq load-path (append paths load-path))) +;;; Remove wrapper site-lisp from EMACSLOADPATH so it's not propagated +;;; to any other Emacsen that might be started as subprocesses. +(let ((wrapper-site-lisp (getenv "emacsWithPackages_siteLisp")) + (env-load-path (getenv "EMACSLOADPATH"))) + (when wrapper-site-lisp + (setenv "emacsWithPackages_siteLisp" nil)) + (when (and wrapper-site-lisp env-load-path) + (let* ((env-list (split-string env-load-path ":")) + (new-env-list (delete wrapper-site-lisp env-list))) + (setenv "EMACSLOADPATH" (when new-env-list + (mapconcat 'identity new-env-list ":")))))) ;;; Make `woman' find the man pages (defvar woman-manpath) diff --git a/nixpkgs/pkgs/build-support/emacs/wrapper.sh b/nixpkgs/pkgs/build-support/emacs/wrapper.sh index 3c011b7f1364..6e0451fc1d4f 100644 --- a/nixpkgs/pkgs/build-support/emacs/wrapper.sh +++ b/nixpkgs/pkgs/build-support/emacs/wrapper.sh @@ -22,5 +22,6 @@ else fi export EMACSLOADPATH="${newLoadPath[*]}" +export emacsWithPackages_siteLisp=@wrapperSiteLisp@ exec @prog@ "$@" |