]> git.eshelyaron.com Git - emacs.git/commitdiff
Stop adding the package directory to the load path
authorRobert Pluim <rpluim@gmail.com>
Tue, 23 May 2023 13:01:11 +0000 (15:01 +0200)
committerRobert Pluim <rpluim@gmail.com>
Tue, 23 May 2023 13:13:50 +0000 (15:13 +0200)
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

index 78017b776770250a63f7ad0619385666e2974a71..3d3158111b23d353da0c6393e1b527da134c4828 100644 (file)
@@ -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.