1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-07 15:00:34 -08:00
Commit graph

39 commits

Author SHA1 Message Date
John Wiegley
a090961f10 Fix bad interaction between bind-keys* and the :package keyword
Fixes https://github.com/jwiegley/use-package/issues/558
2017-12-05 10:29:51 -08:00
John Wiegley
ee07e709ea Fix the case where :ensure is given no arguments
Fixes https://github.com/jwiegley/use-package/issues/543
2017-12-04 16:46:46 -08:00
John Wiegley
2790bfc006 Add a bind-key test 2017-12-04 15:43:10 -08:00
John Wiegley
62d33b2143 Support :ensure (pkg :pin archive)
Fixes https://github.com/jwiegley/use-package/issues/506
2017-12-04 15:39:31 -08:00
John Wiegley
6470eaf3d5 Fix an argument process problem with bind-key
Fixes https://github.com/jwiegley/use-package/issues/334
2017-12-04 15:21:41 -08:00
John Wiegley
a2ddc18065 Comment out two tests that break on Travis 2017-12-04 13:27:57 -08:00
John Wiegley
4b83f9525c Rename up-* files to use-package-* for consistency 2017-12-04 21:21:54 +00:00
John Wiegley
fff47a1331 Break out ensure/diminish/delight into their own support files 2017-12-03 11:54:19 -08:00
John Wiegley
22fb8f8c4b Disable a test that is not working on Travis 2017-12-03 11:43:53 -08:00
John Wiegley
3625b3f712 More variable renaming needed in the tests 2017-12-03 11:00:41 -08:00
John Wiegley
e5aa510d48 Separate out all tests, the better to identify which one failed 2017-12-03 10:49:33 -08:00
John Wiegley
4c1b82aed5 Define macroexpand-1 for older Emacsen 2017-12-03 10:33:12 -08:00
John Wiegley
9ab797cccd A great deal of internal reorganization and simplification
All handlers now address their own domain of work; :after has become safer;
keyword normalization is multi-stage process; setting use-package-verbose to
`debug' produces useful output in the *use-package* buffer in the case of load
time errors; use-package errors (even internal) won't stop Emacs from
starting (though a serious internal bug that errors out every use-package form
may stop anything from being configured!); and more.
2017-12-03 03:09:26 -08:00
John Wiegley
dee6b36286 If use-package-verbose is t, show loading times when :after is used 2017-12-01 13:39:05 -08:00
John Wiegley
af3b34b022 Remove the :defer-install keyword
This may reappear as its own add-on to use-package in the future. See https://github.com/jwiegley/use-package/issues/442.
2017-12-01 11:44:31 -08:00
John Wiegley
09be976c18 :demand should not override an explicit use of :after
Fixes https://github.com/jwiegley/use-package/issues/529
2017-12-01 11:30:11 -08:00
John Wiegley
cb846d188a Add tests for the last two keywords 2017-12-01 11:16:19 -08:00
John Wiegley
cd4790b3df Add many more tests 2017-12-01 11:07:08 -08:00
John Wiegley
f5b034154f Always wrap the expanded body from use-package in (progn) 2017-12-01 10:23:21 -08:00
John Wiegley
21b9b6551d Comment out :no-require test for now
It works on my machine, but not with what Travis runs.
2017-12-01 01:40:58 -08:00
John Wiegley
7f2eec9e65 Add many new tests 2017-12-01 01:33:01 -08:00
John Wiegley
dfd3194d80 Allow match-expansion to take multiple cases 2017-11-30 19:40:54 -08:00
John Wiegley
7a562f10cb Add test for use-package-test-normalize/:ensure 2017-11-30 18:37:27 -08:00
John Wiegley
9465b915a8 Add the missing plist-delete 2017-11-30 18:36:45 -08:00
John Wiegley
98ee89a752 Remove an unneeded defvar 2017-11-30 12:39:04 -08:00
John Wiegley
ca94036dce Add a test case for :ensure, following up from
GitHub-reference: https://github.com/jwiegley/use-package/issues/190
2017-11-30 12:38:01 -08:00
John Wiegley
c3b9cc2403 Add two new tests 2017-11-30 10:38:01 -08:00
John Wiegley
3ea2d34219 Add stubs for future tests of all keywords 2017-11-30 09:42:47 -08:00
John Wiegley
d8c1f02bf4 Whitespace fix 2017-11-29 16:44:11 -08:00
John Wiegley
bff472ea80 Allow :bind ("C-c C-c" . (lambda () (ding))) and #'(lambda ...)
Fixes https://github.com/jwiegley/use-package/issues/333
Fixes https://github.com/jwiegley/use-package/issues/461
2017-11-29 16:37:03 -08:00
Joe Wreschnig
ca83649a32 Allow :diminish with no arguments
When given no arguments, have :diminish assume it should diminish a
mode named after the current package (the package’s name, with “-mode”
appended, if it’s not already) to an empty string.

When given only a string to diminish an implicit package name to, do
not append “-mode” to the package name if it already ends with
it.  (This is a backwards-incompatible change if someone was
diminishing a package named “foo-mode” implementing `foo-mode-mode`.)

Add test cases for `use-package-normalize-diminish`.

This addresses some of the redundancy mentioned in issue https://github.com/jwiegley/use-package/issues/288.
2017-07-08 15:32:46 +02:00
Joe Wreschnig
7eec86f5cd Allow :major as the third argument in :delight calls 2017-07-02 17:45:26 +02:00
Joe Wreschnig
4b8b850cf0 Allow multiple :delight arguments, or omitting the mode. ()
This allows using forms such as

    (use-package foo :delight)
        ;; => (delight 'foo-mode)
    (use-package foo :delight " f")
        ;; => (delight 'foo-mode " f")
    (use-package foo :delight (a-mode) (b-mode " b")
        ;; => (delight 'a-mode) (delight 'b-mode " b")

This brings support for `:delight` in line with `:diminish`.
GitHub-reference: https://github.com/jwiegley/use-package/issues/477
2017-07-02 16:32:38 +02:00
Noam Postavsky
9688d2f64b Don't allow implicit package name arg for binders
It's unlikely that

    (use-package foopkg :bind "<some-key>")

intendes to bind <some-key> to 'foopkg command.
2016-10-31 08:49:21 -04:00
Noam Postavsky
65c7b42a14 Don't allow nil as a mode function
This means (use-package foopkg :mode (".foo")) will add (".foo"
. foopkg) into auto-mode-alist instead of the broken (".foo" . nil),
this is more consistent with the behaviour of (use-package foopkg
:mode (".foo" ".bar")).
2016-10-31 08:49:21 -04:00
Noam Postavsky
fc57b34299 Refactor pair normalizers; add tests for them
This is not a pure refactoring, it also fixes a bug where
:bind ([keysym] . "string") would actually bind keysym to nil (i.e.,
unbind it).  It now binds to "string" as expected.
2016-10-31 08:49:21 -04:00
Noam Postavsky
5ed9a6b5a5 Remove obsolete mplist tests
The mplist functions were removed in the 2.0
refactoring (4ae584f3ff).
2016-10-31 08:49:21 -04:00
John Wiegley
23a61c8f6b Add some variable settings to use-package-tests.el, thanks tarsius 2016-02-25 15:22:10 -08:00
Nicolas Richard
dd937c4e36 Move tests to separate file 2014-02-12 22:30:12 +01:00