summaryrefslogtreecommitdiff
path: root/lisp/use-package/use-package.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2016-02-04 10:20:55 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2016-02-04 10:20:55 +0100
commit5cbfd926c5e4035fc46c17d4188015cb54204225 (patch)
tree59f6dd43be4e4097c6a454c3a2263557167e6b3e /lisp/use-package/use-package.el
parent9e2dcf8655fc6fe14e03bfe96c33d28dc31a1a12 (diff)
downloademacs-5cbfd926c5e4035fc46c17d4188015cb54204225.tar.gz
emacs-5cbfd926c5e4035fc46c17d4188015cb54204225.tar.bz2
emacs-5cbfd926c5e4035fc46c17d4188015cb54204225.zip
When :ensure is used install package as a selected package
Also shutup bytecompiler about package-archive-contents. * use-package.el (use-package-ensure-elpa): Add package to selected package by using second arg of package install.
Diffstat (limited to 'lisp/use-package/use-package.el')
-rw-r--r--lisp/use-package/use-package.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el
index dcc8842b6e9..05dbf651498 100644
--- a/lisp/use-package/use-package.el
+++ b/lisp/use-package/use-package.el
@@ -446,7 +446,7 @@ manually updated package."
;;
;; :ensure
;;
-
+(defvar package-archive-contents)
(defun use-package-normalize/:ensure (name keyword args)
(if (null args)
t
@@ -462,7 +462,7 @@ manually updated package."
(if (package-installed-p package)
t
(if (or (assoc package package-archive-contents) no-refresh)
- (package-install package)
+ (package-install package t)
(progn
(package-refresh-contents)
(use-package-ensure-elpa package t)))))