From: Alex Kosorukoff Date: Wed, 7 May 2014 02:29:48 +0000 (-0700) Subject: if package can't be located, treat it the same way as disabled X-Git-Tag: emacs-29.0.90~1306^2~15^2~410^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6d02a320f6;p=emacs.git if package can't be located, treat it the same way as disabled There will be a message "Unable to locate " in the log. --- diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index 36e7e0b757e..4f5c545d0a1 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -300,7 +300,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