]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve package install/delete button action
authorMasahiro Nakamura <tsuucat@icloud.com>
Wed, 14 Oct 2020 04:14:33 +0000 (06:14 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 14 Oct 2020 04:14:33 +0000 (06:14 +0200)
* lisp/emacs-lisp/package.el (package-install-button-action)
(package-delete-button-action): Run describe-package instead of
revert-buffer in order to use newer package-desc (bug#43983).

lisp/emacs-lisp/package.el

index 1f81e07754be0403aeb59387cc80af02d5450daf..5b7735125f559c00c019e1b08b664b67feba7c51 100644 (file)
@@ -2630,8 +2630,7 @@ Used for the `action' property of buttons in the buffer created by
     (when (y-or-n-p (format-message "Install package `%s'? "
                                     (package-desc-full-name pkg-desc)))
       (package-install pkg-desc nil)
-      (revert-buffer nil t)
-      (goto-char (point-min)))))
+      (describe-package (package-desc-name pkg-desc)))))
 
 (defun package-delete-button-action (button)
   "Run `package-delete' on the package BUTTON points to.
@@ -2641,8 +2640,7 @@ Used for the `action' property of buttons in the buffer created by
     (when (y-or-n-p (format-message "Delete package `%s'? "
                                     (package-desc-full-name pkg-desc)))
       (package-delete pkg-desc)
-      (revert-buffer nil t)
-      (goto-char (point-min)))))
+      (describe-package (package-desc-name pkg-desc)))))
 
 (defun package-keyword-button-action (button)
   "Show filtered \"*Packages*\" buffer for BUTTON.