diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2016-06-13 17:21:29 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2016-06-13 17:28:33 +0200 |
commit | 8ec930ec03a0656b8f4441dc18496f25ce4d16a6 (patch) | |
tree | 1fa6bbe48b18fa06097d24814bd08803d2bc6687 /helm-elisp-package.el | |
parent | cde81b51617662a0825acbe13a97cd490a9f1754 (diff) |
Fix new behavior or package-install for emacs-25.
The meaning of second arg of package-install have changed since
initial versions using package-selected-packages.
* helm-elisp-package.el (helm-el-package-install-1): No need now
to handle package-selected-packages.
(helm-el-package-upgrade-1): Inverse meaning of 2nd arg.
Diffstat (limited to 'helm-elisp-package.el')
-rw-r--r-- | helm-elisp-package.el | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/helm-elisp-package.el b/helm-elisp-package.el index 0b2e340a..059c05e1 100644 --- a/helm-elisp-package.el +++ b/helm-elisp-package.el @@ -105,26 +105,20 @@ (defun helm-el-package-install-1 (pkg-list) (cl-loop with mkd = pkg-list - for p in mkd - for id = (get-text-property 0 'tabulated-list-id p) - do (package-install - (if (fboundp 'package-desc-name) id (car id))) - collect (if (fboundp 'package-desc-full-name) id (car id)) - into installed-list - finally do (progn - (when (boundp 'package-selected-packages) - (customize-save-variable - 'package-selected-packages - (append (mapcar 'package-desc-name installed-list) - package-selected-packages))) - (if (fboundp 'package-desc-full-name) - (message (format "%d packages installed:\n(%s)" - (length installed-list) - (mapconcat #'package-desc-full-name - installed-list ", "))) - (message (format "%d packages installed:\n(%s)" - (length installed-list) - (mapconcat 'symbol-name installed-list ", "))))))) + for p in mkd + for id = (get-text-property 0 'tabulated-list-id p) + do (package-install + (if (fboundp 'package-desc-name) id (car id))) + collect (if (fboundp 'package-desc-full-name) id (car id)) + into installed-list + finally do (if (fboundp 'package-desc-full-name) + (message (format "%d packages installed:\n(%s)" + (length installed-list) + (mapconcat #'package-desc-full-name + installed-list ", "))) + (message (format "%d packages installed:\n(%s)" + (length installed-list) + (mapconcat 'symbol-name installed-list ", ")))))) (defun helm-el-package-install (_candidate) (helm-el-package-install-1 (helm-marked-candidates))) @@ -213,7 +207,10 @@ (ignore)) ((equal pkg-desc upgrade) ;;Install. - (package-install pkg-desc)) + (with-no-warnings + (if (boundp 'package-selected-packages) + (package-install pkg-desc t) + (package-install pkg-desc)))) (t ;; Delete. (if (boundp 'package-selected-packages) @@ -386,7 +383,7 @@ ;; packages already installed, the name (as symbol) ;; fails with such packages. (package-install - (cadr (assq name package-archive-contents)))) + (cadr (assq name package-archive-contents)) t)) (package-delete pkg-desc) (package-install name)))) |