1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00

; Fix issue when installing packages from Dired

* lisp/emacs-lisp/package.el (package-dir-info, package-unpack):
Force Dired to return list of packages explicitly marked for
installation.  Without the optional argument, Dired will return
the file under the current point if no files are selected.
This commit is contained in:
Philip Kaludercic 2025-11-23 11:14:18 +01:00
parent 4ea81f359c
commit c3604c3224
No known key found for this signature in database

View file

@ -1029,7 +1029,7 @@ untar into a directory named DIR; otherwise, signal an error."
(make-directory pkg-dir t)
(let ((file-list
(or (and (derived-mode-p 'dired-mode)
(dired-get-marked-files))
(dired-get-marked-files nil 'marked))
(directory-files-recursively default-directory "" nil))))
(dolist (source-file file-list)
(let ((target (expand-file-name
@ -1278,7 +1278,7 @@ The return result is a `package-desc'."
(package--read-pkg-desc 'dir))
(catch 'found
(let ((files (or (and (derived-mode-p 'dired-mode)
(dired-get-marked-files))
(dired-get-marked-files nil 'marked))
(directory-files-recursively default-directory "\\.el\\'"))))
;; We sort the file names in lexicographical order, to ensure
;; that we check shorter file names first (ie. those further