summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-07-30 17:36:13 -0500
committerJohn Wiegley <johnw@newartisans.com>2012-07-30 17:36:13 -0500
commit8b93cee99b4ddee2acce69aff809432913b4be36 (patch)
tree20db424e9275df9098d4ae144092998eed619494
parentfe7997d2b77e893674a16cfc8a8e4b9b5cdf28f7 (diff)
downloademacs-8b93cee99b.tar.gz
Use-package now accepts function as argument
-rw-r--r--lisp/use-package/use-package.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el
index b378c03900a..26b388432a3 100644
--- a/lisp/use-package/use-package.el
+++ b/lisp/use-package/use-package.el
@@ -392,9 +392,12 @@
,(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