diff options
author | John Wiegley <johnw@newartisans.com> | 2014-05-07 12:24:10 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2014-05-07 12:24:10 -0500 |
commit | 8c04377608bd9b27d6fc6c37990984185563a907 (patch) | |
tree | 020b6177fcce71d2a2a843444da003972f442154 /lisp/use-package/use-package.el | |
parent | a9ba368fa79e4c15b624de73e30c87c98475d466 (diff) | |
parent | 6d02a320f6e6274a27d4cdd721a92d65ff6c3226 (diff) | |
download | emacs-8c04377608bd9b27d6fc6c37990984185563a907.tar.gz emacs-8c04377608bd9b27d6fc6c37990984185563a907.tar.bz2 emacs-8c04377608bd9b27d6fc6c37990984185563a907.zip |
Merge pull request from alexko/master
if package can't be located, treat it the same way as disabled
GitHub-reference: https://github.com/jwiegley/use-package/issues/104
Diffstat (limited to 'lisp/use-package/use-package.el')
-rw-r--r-- | lisp/use-package/use-package.el | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index 0012d26597d..51c4dfaae20 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -304,7 +304,16 @@ For full documentation. please see commentary. (name-symbol (if (stringp name) (intern name) name))) ;; force this immediately -- one off cost - (unless (use-package-plist-get args :disabled) + (unless + (or (use-package-plist-get args :disabled) + (if (locate-library + name-string nil + (mapcar + (lambda (path) (expand-file-name path user-emacs-directory)) + (cond ((stringp pkg-load-path) (list pkg-load-path)) + ((functionp pkg-load-path) (funcall pkg-load-path)) + (t pkg-load-path)))) nil + (message "Unable to locate %s" name-string))) (let* ((ensure (use-package-plist-get args :ensure)) (package-name |