diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 83bc36a4596..c3f3b9c9803 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -2890,8 +2891,9 @@ describe-package-1 (insert " from " (format "%s" archive)) (insert " -- ") (package-make-button - "Install" - 'action 'package-install-button-action + (if (package-installed-p (package-desc-name pkg)) + "Reinstall" "Install") + 'action #'package-install-button-action 'package-desc desc)) (t (insert (capitalize status) "."))) (insert "\n") @@ -2983,7 +2985,7 @@ describe-package-1 (cdr (assq name package-archive-contents)) (let ((bi (assq name package--builtins))) (if bi (list (package--from-builtin bi)))))) - (other-pkgs (delete desc all-pkgs))) + (other-pkgs (delete-dups (delete desc all-pkgs)))) (when other-pkgs (package--print-help-section "Other versions" (mapconcat (lambda (opkg)