]> git.eshelyaron.com Git - emacs.git/commitdiff
Use-package now accepts function as argument
authorJohn Wiegley <johnw@newartisans.com>
Mon, 30 Jul 2012 22:36:13 +0000 (17:36 -0500)
committerJohn Wiegley <johnw@newartisans.com>
Mon, 30 Jul 2012 22:36:13 +0000 (17:36 -0500)
lisp/use-package/use-package.el

index b378c03900afd13036e417acee593c1d80c0ac59..26b388432a3d5387487b0396493881293c6db63f 100644 (file)
                               ,(if (file-name-absolute-p path)
                                    path
                                  (expand-file-name path user-emacs-directory))))
-            (if (stringp pkg-load-path)
-                (list pkg-load-path)
-              pkg-load-path))
+            (cond ((stringp pkg-load-path)
+                   (list pkg-load-path))
+                  ((functionp pkg-load-path)
+                   (funcall pkg-load-path))
+                  (t
+                   pkg-load-path)))
 
          (when byte-compile-current-file
            ,@defines-eval