From be2b4a983192efc0f5f7ce99a95e3bb648f3984a Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sun, 12 Apr 2026 13:09:09 +0200 Subject: [PATCH] Clean up 'Info-directory-list' after deleting package * lisp/emacs-lisp/package.el (package--delete-directory): Remove manual before physically deleting the package. (Bug#80776) --- lisp/emacs-lisp/package.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 0d21c520609..7d934222b16 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -2348,6 +2348,9 @@ installed), maybe you need to \\[package-refresh-contents]") "Delete PKG-DESC directory DIR recursively. Clean-up the corresponding .eln files if Emacs is native compiled, and remove the DIR from `load-path'." + (when (and (file-exists-p (expand-file-name "dir" dir)) + (boundp 'Info-directory-list)) + (cl-callf2 delete dir Info-directory-list)) (setq load-path (cl-remove-if (lambda (s) (file-in-directory-p s dir)) load-path)) (when (featurep 'native-compile)