aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorJohn Wiegley2017-12-07 13:14:32 -0800
committerJohn Wiegley2017-12-07 13:14:32 -0800
commit8fefa49d39dde99dfd13ff9551723ec387a3bfba (patch)
treedbe4b1a57074f732c64c316652d9505c01612be8 /etc
parent80e8a599b4392bbb45a6263c8e750db267b8e4e9 (diff)
downloademacs-8fefa49d39dde99dfd13ff9551723ec387a3bfba.tar.gz
emacs-8fefa49d39dde99dfd13ff9551723ec387a3bfba.zip
Changes to the way auto-deferral is indicated
This change adds a new extension hook `use-package-autoloads/<KEYWORD>` for specifying exactly which autoloads a keyword should imply. This is the proper way to indicate autoloads, rather than adding to the `:commands` entry as was done before. Further, autoloading now must occur in order to cause implied deferred loading; if :bind is used with only lambda forms, for example, this will not cause deferred loading without `:defer t`.
Diffstat (limited to 'etc')
-rw-r--r--etc/USE-PACKAGE-NEWS26
1 files changed, 22 insertions, 4 deletions
diff --git a/etc/USE-PACKAGE-NEWS b/etc/USE-PACKAGE-NEWS
index 76556be9b2e..c34376d3ffe 100644
--- a/etc/USE-PACKAGE-NEWS
+++ b/etc/USE-PACKAGE-NEWS
@@ -30,10 +30,6 @@
30 parameter, but are now done as an extension to `rest`. Please see 30 parameter, but are now done as an extension to `rest`. Please see
31 `use-package-handler/:bind` for a canonical example. 31 `use-package-handler/:bind` for a canonical example.
32 32
33- For extension authors, if you add a keyword to `use-package-keywords` whose
34 presence should indicate deferred loading, please also add it to
35 `use-package-deferring-keywords`.
36
37### Other changes 33### Other changes
38 34
39- Upgrade license to GPL 3. 35- Upgrade license to GPL 3.
@@ -154,6 +150,28 @@
154 it is loaded, `helm-descbinds` itself is not loaded until the user presses 150 it is loaded, `helm-descbinds` itself is not loaded until the user presses
155 `C-h b`. 151 `C-h b`.
156 152
153- For extension authors, if you add a keyword to `use-package-keywords` whose
154 presence should indicate deferred loading, please also add it to
155 `use-package-deferring-keywords`. Note that this is a bit of a sledgehammer,
156 in that the mere presence of these keywords implies deferred loading. For a
157 more subtle approach, see the new `use-package-autoloads/<KEYWORD>` support
158 mentioned in the next bullet.
159
160- For extension authors, if you wish deferred loading to possibly occur,
161 create functions named `use-package-autoloads/<KEYWORD>` for each keyword
162 that you define, returning an alist of the form `(SYMBOL . TYPE)` of symbols
163 to be autoloaded. `SYMBOL` should be an interactive function, and `TYPE` the
164 smybol `command`, but this functionality may be extended in future. These
165 autoloads are established if deferred loading is to happen.
166
167- If you specify a lambda form rather than a function symbol in any of the
168 constructs that *might* introduce autoloads: `:bind`, `:bind*`,
169 `:interpreter`, `:mode`, `:magic`, `:magic-fallback`, and `:hook`: then
170 deferred loading will no longer be implied, since there's nothing to
171 associate an autoload with that could later load the module. In these cases,
172 it will be as if you'd specified `:demand t`, in order to ensure the lambda
173 form is able to execute in the context of the loaded package.
174
157- For extension authors, there is a new customization variable 175- For extension authors, there is a new customization variable
158 `use-package-merge-key-alist` that specifies how values passed to multiple 176 `use-package-merge-key-alist` that specifies how values passed to multiple
159 occurences of the same key should be merged into a single value, during 177 occurences of the same key should be merged into a single value, during