François Févotte [Mon, 17 Mar 2014 08:56:10 +0000 (09:56 +0100)]
:idle-priority keyword to change the running order of idle functions
Lower-priority idle functions are run first. Idle functions with no
specified priority default to 5 and all functions with the same priority
are run in the order in which they are evaluated, meaning the behaviour
is backwards compatible.
Jonas Bernoulli [Sun, 9 Mar 2014 17:50:01 +0000 (18:50 +0100)]
use-package-with-elapsed-timer: respect option at runtime
Previously the option `use-package-verbose' was consulted at macro
expansion time, and as a result customizing the option did nothing,
without also recompiling `use-package.el'.
Nicolas Richard [Mon, 10 Feb 2014 17:02:59 +0000 (18:02 +0100)]
Allow multiple forms after keywords
* use-package.el (use-package-mplist-get):
(use-package-plist-get):
(use-package-mplist-keys): new functions
(plist-get-value):
(use-package): use new functions
(plist-keys): remove function
The idea is to allow a modified kind of plist where keys are all
keywords that appear in the list, and values are the intermediary
elements. If a keyword is present but it's another keyword just after it
(like (use-package :defer :config (setq foo 'bar))), its associated
value will be t. If a keyword is not present, its value associated value
will be nil. Otherwise the value will be the list of elements between
the keyword and the next keyword.
Adam Spiers [Mon, 6 Jan 2014 12:38:00 +0000 (12:38 +0000)]
fix DRY violation by only having documentation in one place
The documentation in README.md was previously identical to that
in the Commentary section of use-package.el, modulo the following
differences:
- No elisp comment ";; " prefix
- Code blocks indented 4 columns not 2, as required by Markdown
- Elisp symbols marked in backtick delimiters for monospace, not
emacs backtick/forward tick pairs.
Unfortunately due to this duplication, sometimes only one of the
two files got updated, so they got out of sync. With us all being
human, this is likely to continue to happen as long as the
duplication exists ;-) Therefore since most users are likely to
encounter README.md before the elisp, and bearing in mind that
Markdown is a much more flexible format for documentation than
elisp comments (richer formatting, can be exported to numerous
other formats etc.), it is better to replace the docs in
use-package.el with a pointer to the README.md.
Jonas Bernoulli [Mon, 9 Dec 2013 23:33:02 +0000 (00:33 +0100)]
use-package: use defun as lisp-indent-function
When `use-package' is called with only one keyword it is useful to
write:
(use-package foo :init
(progn
... long lines ...))
instead of
(use-package foo
:init (progn
... *too* long lines ...))
or
(use-package foo
:init
(progn
... long lines ...))
Even when there are multiple keywords or when one never wants to format
the calls to `use-package' as in the first example the use of `defun'
does not really pose a problem.
Noam Postavsky [Wed, 14 Aug 2013 04:40:20 +0000 (00:40 -0400)]
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.
Nicolas Dudebout [Wed, 25 Sep 2013 18:02:29 +0000 (14:02 -0400)]
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:
Nicolas Dudebout [Tue, 17 Sep 2013 13:58:57 +0000 (09:58 -0400)]
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
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.
Ting-Yu Lin [Fri, 13 Sep 2013 13:17:09 +0000 (21:17 +0800)]
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
Ting-Yu Lin [Wed, 4 Sep 2013 14:40:55 +0000 (22:40 +0800)]
Improve (describe-personal-keybindings) output
Create *Personal Keybindings* by with-output-to-temp-buffer. It
redirects standard output to the buffer and display it in help mode. So
we can get help mode keybindings such as "q" for free.
Quote the command-desc output so that it is made into a hyperlink.
John Wiegley [Fri, 16 Aug 2013 06:07:09 +0000 (23:07 -0700)]
Merge pull request from npostavs/master
also check `byte-compile-current-file' for compile time loads, fixes issue https://github.com/jwiegley/use-package/issues/44
GitHub-reference: https://github.com/jwiegley/use-package/issues/45
Noam Postavsky [Fri, 16 Aug 2013 01:35:38 +0000 (21:35 -0400)]
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
John Wiegley [Wed, 14 Aug 2013 01:54:23 +0000 (18:54 -0700)]
Merge pull request from npostavs/master
Byte compilation, fixes for https://github.com/jwiegley/use-package/issues/29 and https://github.com/jwiegley/use-package/issues/30
GitHub-reference: https://github.com/jwiegley/use-package/issues/43
Phil Hudson [Sat, 23 Mar 2013 11:31:15 +0000 (11:31 +0000)]
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).