]> git.eshelyaron.com Git - emacs.git/log
emacs.git
6 years agoMake diminish a soft dependency, as delight already was
John Wiegley [Wed, 29 Nov 2017 04:26:34 +0000 (20:26 -0800)]
Make diminish a soft dependency, as delight already was

Fixes https://github.com/jwiegley/use-package/issues/493

6 years agoAllow :diminish to take no argument, once again
John Wiegley [Wed, 29 Nov 2017 00:27:09 +0000 (16:27 -0800)]
Allow :diminish to take no argument, once again

6 years agoFix for single :custom (foo bar)
John Wiegley [Tue, 28 Nov 2017 22:39:59 +0000 (14:39 -0800)]
Fix for single :custom (foo bar)

6 years agoAllow :custom (foo1 bar1) (foo2 bar2) etc
John Wiegley [Tue, 28 Nov 2017 22:16:13 +0000 (14:16 -0800)]
Allow :custom (foo1 bar1) (foo2 bar2) etc

Fixes https://github.com/jwiegley/use-package/issues/518

6 years agoAdd support for `:hook`
John Wiegley [Tue, 28 Nov 2017 21:58:38 +0000 (13:58 -0800)]
Add support for `:hook`

Fixes https://github.com/jwiegley/use-package/issues/444

6 years agoAppend to *use-package* when debugging, don't clear it
John Wiegley [Tue, 28 Nov 2017 19:41:41 +0000 (11:41 -0800)]
Append to *use-package* when debugging, don't clear it

Fixes https://github.com/jwiegley/use-package/issues/476

6 years agoMake unrecognized keywords a warning
John Wiegley [Tue, 28 Nov 2017 19:31:35 +0000 (11:31 -0800)]
Make unrecognized keywords a warning

This could actually be used to store your own metadata in use-package
declarations, to be (read) later by simply parsing init file contents.

Fixes https://github.com/jwiegley/use-package/issues/483

6 years agoUpgrade license to GPL 3
John Wiegley [Tue, 28 Nov 2017 19:22:53 +0000 (11:22 -0800)]
Upgrade license to GPL 3

Fixes https://github.com/jwiegley/use-package/issues/499

6 years agoDon't allow :commands, :bind, etc., to be given an empty list
John Wiegley [Tue, 28 Nov 2017 19:16:12 +0000 (11:16 -0800)]
Don't allow :commands, :bind, etc., to be given an empty list

This makes the following an error:

    :commands
    :commands nil
    :commands ()

Fixes https://github.com/jwiegley/use-package/issues/512

6 years agoExplicit :defer t should override use-package-always-demand
John Wiegley [Tue, 28 Nov 2017 19:14:30 +0000 (11:14 -0800)]
Explicit :defer t should override use-package-always-demand

Fixes https://github.com/jwiegley/use-package/issues/514

6 years agoMerge pull request from drrlvn/patch-1
John Wiegley [Tue, 28 Nov 2017 19:08:08 +0000 (11:08 -0800)]
Merge pull request from drrlvn/patch-1

Remove duplicate documentation of :mode
GitHub-reference: https://github.com/jwiegley/use-package/issues/489

6 years agoCorrections to the normalization of :custom
John Wiegley [Tue, 28 Nov 2017 19:03:47 +0000 (11:03 -0800)]
Corrections to the normalization of :custom

6 years agoMerge pull request from joewreschnig/implicit-diminish
John Wiegley [Tue, 28 Nov 2017 19:07:03 +0000 (11:07 -0800)]
Merge pull request from joewreschnig/implicit-diminish

Allow `:diminish` with no arguments.
GitHub-reference: https://github.com/jwiegley/use-package/issues/472

6 years agoMerge pull request from waymondo/master
John Wiegley [Tue, 21 Nov 2017 22:30:47 +0000 (14:30 -0800)]
Merge pull request from waymondo/master

Allow customized values to be nil
GitHub-reference: https://github.com/jwiegley/use-package/issues/515

6 years agoallow customized values to be nil
Justin Talbott [Tue, 21 Nov 2017 04:33:34 +0000 (23:33 -0500)]
allow customized values to be nil

6 years agoMerge pull request from canatella/add-customization-keywords
John Wiegley [Mon, 20 Nov 2017 23:42:19 +0000 (15:42 -0800)]
Merge pull request from canatella/add-customization-keywords

Add customization keywords
GitHub-reference: https://github.com/jwiegley/use-package/issues/508

6 years agoAdd support for face customization
Damien Merenne [Tue, 17 Oct 2017 17:40:38 +0000 (19:40 +0200)]
Add support for face customization

Allows customization of faces using customize-set-faces. This makes it
easier to manage customization in version control. Instead of having all the
faces written in a custom.el, the faces can be customized where the rest
of the package is configured.

6 years agoAdd support for variable customization
Damien Merenne [Tue, 17 Oct 2017 17:35:19 +0000 (19:35 +0200)]
Add support for variable customization

Allows customization of variable using customize-set-variables. This makes it
easier to manage customization in version control. Instead of having all the
variables written in a custom.el, the variable can be customized where the rest
of the package is configured.

6 years agoMerge pull request from carldotac/master
John Wiegley [Mon, 30 Oct 2017 21:28:06 +0000 (14:28 -0700)]
Merge pull request from carldotac/master

Fix documentation typos
GitHub-reference: https://github.com/jwiegley/use-package/issues/513

6 years agoFix typos in docstring
Carl Lieberman [Mon, 30 Oct 2017 20:03:35 +0000 (16:03 -0400)]
Fix typos in docstring

6 years agoMerge pull request from emacsjanitors/demote-manually
John Wiegley [Fri, 13 Oct 2017 22:48:07 +0000 (15:48 -0700)]
Merge pull request from emacsjanitors/demote-manually

Don't use with-demoted-errors in use-package-ensure-elpa
GitHub-reference: https://github.com/jwiegley/use-package/issues/507

6 years agoCosmetic changes to use-package-ensure-elpa
Jonas Bernoulli [Fri, 13 Oct 2017 12:09:13 +0000 (14:09 +0200)]
Cosmetic changes to use-package-ensure-elpa

6 years agoDon't use with-demoted-errors in use-package-ensure-elpa
Jonas Bernoulli [Fri, 13 Oct 2017 12:08:06 +0000 (14:08 +0200)]
Don't use with-demoted-errors in use-package-ensure-elpa

It expects a literal string as argument at macro-expansion
time, but we need to construct the message.

7 years agoMerge pull request from raxod502/feat/fix-install-deferred
John Wiegley [Sun, 13 Aug 2017 05:56:38 +0000 (22:56 -0700)]
Merge pull request from raxod502/feat/fix-install-deferred

Fix bug in use-package-install-deferred-package
GitHub-reference: https://github.com/jwiegley/use-package/issues/479

7 years agoRemove duplicate documentation of :mode
Dror Levin [Sun, 30 Jul 2017 21:11:13 +0000 (00:11 +0300)]
Remove duplicate documentation of :mode

7 years agoMerge pull request from joewreschnig/481-delight-docs
John Wiegley [Mon, 10 Jul 2017 19:34:43 +0000 (12:34 -0700)]
Merge pull request from joewreschnig/481-delight-docs

Document :delight in the doc string and README.
GitHub-reference: https://github.com/jwiegley/use-package/issues/484

7 years agoDocument :delight in the doc string and README
Joe Wreschnig [Sun, 9 Jul 2017 20:23:38 +0000 (22:23 +0200)]
Document :delight in the doc string and README

7 years agoAllow `:diminish` with no arguments
Joe Wreschnig [Wed, 14 Jun 2017 18:24:01 +0000 (20:24 +0200)]
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.

7 years agoMerge pull request from joewreschnig/477-delight-wrappers
John Wiegley [Sun, 2 Jul 2017 20:22:40 +0000 (13:22 -0700)]
Merge pull request from joewreschnig/477-delight-wrappers

Allow multiple :delight arguments, or omitting the mode. (https://github.com/jwiegley/use-package/issues/477)
GitHub-reference: https://github.com/jwiegley/use-package/issues/480

7 years agoAllow :major as the third argument in :delight calls
Joe Wreschnig [Sun, 2 Jul 2017 15:45:26 +0000 (17:45 +0200)]
Allow :major as the third argument in :delight calls

7 years agoAllow multiple :delight arguments, or omitting the mode. ()
Joe Wreschnig [Sun, 2 Jul 2017 14:20:01 +0000 (16:20 +0200)]
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

7 years agoFix bug in use-package-install-deferred-package
Radon Rosborough [Fri, 30 Jun 2017 19:26:26 +0000 (12:26 -0700)]
Fix bug in use-package-install-deferred-package

Previously, deferred installation didn't work because I didn't convert
the result of a `completing-read' back from a string to a symbol,
which meant the hash-table lookup failed.

7 years agoMerge pull request from joewreschnig/magic-469
John Wiegley [Fri, 16 Jun 2017 21:54:22 +0000 (14:54 -0700)]
Merge pull request from joewreschnig/magic-469

Add `:magic` and `:magic-fallback` keywords (issue https://github.com/jwiegley/use-package/issues/469).
GitHub-reference: https://github.com/jwiegley/use-package/issues/473

7 years agoAdd `:magic` and `:magic-fallback` keywords (issue)
Joe Wreschnig [Thu, 15 Jun 2017 18:44:11 +0000 (20:44 +0200)]
Add `:magic` and `:magic-fallback` keywords (issue)

These keywords work equivalently to `:mode` or `:interpreter`, but for
`magic-mode-alist` and `magic-fallback-mode-alist`.

The handler function implementation is now passed a list to add to,
and shared by all four of them.
GitHub-reference: https://github.com/jwiegley/use-package/issues/469

7 years agoProtect against errors during package install
David Leatherman [Tue, 23 May 2017 01:23:26 +0000 (18:23 -0700)]
Protect against errors during package install

If the network is missing and there is a new use-package with :ensure,
startup would fail part of the way through due package.el being unable
to reach the package repo.  This will catch that error and report it
while allowing startup to continue.

Copyright-paperwork-exempt: yes

7 years agoMerge pull request from raxod502/feat/failed-autoload-msg
John Wiegley [Tue, 9 May 2017 18:57:54 +0000 (11:57 -0700)]
Merge pull request from raxod502/feat/failed-autoload-msg

Fix quoting error in failed autoload message
GitHub-reference: https://github.com/jwiegley/use-package/issues/456

7 years agoFix quoting error in failed autoload message
Radon Rosborough [Sun, 7 May 2017 22:23:50 +0000 (15:23 -0700)]
Fix quoting error in failed autoload message

7 years agoMerge pull request from raxod502/normalize-nil
John Wiegley [Wed, 5 Apr 2017 17:28:15 +0000 (10:28 -0700)]
Merge pull request from raxod502/normalize-nil

Make use-package-normalize-value handle nil better
GitHub-reference: https://github.com/jwiegley/use-package/issues/449

7 years agoMake use-package-normalize-value handle nil better
Radon Rosborough [Wed, 5 Apr 2017 04:16:06 +0000 (21:16 -0700)]
Make use-package-normalize-value handle nil better

The previous version of `use-package-normalize-value', when passed
nil, would return the list (symbol-value (quote nil)). This meant that
keywords which used `use-package-normalize-value' or the higher-level
normalizer `use-package-normalize-test' would get a non-nil
argument (i.e. the above list) even when the user specified nil to the
package.

This had the concrete impact of making it so that :defer-install nil
was treated as :defer-install t.

7 years agoMerge pull request from raxod502/fix-bind-key-filter
John Wiegley [Mon, 3 Apr 2017 19:34:01 +0000 (12:34 -0700)]
Merge pull request from raxod502/fix-bind-key-filter

Don't mutilate keyword arguments in :bind
GitHub-reference: https://github.com/jwiegley/use-package/issues/447

7 years agoAdd comment explaining keyword-argument patch
Radon Rosborough [Mon, 3 Apr 2017 17:40:46 +0000 (10:40 -0700)]
Add comment explaining keyword-argument patch

7 years agoDon't mutilate keyword arguments in :bind
Radon Rosborough [Mon, 3 Apr 2017 04:03:47 +0000 (21:03 -0700)]
Don't mutilate keyword arguments in :bind

The parsing logic in `use-package-normalize-pairs' is not designed to
deal with keyword arguments. However, `use-package-normalize-pairs' is
used to process the arguments to :bind, which can include keyword
arguments. These keyword arguments are supposed to be passed untouched
to the underlying `bind-keys' function, but there is a clause in
`use-package-normalize-pairs' that replaces lists with their first
element. Thus an invocation like:

(use-package company
  :bind (:map company-active-map
         :filter (company-explicit-action-p)
         ("RET" . company-complete-selection)))

Generates code like this:

(bind-keys
  :map company-active-map
  :filter company-explicit-action-p
  ("RET" . company-complete-selection))

Which generates an error since `company-explicit-action-p' is now
being referenced as a variable rather than a function.

The proper solution is to refactor the logic that goes into parsing
uses of :bind, but this commit adds a temporary patch to eliminate the
above problem, while trying to be as reverse-compatible as possible.
In particular it just inhibits the list-to-first-element
transformation when the previous element processed was a keyword.

7 years agoMerge pull request from raxod502/fix-after
John Wiegley [Mon, 27 Mar 2017 21:49:43 +0000 (14:49 -0700)]
Merge pull request from raxod502/fix-after

Fix :after keyword
GitHub-reference: https://github.com/jwiegley/use-package/issues/439

7 years agoMerge pull request from raxod502/always-defer-install
John Wiegley [Mon, 27 Mar 2017 21:49:33 +0000 (14:49 -0700)]
Merge pull request from raxod502/always-defer-install

Add use-package-always-defer-install
GitHub-reference: https://github.com/jwiegley/use-package/issues/443

7 years agoAdd use-package-always-defer-install
Radon Rosborough [Sun, 26 Mar 2017 21:40:17 +0000 (14:40 -0700)]
Add use-package-always-defer-install

See https://github.com/jwiegley/use-package/pull/433#issuecomment-289317875

7 years agoFix :after keyword
Radon Rosborough [Sun, 19 Mar 2017 15:33:30 +0000 (08:33 -0700)]
Fix :after keyword

Commit [1] broke the functionality of :after (see [2]) due to an
extraneous quote being added.

[1]: bd2afa53c7580d23ed8008267b80e1834b6e6600
[2]: https://github.com/jwiegley/use-package/pull/433#issuecomment-287606553

7 years agoMerge pull request from raxod502/defer-install
John Wiegley [Sun, 19 Mar 2017 07:12:06 +0000 (00:12 -0700)]
Merge pull request from raxod502/defer-install

[RFC] Support for deferred installation
GitHub-reference: https://github.com/jwiegley/use-package/issues/433

7 years agoMerge remote-tracking branch 'origin/master' into defer-install
Radon Rosborough [Sun, 19 Mar 2017 03:43:40 +0000 (20:43 -0700)]
Merge remote-tracking branch 'origin/master' into defer-install

Resolve merge conflicts.

7 years agoUpdate docstring, installation prompt message
Radon Rosborough [Sun, 19 Mar 2017 03:00:53 +0000 (20:00 -0700)]
Update docstring, installation prompt message

7 years agoVarious improvements for deferred installation
Radon Rosborough [Sun, 19 Mar 2017 02:34:28 +0000 (19:34 -0700)]
Various improvements for deferred installation

7 years agoGet :defer-install completely working, in theory
Radon Rosborough [Thu, 9 Mar 2017 04:05:15 +0000 (20:05 -0800)]
Get :defer-install completely working, in theory

* A quoting error has been fixed in `use-package-handler/:defer'.
* `use-package-install-deferred-package' has been updated to return t
  if the package was actually installed, and nil otherwise.
* The fake autoloads generated during deferred installation are
  doctored so Emacs does not think they were defined in the user's
  init-file.
* The docstrings of the fake autoloads have been improved.
* Arguments and interactivity are now correctly passed to the
  autoloaded function.
* The autoload now skips requiring the feature and calling the
  original function if the user declines to install the package. This
  prevents unprofessional errors.

7 years agoImprove deferred installation mechanism
Radon Rosborough [Thu, 9 Mar 2017 03:00:37 +0000 (19:00 -0800)]
Improve deferred installation mechanism

This time around, I've gotten rid of the advice on `require' (that was
never going to work) and instead made `use-package' try to handle
loading the package at the appropriate time. In particular, when
deferred installation is active, all the autoloads generated by
`use-package' are not regular autoloads, but regular functions that
will install the relevant package, require the relevant feature, and
only then call the newly defined (autoloaded) function.

Some smarter logic has been added to make sure things like `:demand'
play nicely with the autoloading system; see the extensive comment in
`use-package-handler/:defer-install' for more information on how that
works.

There was a section in `use-package-install-deferred-package' which
referred to a nonexistent variable `use-package--deferred-features';
that has been removed.

There is now, in addition to `use-package-ensure-function', a new
variable called `use-package-pre-ensure-function'. This is intended
for use by package managers which, unlike package.el, activate
autoloads package-by-package instead of all at once. Even if a package
is marked for deferred installation, the user would likely want its
autoloads activated immediately *if* it was already installed. The
logic for doing that can now be put in
`use-package-pre-ensure-function'.

7 years agoMerge branch 'generalized-ensure' into defer-install
Radon Rosborough [Thu, 9 Mar 2017 02:19:15 +0000 (18:19 -0800)]
Merge branch 'generalized-ensure' into defer-install

7 years agoUpdate docstring for use-package-ensure-function
Radon Rosborough [Thu, 9 Mar 2017 02:16:31 +0000 (18:16 -0800)]
Update docstring for use-package-ensure-function

Now it properly reflects the API changes recently made.

7 years agoFirst cut at :defer-install keyword
Radon Rosborough [Wed, 8 Mar 2017 20:28:40 +0000 (12:28 -0800)]
First cut at :defer-install keyword

This new keyword, if provided along with a non-nil value, causes the
action of :ensure to be deferred until "necessary". Package
installation can be triggered by the user calling the new interactive
function `use-package-install-deferred-package', or by the feature
declared by the `use-package' form being required. This latter
behavior seems to be the simplest way to make sure that package
installation actually takes place when it needs to, but it requires
that an advice be added to `require', which may be considered overly
intrusive. (Also, it's generally considered bad practice for functions
in Emacs to put advice on other functions in Emacs.) Thus it may make
sense to add an option or function to explicitly enable this behavior,
if there does not turn out to be a better way to accomplish deferred
installation.

Documentation has not been updated to reflect :defer-install yet.

7 years agoExtend capabilities of use-package-ensure-function
Radon Rosborough [Wed, 8 Mar 2017 19:17:33 +0000 (11:17 -0800)]
Extend capabilities of use-package-ensure-function

Modify the expected API of `use-package-ensure-function' so that it is
passed three arguments: the name of the package declared in the
`use-package' form; the argument passed to `:ensure'; and the current
`state' plist created by previous handlers. (Previously, it was only
given a single argument, which was the argument passed to `:ensure',
or the name of the package declared in the `use-package' form, if the
former was `t'.

This allows for more flexibility in the capabilities of the
`use-package-ensure-function' implementation. For example, its
behavior can change depending on the values of other keywords, if
those keywords modify the `state' plist appropriately.

7 years agoRevert "Return `t' after calling `eval-after-load'"
John Wiegley [Sat, 18 Feb 2017 09:32:34 +0000 (01:32 -0800)]
Revert "Return `t' after calling `eval-after-load'"

This reverts commit 87a8ff6d693f3cc79ea423ca8c8e0a60b0bc596c.

7 years agoSupport multiple symbols passed to :after
John Wiegley [Thu, 16 Feb 2017 21:48:05 +0000 (13:48 -0800)]
Support multiple symbols passed to :after

The following expressions are now permitted:

    foo                         ; load after foo is loaded
    foo bar                     ; load after both foo and bar are loaded
    :all foo bar                ; same as previous
    :any foo bar                ; load after either foo or bar is loaded
    :any (:all foo bar) baz     ; more complex combinations...
    :any (:all foo bar) (:all baz wow)
    :all (:any foo bar) (:any baz wow)

Fixes https://github.com/jwiegley/use-package/issues/283

7 years ago:mode and :interpreter can now accept (rx ...) forms
John Wiegley [Thu, 16 Feb 2017 20:03:59 +0000 (12:03 -0800)]
:mode and :interpreter can now accept (rx ...) forms

Fixes https://github.com/jwiegley/use-package/issues/204

7 years agoReturn `t' after calling `eval-after-load'
John Wiegley [Thu, 16 Feb 2017 19:44:41 +0000 (11:44 -0800)]
Return `t' after calling `eval-after-load'

Fixes https://github.com/jwiegley/use-package/issues/174

7 years agoAdd autoload cookie for use-package-autoload-keymap
John Wiegley [Thu, 16 Feb 2017 19:33:29 +0000 (11:33 -0800)]
Add autoload cookie for use-package-autoload-keymap

Fixes https://github.com/jwiegley/use-package/issues/337

7 years agoMerge remote-tracking branch 'origin/pr/349'
John Wiegley [Thu, 16 Feb 2017 19:14:25 +0000 (11:14 -0800)]
Merge remote-tracking branch 'origin/pr/349'

7 years agoMerge pull request from justbur/find-form
John Wiegley [Mon, 13 Feb 2017 21:53:56 +0000 (16:53 -0500)]
Merge pull request from justbur/find-form

Add function use-package-jump-to-package-form
GitHub-reference: https://github.com/jwiegley/use-package/issues/359

7 years agoMerge pull request from justbur/imenu3
John Wiegley [Mon, 13 Feb 2017 21:44:04 +0000 (16:44 -0500)]
Merge pull request from justbur/imenu3

Improve imenu support
GitHub-reference: https://github.com/jwiegley/use-package/issues/356

7 years agoMerge pull request from raxod502/fix-use-package-defaults
John Wiegley [Mon, 13 Feb 2017 21:37:47 +0000 (16:37 -0500)]
Merge pull request from raxod502/fix-use-package-defaults

Fix use-package-defaults
GitHub-reference: https://github.com/jwiegley/use-package/issues/430

7 years agoFix use-package-defaults
Radon Rosborough [Mon, 13 Feb 2017 20:48:48 +0000 (12:48 -0800)]
Fix use-package-defaults

This patch should address issues https://github.com/jwiegley/use-package/issues/428 and https://github.com/jwiegley/use-package/issues/429. See https://github.com/jwiegley/use-package/issues/426 for
discussion. In brief, the issue was that use-package-sort-keywords was
not applied when the predicates in use-package-defaults did not return
true, when it should have been applied unconditionally.

7 years agoUnrevert "Add use-package-defaults"
Radon Rosborough [Mon, 13 Feb 2017 20:48:24 +0000 (12:48 -0800)]
Unrevert "Add use-package-defaults"

This reverts commit 013425edeb1829f5d21514f77d41763347538b14.

7 years agoRevert "Add use-package-defaults"
John Wiegley [Mon, 13 Feb 2017 18:33:11 +0000 (10:33 -0800)]
Revert "Add use-package-defaults"

This reverts commit 3dec23c0860ad297436b9b71b221491ae3790cce.

7 years agoMerge pull request from raxod502/use-package-defaults
John Wiegley [Sun, 12 Feb 2017 23:10:45 +0000 (18:10 -0500)]
Merge pull request from raxod502/use-package-defaults

Add use-package-defaults
GitHub-reference: https://github.com/jwiegley/use-package/issues/426

7 years agoAdd use-package-defaults
Radon Rosborough [Mon, 16 Jan 2017 21:47:31 +0000 (13:47 -0800)]
Add use-package-defaults

Previously, the :config, :ensure, and :pin keywords had default
values (dependent on the values of the use-package-always-ensure and
use-package-always-pin). This change allows the user to customize the
default values used for those keywords, and add default values for
their own keywords in a non-hacky way.

This functionality would be useful for (as an example) the
quelpa-use-package package, which needs to use an advice to override
the functionality of :ensure. The same problem prevents adding a
use-package-always-quelpa variable in any reasonable way, without a
way to customize the default values of keywords.

7 years agoMerge pull request from raxod502/use-package-ensure-function
John Wiegley [Mon, 16 Jan 2017 21:09:23 +0000 (13:09 -0800)]
Merge pull request from raxod502/use-package-ensure-function

Add use-package-ensure-function
GitHub-reference: https://github.com/jwiegley/use-package/issues/427

7 years agoAdd use-package-ensure-function
Radon Rosborough [Sun, 15 Jan 2017 16:03:05 +0000 (09:03 -0700)]
Add use-package-ensure-function

This allows the user to customize the :ensure keyword by using a
different package manager than package.el.

7 years agoAdd new customization option `use-package-always-demand`
John Wiegley [Thu, 22 Dec 2016 17:02:52 +0000 (09:02 -0800)]
Add new customization option `use-package-always-demand`

This is equivalent to adding `:demand t` to all `use-package` declarations,
and has the same semantics as doing so (meaning it can be overridden locally
using `:defer t` in a declaration).

Fixes https://github.com/jwiegley/use-package/issues/423

7 years agoMerge pull request from basil-conto/preface
John Wiegley [Sun, 18 Dec 2016 23:21:10 +0000 (15:21 -0800)]
Merge pull request from basil-conto/preface

Increase :preface priority
GitHub-reference: https://github.com/jwiegley/use-package/issues/418

7 years agoMerge pull request from tarsius/outline
John Wiegley [Sun, 18 Dec 2016 23:20:42 +0000 (15:20 -0800)]
Merge pull request from tarsius/outline

Support outline-minor-mode
GitHub-reference: https://github.com/jwiegley/use-package/issues/420

7 years agoMerge pull request from tarsius/bind-later
John Wiegley [Sun, 18 Dec 2016 23:17:20 +0000 (15:17 -0800)]
Merge pull request from tarsius/bind-later

Delay decision whether to use eval-after-load until run-time
GitHub-reference: https://github.com/jwiegley/use-package/issues/419

7 years agoDelay decision whether to use eval-after-load until run-time
Jonas Bernoulli [Sun, 18 Dec 2016 14:47:36 +0000 (15:47 +0100)]
Delay decision whether to use eval-after-load until run-time

Just because a keymap variable is bound at macro-expansion-time
doesn't mean that it must be bound at run-time too.

Change `bind-keys-form', which is used by `bind-keys' and other
macros, to return a form which delays the decision on whether to
wrap the binding forms with `eval-after-load' until run-time.

Fixes https://github.com/jwiegley/use-package/issues/378.

7 years agoSupport outline-minor-mode
Jonas Bernoulli [Sat, 17 Dec 2016 14:26:15 +0000 (15:26 +0100)]
Support outline-minor-mode

In "use-package.el" prefix headings with ";;;" instead of just
";;".  In "bind-key.el" add the missing ";;; Code:" heading.
In both libraries set `outline-regexp' to an appropriate value.

7 years agoIncrease :preface priority
Basil L. Contovounesios [Fri, 16 Dec 2016 08:50:05 +0000 (08:50 +0000)]
Increase :preface priority

Reconcile order of `use-package-keywords' with the README
description of `:preface' as occurring before everything but
`:disabled'.

7 years agoMerge pull request from phst/bug398
John Wiegley [Mon, 31 Oct 2016 17:25:04 +0000 (10:25 -0700)]
Merge pull request from phst/bug398

Declare package-read-all-archive-contents
GitHub-reference: https://github.com/jwiegley/use-package/issues/402

7 years agoDeclare package-read-all-archive-contents
Philipp Stephani [Mon, 31 Oct 2016 17:22:03 +0000 (18:22 +0100)]
Declare package-read-all-archive-contents

Fixes https://github.com/jwiegley/use-package/issues/398

7 years agoRemove tests, which don’t work
Philipp Stephani [Mon, 31 Oct 2016 17:16:50 +0000 (18:16 +0100)]
Remove tests, which don’t work

Fixes https://github.com/jwiegley/use-package/issues/399

7 years agoDon't allow implicit package name arg for binders
Noam Postavsky [Fri, 5 Aug 2016 22:43:34 +0000 (18:43 -0400)]
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.

7 years agoDon't allow nil as a mode function
Noam Postavsky [Thu, 26 May 2016 19:09:46 +0000 (15:09 -0400)]
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")).

7 years agoRefactor pair normalizers; add tests for them
Noam Postavsky [Thu, 26 May 2016 19:08:32 +0000 (15:08 -0400)]
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.

7 years agoRemove obsolete mplist tests
Noam Postavsky [Thu, 26 May 2016 19:00:56 +0000 (15:00 -0400)]
Remove obsolete mplist tests

The mplist functions were removed in the 2.0
refactoring (4ae584f3ff0e9bda05420ec3b8598e59374b0899).

7 years agoBump version to 2.3
John Wiegley [Mon, 17 Oct 2016 23:40:29 +0000 (16:40 -0700)]
Bump version to 2.3

8 years agoMerge pull request from appleby/master
John Wiegley [Mon, 15 Aug 2016 18:37:44 +0000 (11:37 -0700)]
Merge pull request from appleby/master

Ensure package-pinned-packages is bound before referencing it.
GitHub-reference: https://github.com/jwiegley/use-package/issues/376

8 years agoEnsure package-pinned-packages is bound before referencing it
Mike Appleby [Mon, 15 Aug 2016 03:43:36 +0000 (22:43 -0500)]
Ensure package-pinned-packages is bound before referencing it

Add a bound-and-true-p guard to package-pinned-packages before
referencing it in use-package-ensure-elpa.

Package pinning was introduced in Emacs 24.4, and hence
package-pinned-packages in unbound by default in earlier versions.

Relevant commits:
 72452b5 Merge pull request https://github.com/jwiegley/use-package/issues/367 from ketbra/master
 5053f75 Make pin and ensure compatible

Fixes https://github.com/jwiegley/use-package/issues/375

Copyright-paperwork-exempt: yes

8 years agoRemove the use of a tab
John Wiegley [Fri, 22 Jul 2016 18:23:10 +0000 (11:23 -0700)]
Remove the use of a tab

8 years agoMerge pull request from ketbra/master
John Wiegley [Fri, 22 Jul 2016 18:22:39 +0000 (11:22 -0700)]
Merge pull request from ketbra/master

Update use-package.el
GitHub-reference: https://github.com/jwiegley/use-package/issues/367

8 years agoMake pin and ensure compatible
Matthew Feinberg [Thu, 21 Jul 2016 12:38:30 +0000 (08:38 -0400)]
Make pin and ensure compatible

`:pin` does not work with `:ensure`, because it doesn't add the package to package-pinned-packages until after reading the package archive contents.  This change causes the package archive contents to be reread if the package is pinned and `:ensure` is being used.

Copyright-paperwork-exempt: yes

8 years agoMerge pull request from npostavs/state-noconst
John Wiegley [Mon, 18 Jul 2016 16:10:49 +0000 (09:10 -0700)]
Merge pull request from npostavs/state-noconst

Some minor fixes
GitHub-reference: https://github.com/jwiegley/use-package/issues/342

8 years agoFix declare-function call: FILE must be a string
Noam Postavsky [Mon, 18 Jul 2016 02:28:25 +0000 (22:28 -0400)]
Fix declare-function call: FILE must be a string

8 years agouse-package-as-string: use noerror parameter
Noam Postavsky [Mon, 7 Sep 2015 02:28:50 +0000 (22:28 -0400)]
use-package-as-string: use noerror parameter

8 years agoDon't pass a constant as the state
Noam Postavsky [Sun, 24 Apr 2016 14:31:23 +0000 (10:31 -0400)]
Don't pass a constant as the state

for use-package-process-keywords, because the function may modify the
list object.  Modifying a quoted constant can lead to unexpected side
effects (e.g. values from previous use-package forms end up in
subsequent ones).

8 years agoVersion 2.2
John Wiegley [Wed, 6 Jul 2016 22:20:41 +0000 (15:20 -0700)]
Version 2.2

8 years agoMerge pull request from justbur/bump-init
John Wiegley [Tue, 5 Jul 2016 20:31:15 +0000 (13:31 -0700)]
Merge pull request from justbur/bump-init

Move :init forms before :after and :demand
GitHub-reference: https://github.com/jwiegley/use-package/issues/360

8 years agoMove :init forms before :after and :demand
Justin Burkett [Thu, 23 Jun 2016 14:01:33 +0000 (10:01 -0400)]
Move :init forms before :after and :demand

The docstring of use-package says that :init should run before the
package is loaded but using :after moves the require statement ahead of
:init when any package specified in :after is already loaded. In the
following example, in the first case bar-x might get set before or after
bar is loaded depending on if foo is already loaded at the time, while
the second case always sets bar-x first.

(use-package bar
  :after (foo)
  :init (setq bar-x 2)
  :config (bar-mode))

(use-package bar
  :init (setq bar-x 2)
  :config (bar-mode))

This commit fixes the issue and makes sure that bar-x is set before bar
is loaded by use-package. Fixes https://github.com/jwiegley/use-package/issues/352.

8 years agoAdd function use-package-jump-to-package-form
Justin Burkett [Thu, 23 Jun 2016 02:46:32 +0000 (22:46 -0400)]
Add function use-package-jump-to-package-form

This is an attempt at resolving https://github.com/jwiegley/use-package/issues/329. The new interactive function
use-package-jump-to-package-form will prompt with a completing read of
all known packages. After selecting a package, use-package-find-require
searches load-history to see where the package was required and then I
attempt to find the correct use-package form using
use-package-form-regexp.

It will fail if the use-package form you are looking for did not
actually load the package. For example it could be something that is a
dependency of a library that was already loaded. In some sense this is a
feature because it is helpful to know that the library was already
loaded when your use-package form was encountered. It will also fail if
your use-package declaration doesn't match the regexp used, but this is
easily adjusted.