diff options
author | Jonas Bernoulli <jonas@bernoul.li> | 2017-10-13 14:08:06 +0200 |
---|---|---|
committer | Jonas Bernoulli <jonas@bernoul.li> | 2017-10-13 14:08:06 +0200 |
commit | 68c9ee4bff308b4426c1de4b80f57d6f8eed683c (patch) | |
tree | 0bbdb7843e147b3c3e0cf929142155a3f5d5001e | |
parent | 3f58555ed8a20e6a0891d82971d50ea10e96af92 (diff) | |
download | emacs-68c9ee4bff308b4426c1de4b80f57d6f8eed683c.tar.gz emacs-68c9ee4bff308b4426c1de4b80f57d6f8eed683c.tar.bz2 emacs-68c9ee4bff308b4426c1de4b80f57d6f8eed683c.zip |
Don't use with-demoted-errors in use-package-ensure-elpa
It expects a literal string as argument at macro-expansion
time, but we need to construct the message.
-rw-r--r-- | lisp/use-package/use-package.el | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index 78321621a07..4720c072ba6 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -737,17 +737,20 @@ If the package is installed, its entry is removed from ;; bypassed. (member context '(:byte-compile :ensure :config)) (y-or-n-p (format "Install package %S?" package)))) - (with-demoted-errors (format "Cannot load %s: %%S" name) - (when (assoc package (bound-and-true-p package-pinned-packages)) - (package-read-all-archive-contents)) - (if (assoc package package-archive-contents) - (progn (package-install package) t) + (condition-case-unless-debug err (progn - (package-refresh-contents) - (when (assoc package (bound-and-true-p - package-pinned-packages)) + (when (assoc package (bound-and-true-p package-pinned-packages)) (package-read-all-archive-contents)) - (package-install package)))))))) + (if (assoc package package-archive-contents) + (progn (package-install package) t) + (progn + (package-refresh-contents) + (when (assoc package (bound-and-true-p + package-pinned-packages)) + (package-read-all-archive-contents)) + (package-install package)))) + (error (message "Error: Cannot load %s: %S" name err) + nil)))))) (defun use-package-handler/:ensure (name keyword ensure rest state) (let* ((body (use-package-process-keywords name rest |