From 1d5b164109b59559d34c545c2a163fa067ca22b2 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Tue, 23 May 2023 15:01:11 +0200 Subject: [PATCH] Stop adding the package directory to the load path The generated autoloads files for packages have been updating the load-path for the last decade. * lisp/emacs-lisp/package.el (package-activate-1): Don't update load-path with package directory. --- lisp/emacs-lisp/package.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 78017b77677..3d3158111b2 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -901,8 +901,7 @@ correspond to previously loaded files." (when reload (package--reload-previously-loaded pkg-desc)) (with-demoted-errors "Error loading autoloads: %s" - (load (package--autoloads-file-name pkg-desc) nil t)) - (add-to-list 'load-path (directory-file-name pkg-dir))) + (load (package--autoloads-file-name pkg-desc) nil t))) ;; Add info node. (when (file-exists-p (expand-file-name "dir" pkg-dir)) ;; FIXME: not the friendliest, but simple. -- 2.39.2