John Wiegley
90ca8adc41
Default use-package-verbose to nil
2013-12-02 03:06:27 -07:00
Philippe Vaucher
c7560f7be7
Remove el-get support
2013-11-05 10:32:21 +01:00
Ting-Yu Lin
36cf13ef47
Add :pre-load to use-package-keywords
...
The :pre-load keyword cannot be used unless it is in
`use-package-keywords' list.
2013-10-26 00:11:31 +08:00
Phil Hudson
a116fc2136
Properly enable runtime dependency for :idle stanza (issue)
...
See issue https://github.com/jwiegley/use-package/issues/60 .
GitHub-reference: https://github.com/jwiegley/use-package/issues/60
2013-10-15 17:53:58 +01:00
Noam Postavsky
94072fba77
remove extra comma (added by 026c46c
)
2013-10-14 12:59:41 -04:00
Noam Postavsky
026c46c057
let with-elapsed-timer return last form
2013-10-12 14:26:50 -04:00
Noam Postavsky
3d871c7994
make `with-elapsed-timer' hygienic
2013-10-12 14:26:50 -04:00
Noam Postavsky
61fd933807
with-elapsed-timer: only check verbosity once
2013-10-12 14:26:50 -04:00
Noam Postavsky
29abf59bad
macroexpand not needed
...
Since lambda thunking replaced quoting in a76d167
.
To see why, observe that cases 3 and 4 disassemble to identical code.
The difference between cases 1 and 2 shows why the macroexpand was
needed originally.
(defmacro test-quote (name-string)
`(eval-after-load "foo"
`(with-elapsed-timer ,(format "Configuring package %s" name-string)
(message "test-quote"))))
(defmacro test-expand-quote (name-string)
`(eval-after-load "foo"
,(macroexpand-all
`(with-elapsed-timer ,(format "Configuring package %s" name-string)
(message "test-expand-quote")))))
(defmacro test-lambda (name-string)
`(eval-after-load "foo"
`(,(lambda ()
(with-elapsed-timer ,(format "Configuring package %s" name-string)
(message "test-lambda"))))))
(defmacro test-expand-lambda (name-string)
`(eval-after-load "foo"
`(,(lambda ()
,(macroexpand-all
`(with-elapsed-timer ,(format "Configuring package %s" name-string)
(message "test-lambda")))))))
(disassemble (lambda () (test-quote "testing...")))
(disassemble (lambda () (test-expand-quote "testing...")))
(disassemble (lambda () (test-lambda "testing...")))
(disassemble (lambda () (test-expand-lambda "testing...")))
2013-10-12 14:25:38 -04:00
Noam Postavsky
119a30f2ba
cl not needed since flet was removed in 82903da
2013-10-12 13:14:21 -04:00
John Wiegley
901272a8c7
Merge pull request from phillord/first-keyword
...
Add a ":first" keyword for those occasions that it's necessary.
GitHub-reference: https://github.com/jwiegley/use-package/issues/42
2013-10-07 14:28:30 -07:00
Noam Postavsky
8c1c572857
use plist-get-value for all non-sexp args
2013-09-25 22:44:01 -04:00
Noam Postavsky
dd20db220d
plist-get-value treats arg as backquoted
...
This allows use of variables or even arbitrary expressions to construct
use-package arguments:
(use-package some-package
:mode ,mode-spec
:bind (,binding
,@more-bindings
,@(cl-loop for i from ?a to ?z
collect `(,(string i) . nifty-function))))
2013-09-25 22:36:10 -04:00
Nicolas Dudebout
818c78f466
Removes plist-get-sexp
...
This function was not working as advertised.
Then `funcall` was evaluated too early and all the benefits of late evaluation for autoloads was lost.
Furthermore, this function was not really needed in the first place:
```
(use-package foo
:config my-foo-function)
```
can easily be replaced by the following:
```
(use-package foo
:config (my-foo-function))
```
2013-09-25 14:02:29 -04:00
Nicolas Dudebout
fd8af80f08
Enables using variables and functions as arguments
...
This change an extra level on indirection for two cases:
+ when an association or an alist is required, it is possible to pass a
variable containing an association or an alist
+ when a sexp to be evaluated is required, it is possible to pass a
function instead
2013-09-24 12:23:08 -04:00
Noam Postavsky
c6d79d2cb4
pass name (not name-string) to eval-after-load
...
Fixes https://github.com/jwiegley/use-package/issues/52 : the :config block would be triggered when loading a config
file with the same name as the package and again when loading the
package itself.
2013-09-16 13:59:16 -04:00
Ting-Yu Lin
bbf2b5034b
Fix highlight use-package for Emacs snapshot
...
The commit 57f80d4
fixed the highlight by following the regexp as for
require. However in Emacs truck, it only highlights first part of the
package name.
This change follows the regexp for require on emacs truck. See line
2327 on font-lock.el in the following patch.
http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/111821
2013-09-13 21:38:02 +08:00
Noam Postavsky
57f80d4ff1
highlight use-package before typing package name
...
This follow the same pattern as the highlighting for provide and require
from `lisp-font-lock-keywords-2' in font-lock.el
2013-09-03 21:55:38 -04:00
Noam Postavsky
48975f791b
also check `byte-compile-current-file' for compile time loads, fixes issue
...
`eval-when-compile' is really `eval-when-macroexpand' which includes
loading from source
GitHub-reference: https://github.com/jwiegley/use-package/issues/44
2013-08-15 21:35:38 -04:00
Phillip Lord
aa357bc96a
Changed :first to :pre-load
...
Updated and extended documentation.
2013-08-15 11:54:29 +01:00
Noam Postavsky
a76d16730d
use lambda around deferred :config forms to compile them, fixes issue
...
GitHub-reference: https://github.com/jwiegley/use-package/issues/30
2013-08-13 19:25:26 -04:00
Noam Postavsky
ac0c9633bc
use `eval-when-compile' for loading package at compile time, fixes issue
...
GitHub-reference: https://github.com/jwiegley/use-package/issues/29
2013-08-13 19:14:22 -04:00
Phillip Lord
e7a343828a
Add a ":first" keyword for those occasions that it's necessary
2013-08-13 11:40:54 +01:00
Noam Postavsky
2a1e7e418a
refine use-package highlighting regexp
2013-08-11 16:05:06 -04:00
Phil Hudson
f98b9d08fe
Validate keywords. Error if any keyword is unrecognized
...
Conflicts:
use-package.el
2013-07-03 12:56:48 -05:00
Phillip Lord
01cfa0358f
Added documentation to use-package macro
2013-06-26 12:12:25 +01:00
Phillip Lord
7161c09b30
Documentation added for :ensure keyword
2013-06-26 10:28:35 +01:00
Donald Curtis
19c65ea3ab
package header should, hold, sold be the full filename + ext
...
this fixes a bug in using `(package-buffer-info)`
2013-05-15 09:01:37 -05:00
John Wiegley
2da6318930
Merge pull request from tarsius/font-lock
...
fontify use-package form
GitHub-reference: https://github.com/jwiegley/use-package/issues/25
2013-04-27 15:09:55 -07:00
Jonas Bernoulli
5b696d1918
fontify use-package form
2013-04-27 17:43:41 +02:00
Jonas Bernoulli
d2460b9276
add dots; cleanup whitespace
2013-04-27 17:19:43 +02:00
Jonas Bernoulli
a5e4a6d938
quiet byte-compiler; ensure package.el is loaded
2013-04-27 17:19:43 +02:00
Jonas Bernoulli
82903da9d8
don't use obsolete flet
...
Unfortunately there isn't a proper dynamically scoped
replacement, so we have to resort to using funcall.
2013-04-27 17:19:43 +02:00
Jonas Bernoulli
17a1a4659a
enforce use of spaces for indentation
2013-04-27 17:19:43 +02:00
Steve Purcell
b901618607
Add Package-Requires header for ELPA installations
2013-04-23 11:25:10 +02:00
Noam Postavsky
0df0e18c4b
needed extra layer of nesting for diminish calls
2013-04-16 11:29:32 -04:00
Noam Postavsky
2abe5f9480
let :diminish "string" guess correct mode symbol
2013-04-14 15:01:37 -04:00
Phil Hudson
34d3f115dd
Runtime client code independence redux
...
Tweak to previous fix for expanding macros correctly at code-planting time. Specifically, eval `use-package-minimum-reported-time' at code-planting time not at runtime (which would require use-package.el to be loaded first).
2013-03-23 11:31:15 +00:00
John Wiegley
1758c5faea
Corrected a typo
2013-02-18 17:52:58 -06:00
Phillip Lord
35685f120b
idle initiation of packages
...
A new feature which adds support for idle startup and loading of packages.
2013-02-12 10:22:06 +00:00
Phillip Lord
aa8d5fab19
Added minimum load time display option
...
Makes the minimum load time before use-package displays
a message a customizable option.
2013-02-05 21:46:02 +00:00
Berk D. Demir
c680b57ebf
Cleanup trailing whitespace
...
Just `M-x delete-trailing-whitespace' on use-package.el
2013-01-28 00:38:39 -08:00
John Wiegley
1a65b11731
Merge pull request from PhilHudson/macroexpand
...
Macroexpand quoted eval-after-load block early
GitHub-reference: https://github.com/jwiegley/use-package/issues/13
2013-01-23 19:34:03 -08:00
Phil Hudson
593f18aff5
Macroexpand quoted eval-after-load block early
...
The main `use-package' macro incorrectly planted code containing a call to the `with-elapsed-timer' macro in a quoted block to be run by `eval-after-load'. If package use-package was not loaded at runtime, the block would error saying correctly that `with-elapsed-timer' is undefined. This mod correctly macroexpands the block at code generation time.
2013-01-23 20:33:15 +00:00
Phillip Lord
eaf9677409
Support packages where autoload and elpa name are different
...
Some packages such as ECB already provide an autoload file,
so it is this that use-package needs to require. However,
the ELPA name is ecb. This commit allows ensure to take an
argument (other than t).
2013-01-18 10:44:17 +00:00
Phillip Lord
8d72a6c1d6
Documentation for the use-package macro
2013-01-17 21:57:39 +00:00
Phillip Lord
b8406ce9f0
Reverting "Documentation for the use-package macro."
...
Revert "Documentation for the use-package macro."
This reverts commit abc0ebc92d
.
2013-01-17 21:55:53 +00:00
Phillip Lord
abc0ebc92d
Documentation for the use-package macro
2013-01-17 21:22:57 +00:00
Phillip Lord
c28874e956
ELPA package support
2012-12-31 17:58:45 +01:00
Phil Hudson
fbead83731
Support diminishing to a replacement string as well as to nothing
...
`diminish' accepts an optional second argument, a replacement string. This change supports all the following arguments to ':diminish':
* package
* (package . "pkg")
* (package1 package2)
* ((package1 . "p1") (package2 . "p2))
The second and fourth formats are new with this change.
2012-11-21 00:46:17 +00:00