Commit graph

696 commits

Author SHA1 Message Date
Philipp Stephani
5bd7e0ca7d Migrate remaining files to lexical binding 2020-08-03 21:37:34 +02:00
John Wiegley
c358eedcf9 Merge pull request from tzz/custom-set-default
GitHub-reference: https://github.com/jwiegley/use-package/issues/855
2020-07-21 14:56:27 -07:00
Ted Zlatanov
13b1e202bf Update the documentation for :custom as per
GitHub-reference: https://github.com/jwiegley/use-package/issues/850
2020-07-12 16:09:10 -04:00
Jimmy Yuen Ho Wong
d3f847eaee Fix broken test due to
GitHub-reference: https://github.com/jwiegley/use-package/issues/850
2020-07-12 15:57:49 -04:00
John Wiegley
3e96664ffe Merge pull request from tzz/custom-set-default
use-package-core.el: use the Emacs set-default function to avoid saving :custom vars twice
GitHub-reference: https://github.com/jwiegley/use-package/issues/850
2020-06-29 11:56:42 -07:00
Ted Zlatanov
8c31c57106 use-package-core.el: use the Emacs set-default function to avoid saving :custom vars twice 2020-06-22 14:24:09 -04:00
John Wiegley
4e72885f85 Merge pull request from jjlee/call-hooks-even-if-no-config
GitHub-reference: https://github.com/jwiegley/use-package/issues/840
2020-06-18 11:04:04 -07:00
John Wiegley
203d15e34e Merge branch 'master' into call-hooks-even-if-no-config 2020-06-18 11:03:35 -07:00
John Wiegley
218687d897 Merge pull request from nahuel/patch-1
GitHub-reference: https://github.com/jwiegley/use-package/issues/843
2020-05-20 16:05:37 -07:00
Nahuel Greco
44c837879e typo, should be a vector, not a bytecode object
Solves https://github.com/jwiegley/use-package/issues/842
2020-05-20 13:44:47 -03:00
John Lee
0ec4660f74 Add special value back again, in case needed for backwards compat
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
2020-05-09 23:46:53 +01:00
John Lee
f30d5761af Even when there's no :config, run any pre/post config hooks
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
2020-05-09 23:46:53 +01:00
John Wiegley
91e5d275af Merge pull request from jwiegley/johnw/clarify
Clarify the documentation for :after
GitHub-reference: https://github.com/jwiegley/use-package/issues/820
2020-03-22 14:10:31 -07:00
John Wiegley
8b8522650e Clarify the documentation for :after 2020-03-04 16:29:16 -08:00
John Wiegley
8e81459dad Merge pull request from DamienCassou/typos
Fix typos
GitHub-reference: https://github.com/jwiegley/use-package/issues/808
2019-11-26 13:34:57 -07:00
Damien Cassou
3a58f53b14 Fix typos
Typos found with codespell.
2019-11-26 21:28:51 +01:00
John Wiegley
0456f878fc Merge pull request from tarsiiformes/typos
Fix typos
GitHub-reference: https://github.com/jwiegley/use-package/issues/804
2019-11-09 20:16:21 -08:00
Jonas Bernoulli
8c7fa11a3f Fix typos 2019-11-06 13:49:46 +01:00
John Wiegley
165f2dd968 Use require', not load', when byte-compiling ()
Use `require', not `load', when byte-compiling
GitHub-reference: https://github.com/jwiegley/use-package/issues/783
2019-07-16 11:29:12 -07:00
Radon Rosborough
20415fb9be Update tests 2019-07-15 22:20:18 -07:00
Radon Rosborough
4c8d5f0b21 Switch from require' to load' + `featurep' 2019-07-15 22:11:13 -07:00
Radon Rosborough
27fd32c47b Use require', not load', when byte-compiling 2019-07-12 08:25:21 -07:00
John Wiegley
97f0287e19 Make custom-face evaluate elisp. ()
Make custom-face evaluate elisp.
GitHub-reference: https://github.com/jwiegley/use-package/issues/773
2019-05-29 13:40:03 -07:00
Vincent Zhang
c297dfdd20 Make custom-face evaluate elisp
Fix https://github.com/jwiegley/use-package/issues/696.

Copyright-paperwork-exempt: yes
2019-05-29 17:42:19 +08:00
John Wiegley
3e36cbfb6d Merge pull request from stribb/master
Add a line of documentation for (use-pacakage ... :hook).
GitHub-reference: https://github.com/jwiegley/use-package/issues/759
2019-04-05 13:47:24 -07:00
Andrew Stribblehill
95f24f9628 Add a line of documentation for (use-pacakage ... :hook)
Copyright-paperwork-exempt: yes
2019-04-04 11:19:52 +02:00
John Wiegley
7e40a9c424 Merge pull request from conao3/fix_default_value
fix gethash default value for use-package-statistics-time
GitHub-reference: https://github.com/jwiegley/use-package/issues/681
2018-11-19 15:50:27 -08:00
John Wiegley
77ad44639f Merge pull request from tarsiiformes/silencio
Silence byte-compiler on Emacs 25
GitHub-reference: https://github.com/jwiegley/use-package/issues/733
2018-11-10 09:58:42 -08:00
Jonas Bernoulli
fc6fef6869 Silence byte-compiler on Emacs 25
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.
2018-11-10 18:52:37 +01:00
John Wiegley
3f96971feb Merge pull request from jwiegley/use-package-chords-suppress-compiler-message
prefix argument with _ to suppress Unused lexical argument warning
GitHub-reference: https://github.com/jwiegley/use-package/issues/713
2018-10-24 16:22:41 -07:00
Justin Talbott
63886cb15f Merge pull request from lrochfort/ensure-system-package_use-sudo
[Fix https://github.com/jwiegley/use-package/issues/720] Install system packages using system-packages-install
GitHub-reference: https://github.com/jwiegley/use-package/issues/721
2018-09-13 11:01:53 -04:00
Laurence Rochfort
ca39ed155f [] Install system packages using system-packages-install
: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
2018-09-12 19:12:49 +01:00
Justin Talbott
607879e647 prefix argument with _ to suppress Unused lexical argument warning
per @tarsius’s comment
5d9c854a6c (commitcomment-29996666)
2018-08-13 15:15:42 -04:00
John Wiegley
4a34b41f96 Merge pull request from justbur/autoload-keymap
Correct prefix keys after use-package-autoload-keymap
GitHub-reference: https://github.com/jwiegley/use-package/issues/686
2018-07-15 11:01:24 -07:00
John Wiegley
c169644637 Merge pull request from jwiegley/ensure-system-package-filepath
allow :ensure-system-package to check the presence of files at path
GitHub-reference: https://github.com/jwiegley/use-package/issues/703
2018-07-10 00:29:34 -07:00
Justin Talbott
2a8c2ffea2 allow :ensure-system-package to check the presence of files at path
closes https://github.com/jwiegley/use-package/issues/660
2018-07-09 17:48:40 -04:00
John Wiegley
0a4d082054 Merge pull request from killdash9/patch-1
Place :chords at beginning of use-package-keywords
GitHub-reference: https://github.com/jwiegley/use-package/issues/697
2018-07-03 12:58:38 -07:00
Russell Black
38dcba6872 Place :chords at beginning of use-package-keywords
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.
2018-06-28 20:40:58 -06:00
John Wiegley
1fb4198933 Merge pull request from killdash9/patch-1
New style of auto-deferral for chords
GitHub-reference: https://github.com/jwiegley/use-package/issues/658
2018-06-25 12:12:37 -07:00
John Wiegley
5fb369c968 Merge branch 'master' into patch-1 2018-06-25 12:09:44 -07:00
John Wiegley
87e26db44f Merge pull request from jabranham/enable-lexical-binding
Enable lexical binding
GitHub-reference: https://github.com/jwiegley/use-package/issues/657
2018-06-13 22:19:49 -07:00
Alex Branham
bdd7fd3565 Fix use-package-normalize-function 2018-06-13 20:24:09 -05:00
Alex Branham
09b7e8e129 Fix use-package-normalize-function tests 2018-06-13 20:24:09 -05:00
Alex Branham
e2e6f9a44b Enable lexical binding
This supersedes https://github.com/jwiegley/use-package/issues/617 and closes https://github.com/jwiegley/use-package/issues/648
2018-06-13 20:24:09 -05:00
John Wiegley
cc9ec36f1a Merge pull request from taingra/master
Added an Introduction taken from the README
GitHub-reference: https://github.com/jwiegley/use-package/issues/692
2018-06-13 13:49:11 -07:00
John Wiegley
b1d9ce08a6 Update use-package.texi 2018-06-13 13:49:00 -07:00
Thomas Ingram
b84a77bcdc Added an Introduction taken from the README
Copyright-paperwork-exempt: yes
2018-06-13 16:24:23 -04:00
Justin Burkett
c980371f6f Correct prefix keys after use-package-autoload-keymap
By adding events of the form (cons t event) to unread-command-events, Emacs
correctly updates this-command-keys for the subsequent use of the prefix.

Before this change, packages like my which-key were not getting the correct
prefix after use-package-autoload-keymap loaded the relevant package.

See https://github.com/justbur/emacs-which-key/issues/192
2018-06-03 21:38:20 -04:00
John Wiegley
36f9a9b9b4 Merge pull request from akhramov/fix/ensure-system-package-cleanup
ensure-system-package cleanup
GitHub-reference: https://github.com/jwiegley/use-package/issues/683
2018-05-19 14:48:47 -07:00
Artyom Khramov
f38a100917 Ensure system package cleanup
The function introduced in https://github.com/jwiegley/use-package/issues/673 wasn't declared at compile time, and
it made byte compiler unhappy. Moreover, it was forgotten to remove
redundant compile time variables. Thanks @tarsius for pointing that
out.

This change
* Removes redundant variable declarations
* Adds `system-packages-get-command` function declaration.

Copyright-paperwork-exempt: yes
2018-05-20 00:53:08 +06:00