Purely syntactic sugar, using :continue is the same as not using any
keyword inside :repeat-map at all.
Amend end of function to pass repeat-map value onto next invocation in
recursive uses. This allows for the same repeat map to be used for
:exit and :continue.
Keys bound inside the scope of :exit are bound inside the repeat map,
but do not have their repeat-map property set (so they run a function,
but 'exit' the map).
use-package-normalize/:bind: allow keyword :repeat-map.
bind-keys-form: Add keyword :repeat-map. Specifying a symbol as the
repeat-map defines a keymap with that name (and with the docstring
`repeat-doc', if specified). Symbols for functions bound to keys under
the scope of :repeat-map have their 'repeat-map property set to this
map. Update docstring (and that of `bind-keys') to reflect changes.
Rename `doc' to `prefix-doc' for clarity and consistency with
'repeat-doc'.
* eval-when-compile for cases where use-package is only required at
compile time
* remove the 'use-package theme from custom-enabled-themes so e.g.
(mapc #'disable-theme custom-enabled-themes)
won't kill user settings.
I don't know why this special value exists, but perhaps old client code uses it.
The additional `t' in the macro expansion is accidental but not harmful I guess.
Copyright-paperwork-exempt: yes
i.e., following the existing docs for use-package-inject-hooks, these hooks are
run:
use-package--foo--pre-config-hook
use-package--foo--post-config-hook
This should make config customisations more predictable (for example, spacemacs
uses these hooks extensively to allow 'layers' to be customised).
I got rid of the "special" default value for :config, because it doesn't seem to
be treated any differently than nil.
Fixes https://github.com/jwiegley/use-package/issues/785
Copyright-paperwork-exempt: yes
also improve :chord keyword syntax processing to more closely mimic bind-keys since the same binding
normalizer is used.
also add tests for use-package-chords to cover these test cases
This makes the preferred syntax consistent with other `use-package`
keywords. All of these are now valid:
```
(use-package format-all
:ensure-system-package
(prettier . "npm i -g prettier")
(rufo . "gem install rufo"))
(use-package format-all
:ensure-system-package
((prettier . "npm i -g prettier")
(rufo . "gem install rufo")))
(use-package format-all
:ensure-system-package
(prettier . "npm i -g prettier"))
```
use-package specified lisp-indent-function to indent like defun.
Currently, use-package main macro specify indent as (declare (indent 1)),
then change indent mode like defun.
(declare (indent defun)) is same effect.
And it is useful when redefining use-package.
Emacs 25 defined a global variable `features', which triggers a
warning "Lexical argument shadows the dynamic variable features".
That's not `use-package's fault, but we should suppress the warning
anyway, so that there is no additional noise that would cause us to
potentially overlook warnings that absolutely have to be addressed.
:ensure-system-package was installing packages by running
system-packages-get-command via async-shell-command. This meant that
system-packages-use-sudo wasn't being honoured.
This patch makes :ensure-system-package use system-packages-install
for all cases, except where a custom install command is supplied, in
which case async-shell-command is used.
This issue was introduced in 9f034a0bcf [https://github.com/jwiegley/use-package/issues/673], as a fix for
[https://github.com/jwiegley/use-package/issues/661]. Prior to that commit, system-packages-use-sudo was being
honoured.
This patch also fixes a bug where a cons containing a lone symbol in a
list of conses causes nil to used as the package to install.
GitHub-reference: fix https://github.com/jwiegley/use-package/issues/720
Copyright-paperwork-exempt: yes
When it is at the end, the keys don't get bound until after the package has been loaded, which is bad. Placing it at the beginning allows the key bindings to be mapped to auto-loaded functions before the package is loaded, so that a key chord press triggers the package load.