Commit graph

258 commits

Author SHA1 Message Date
John Wiegley
80aad34a39 Add new customization use-package-always-ensure
Fixes https://github.com/jwiegley/use-package/issues/27
2015-03-21 04:19:33 -05:00
John Wiegley
47586c714e Fix file headers 2015-03-21 03:57:09 -05:00
John Wiegley
d70d70843a Correction to an eval-after-load expansion 2015-03-21 03:49:08 -05:00
John Wiegley
8c00f108bf Change use-package to use bind-keys and bind-keys*
Fixes https://github.com/jwiegley/use-package/issues/129
2015-03-21 03:46:26 -05:00
John Wiegley
2abf565af2 :pin should return `t' 2015-03-21 03:12:32 -05:00
John Wiegley
e7f3f97a71 Modular support appears to be working 2015-03-21 02:57:18 -05:00
John Wiegley
f1ab3291f6 Began work on modular handling of keywords 2015-03-19 22:26:53 -05:00
John Wiegley
94ad68330d Rename use-package-with-elapsed-timer at an internal name
See https://github.com/jwiegley/use-package/issues/185
2015-03-19 18:48:14 -05:00
John Wiegley
b30b279a99 Remove code I did not intend to commit 2015-03-19 18:47:15 -05:00
John Wiegley
f45c4f0edd Merge pull request from npostavs/macroexp-progn
use-package-progn: replace with macroexp-progn
GitHub-reference: https://github.com/jwiegley/use-package/issues/186
2015-03-19 18:46:37 -05:00
John Wiegley
c2f5b2479d Fix some docstrings 2015-03-19 18:45:30 -05:00
Noam Postavsky
3467e4eaa6 use-package-progn: replace with macroexp-progn 2015-03-19 17:40:41 -04:00
John Wiegley
1b6605652c Use push instead of add-to-list 2015-03-19 04:42:22 -05:00
John Wiegley
38f907cc5d Remove a hack that is not needed anymore 2015-03-19 04:39:07 -05:00
John Wiegley
2778e85a39 macroexpand nested uses of use-package in :init and :config 2015-03-18 20:56:45 -05:00
John Wiegley
19ab94cf39 Wrap the :preface in an eval-and-compile block 2015-03-18 20:53:55 -05:00
John Wiegley
8769309fbf Remove a use of macroexpand 2015-03-18 05:46:25 -05:00
John Wiegley
658d103b70 Make a warning more specific 2015-03-18 03:25:21 -05:00
John Wiegley
5787ff074c More work to silence the byte-compiler 2015-03-18 03:10:36 -05:00
John Wiegley
46435d7b84 Other minor improvements for byte-compiling 2015-03-17 11:50:25 -05:00
John Wiegley
d2679595fa Several minor improvements and fixes 2015-03-17 11:42:04 -05:00
John Wiegley
eda8246fc6 Change some code for consistency's sake 2015-03-17 10:21:34 -05:00
Russell Black
8d7a0c2185 minor fixes to get bind-keymap working in 2.0 2015-03-16 22:55:48 -06:00
John Wiegley
771f2edc83 Always return t on a successful init-time load
Fixes https://github.com/jwiegley/use-package/issues/174
2015-03-16 22:12:52 -05:00
John Wiegley
db69a3f81c Add to the load-path before the :preface
Fixes https://github.com/jwiegley/use-package/issues/172
2015-03-16 12:19:14 -05:00
John Wiegley
9e35dd95d9 More fixes related to byte-compilation 2015-03-16 11:58:37 -05:00
John Wiegley
34bc31e1d4 A few changes for byte-compilation 2015-03-16 11:50:32 -05:00
John Wiegley
1fe2c1c056 :defer now accepts an optional number of seconds 2015-03-16 10:46:25 -05:00
John Wiegley
302c008b45 Permit minimal expansion of macro bodies, and other fixes 2015-03-16 10:39:37 -05:00
John Wiegley
21a091f17a Collapse some whitespace 2015-03-16 03:25:21 -05:00
John Wiegley
05c02aee86 Allow vectors to be passed to :bind again
Fixes https://github.com/jwiegley/use-package/issues/166
2015-03-16 03:19:28 -05:00
John Wiegley
55d6bb00ca Add code to workaround an inefficiency with eval-after-load
This is currently disabled, as it leads to strange byte-compilation
errors that need to be tracked down.
2015-03-16 03:12:23 -05:00
John Wiegley
4029030eb5 Output Compiling message only if verbose is enabled 2015-03-16 02:48:55 -05:00
John Wiegley
b75c1cb47e Allow :pin to accept a symbol 2015-03-16 02:48:13 -05:00
John Wiegley
5c85433fac Relax a path normalization check 2015-03-15 21:23:40 -05:00
John Wiegley
a203028871 Correct an erroneous symbol reference 2015-03-15 21:21:11 -05:00
John Wiegley
a66d1952e3 Update docstring for :disabled 2015-03-15 20:40:50 -05:00
John Wiegley
1c5f9247aa Merge pull request from npostavs/eval-after-name
use--package: eval-after-load name
GitHub-reference: https://github.com/jwiegley/use-package/issues/168
2015-03-15 20:07:16 -04:00
John Wiegley
98b642b794 Undo an erroneous change 2015-03-15 19:07:03 -05:00
John Wiegley
199399e552 Add -hook to the injected hooks
Fixes https://github.com/jwiegley/use-package/issues/161
2015-03-15 18:49:08 -05:00
John Wiegley
03ea5d6dbf Restore an earlier fix to
Fixes https://github.com/jwiegley/use-package/issues/167
GitHub-reference: https://github.com/jwiegley/use-package/issues/53
2015-03-15 18:45:41 -05:00
John Wiegley
9385ab417a BREAKING CHANGE: Remove :idle and :idle-priority
I am removing this feature for now because it can result in a nasty
inconsistency.  Consider the following definition:

  (use-package vkill
    :commands vkill
    :idle (some-important-configuration-here)
    :bind ("C-x L" . vkill-and-helm-occur)
    :init
    (defun vkill-and-helm-occur ()
      (interactive)
      (vkill)
      (call-interactively #'helm-occur))

    :config
    (setq vkill-show-all-processes t))

If I load my Emacs and wait until the idle timer fires, then this is the
sequence of events:

    :init :idle <load> :config

But if I load Emacs and immediately type C-x L without waiting for the
idle timer to fire, this is the sequence of events:

    :init <load> :config :idle

It's possible that the user could use `featurep` in their idle to test
for this case, but that's a subtlety I'd rather avoid.

What I would consider is this: `:idle [N]` is a keyword that simply
implies `:defer`, with an option number of N to specify a second count.
After that many seconds, if the package has not yet been loaded by
autoloading, it will be loaded via the idle timer.

This approach has the benefit of complete consistency for both the idle
and the autoloaded cases.  Although, the fact that it implies `:defer`
means we don't have to consider what it means to add `:idle` behavior to
a demand-loaded configuration.
2015-03-15 18:07:37 -05:00
Noam Postavsky
1f20acfd57 use--package: eval-after-load name
instead of name-string. This prevents triggering by config file names
that have the same name as the package.

Reprise of c6d79d2cb4
2015-03-15 15:14:04 -04:00
John Wiegley
81f5e48d32 Support optional injection of hooks, for Spacemacs 2015-03-15 03:49:16 -05:00
John Wiegley
f637380fed Add :preface, occurring before everything except :disabled
This can be used to establish function and variable definitions that
will 1) make the byte-compiler happy (it won't complain about functions
whose definitions are unknown because you have them within a guard
block), and 2) allow you to define code that can be used in an `:if`
test.
2015-03-15 02:22:17 -05:00
John Wiegley
b4a00d2eb5 Some minor code reformatting 2015-03-15 02:21:53 -05:00
John Wiegley
71f894fe78 Fix to :ensure normalization 2015-03-15 02:21:40 -05:00
John Wiegley
a6edb08122 Merge pull request from thomasf/master
Fix :ensure value interpretation
GitHub-reference: https://github.com/jwiegley/use-package/issues/163
2015-03-15 02:49:09 -04:00
Thomas Frössman
e68d00d525 Fix :ensure value interpretation 2015-03-15 02:18:59 +01:00
Noam Postavsky
27cba067ee use-package-expand: use display-warning
instead of with-demoted-errors. This prevents errors from getting lost
in the *Messages* buffer.
2015-03-14 11:33:12 -04:00