1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-07 06:50:23 -08:00

Remove directory of deleted package from `load-path'

* lisp/emacs-lisp/package.el (package--delete-directory): Remove
the directory of the to-be-deleted package `load-path'.  Doc
fix.  (Bug#79597)
This commit is contained in:
Lin Sun 2025-10-07 06:30:20 +00:00 committed by Eli Zaretskii
parent 81bc83c1a5
commit 1eeadd1f14

View file

@ -2509,7 +2509,9 @@ installed), maybe you need to \\[package-refresh-contents]")
(defun package--delete-directory (dir)
"Delete PKG-DESC directory DIR recursively.
Clean-up the corresponding .eln files if Emacs is native
compiled."
compiled, and remove the DIR from `load-path'."
(setq load-path (cl-remove-if (lambda (s) (file-in-directory-p s dir))
load-path))
(when (featurep 'native-compile)
(cl-loop
for file in (directory-files-recursively dir