Adam Spiers
2dbee4cd75
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.
2014-01-06 13:57:55 +00:00
John Wiegley
25ea8ea840
Merge pull request from aspiers/short-mode
...
allow :mode and :interpreter to accept a string
GitHub-reference: https://github.com/jwiegley/use-package/issues/73
2013-12-16 09:54:33 -08:00
Adam Spiers
75206228dd
allow :mode and :interpreter to accept a string
...
Fixes https://github.com/jwiegley/use-package/issues/72 .
2013-12-16 13:57:32 +00:00
John Wiegley
7de292c0e9
Merge pull request from tarsius/defun
...
use-package: use defun as lisp-indent-function
GitHub-reference: https://github.com/jwiegley/use-package/issues/69
2013-12-09 15:52:08 -08:00
Jonas Bernoulli
d588d0b382
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.
2013-12-10 00:44:11 +01:00
John Wiegley
c3704ac36e
Add a :demand directive, to override deferred loading ()
...
GitHub-reference: https://github.com/jwiegley/use-package/issues/65
2013-12-04 19:44:09 -06:00
John Wiegley
9d395a4019
fboundp is a function, not a variable
...
Fixes https://github.com/jwiegley/use-package/issues/68
2013-12-04 13:31:25 -06:00
John Wiegley
d4bf41eb82
Merge pull request from dabrahams/patch-1
...
Backward compatibility with emacs-22.1
GitHub-reference: https://github.com/jwiegley/use-package/issues/67
2013-12-04 08:49:31 -08:00
Dave Abrahams
f3e9e871a6
Backward compatibility with emacs-22.1
...
This change supports the emacs that ships with MacOS X, the last version not encumbered by GPLv3.
2013-12-02 10:44:28 -08:00
John Wiegley
90ca8adc41
Default use-package-verbose to nil
2013-12-02 03:06:27 -07:00
John Wiegley
ee0060c3a7
Merge pull request from Silex/master
...
Remove el-get support
GitHub-reference: https://github.com/jwiegley/use-package/issues/64
2013-11-05 01:51:44 -08:00
Philippe Vaucher
c7560f7be7
Remove el-get support
2013-11-05 10:32:21 +01:00
John Wiegley
f3ed771481
Merge pull request from aethanyc/add-missing-keyword
...
Add :pre-load to use-package-keywords
GitHub-reference: https://github.com/jwiegley/use-package/issues/62
2013-10-28 11:28:14 -07: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
John Wiegley
c3cbe3a69a
Merge pull request from PhilHudson/master
...
Properly enable runtime dependency for :idle stanza (issue https://github.com/jwiegley/use-package/issues/60 )
GitHub-reference: https://github.com/jwiegley/use-package/issues/61
2013-10-15 10:37:27 -07: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
John Wiegley
e8b5ea3b70
Merge pull request from npostavs/comma
...
remove extra comma (added by 026c46c )
GitHub-reference: https://github.com/jwiegley/use-package/issues/59
2013-10-14 14:52:25 -07:00
Noam Postavsky
94072fba77
remove extra comma (added by 026c46c)
2013-10-14 12:59:41 -04:00
John Wiegley
e367788005
Merge pull request from npostavs/cleanup
...
Cleanup
GitHub-reference: https://github.com/jwiegley/use-package/issues/57
2013-10-12 11:38:28 -07: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
9921a76e86
remove after-init-hook for override-global-mode
...
The INIT-VALUE argument to define-minor-mode is t, so it's enabled by
default.
2013-10-12 14:25:49 -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
John Wiegley
d6a5c43915
Merge pull request from npostavs/quasiquote
...
Quasiquote
GitHub-reference: https://github.com/jwiegley/use-package/issues/56
2013-09-27 13:21:41 -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
John Wiegley
9c9329f522
Merge pull request from dudebout/fixes-
...
Removes `plist-get-sexp`
GitHub-reference: https://github.com/jwiegley/use-package/issues/55
GitHub-reference: https://github.com/jwiegley/use-package/issues/54
2013-09-25 11:11:47 -07: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
John Wiegley
ff03bef1d1
Merge pull request from dudebout/variable-and-function-support
...
Enables using variables and functions as arguments
GitHub-reference: https://github.com/jwiegley/use-package/issues/54
2013-09-24 11:32:31 -07: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
John Wiegley
6fdeb0c044
Merge pull request from npostavs/eval-after-name
...
pass name (not name-string) to eval-after-load
GitHub-reference: https://github.com/jwiegley/use-package/issues/53
2013-09-17 00:22:16 -07: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
John Wiegley
6efc084cdf
Merge pull request from aethanyc/fix-highlight
...
Fix highlight use-package for Emacs snapshot
GitHub-reference: https://github.com/jwiegley/use-package/issues/49
2013-09-15 13:12:45 -07: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
John Wiegley
749295c052
Merge pull request from npostavs/hilite-redux
...
highlight use-package before typing package name
GitHub-reference: https://github.com/jwiegley/use-package/issues/47
2013-09-04 13:27:43 -07:00
John Wiegley
71150a79c5
Merge pull request from aethanyc/improve-output-buffer
...
Improve (describe-personal-keybindings) output
GitHub-reference: https://github.com/jwiegley/use-package/issues/48
2013-09-04 13:27:25 -07:00
Ting-Yu Lin
8de5c29ed5
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.
2013-09-04 23:15:28 +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
John Wiegley
a56244378f
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
2013-08-15 23:07:09 -07: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
John Wiegley
3d0b14eac2
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
2013-08-13 18:54:23 -07: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
John Wiegley
e481d97891
Merge pull request from npostavs/master
...
refine use-package highlighting regexp
GitHub-reference: https://github.com/jwiegley/use-package/issues/41
2013-08-11 21:22:57 -07:00
Noam Postavsky
2a1e7e418a
refine use-package highlighting regexp
2013-08-11 16:05:06 -04:00