]> git.eshelyaron.com Git - emacs.git/commitdiff
if package can't be located, treat it the same way as disabled
authorAlex Kosorukoff <alex@3form.com>
Wed, 7 May 2014 02:29:48 +0000 (19:29 -0700)
committerAlex Kosorukoff <alex@3form.com>
Wed, 7 May 2014 03:38:14 +0000 (20:38 -0700)
There will be a message "Unable to locate <package-name>" in the log.

lisp/use-package/use-package.el

index 36e7e0b757e24659ab46f30ee68f03fa1abf8abe..4f5c545d0a1215bf221ed262bed0f257f7b3c663 100644 (file)
@@ -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