Skip to content

Commit

Permalink
Improve package install/delete button action
Browse files Browse the repository at this point in the history
* 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).
  • Loading branch information
tsuu32 authored and larsmagne committed Oct 14, 2020
1 parent e88d75a commit f256687
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lisp/emacs-lisp/package.el
Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit f256687

Please sign in to comment.