From: Robert Pluim Date: Tue, 23 May 2023 13:01:11 +0000 (+0200) Subject: Stop adding the package directory to the load path X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1d5b164109b59559d34c545c2a163fa067ca22b2;p=emacs.git 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. --- 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.