PageRenderTime 28ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/NEWS.md

https://gitlab.com/vitalii.dr/use-package
Markdown | 273 lines | 187 code | 86 blank | 0 comment | 0 complexity | 609259a78a180ba191d4c77b2b0bb38f MD5 | raw file
  1. # Changes
  2. ## 2.4.1
  3. This is mostly a bug-fix release:
  4. - Update the documentation for :custom as per #850
  5. - Fix broken test due to #850
  6. - better tests
  7. - add test for #845
  8. - Support keymap symbol in bind-key. Fix #845
  9. - use-package-core.el: use the Emacs set-default function to avoid saving :custom vars twice
  10. - Fix Travis
  11. - typo, should be a vector, not a bytecode object
  12. Solves https://github.com/jwiegley/use-package/issues/842
  13. - Add special value back again, in case needed for backwards compat
  14. I don't know why this special value exists, but perhaps old client code uses it.
  15. The additional `t' in the macro expansion is accidental but not harmful I guess.
  16. - Even when there's no :config, run any pre/post config hooks
  17. i.e., following the existing docs for use-package-inject-hooks, these hooks are
  18. run:
  19. use-package--foo--pre-config-hook
  20. use-package--foo--post-config-hook
  21. This should make config customisations more predictable (for example, spacemacs
  22. uses these hooks extensively to allow 'layers' to be customised).
  23. I got rid of the "special" default value for :config, because it doesn't seem to
  24. be treated any differently than nil.
  25. Fixes #785
  26. - Clarify the documentation for :after
  27. - add table of contents to README
  28. - Fix typos
  29. Typos found with codespell.
  30. - Fix typos
  31. - Attempt to explain omit "-hook" better
  32. - Update tests
  33. - Switch from `require' to `load' + `featurep'
  34. - Use `require', not `load', when byte-compiling
  35. - Make custom-face evaluate elisp.
  36. Fix #696.
  37. - Add a line of documentation for (use-pacakage ... :hook).
  38. - Fix typo in README
  39. - Fix documentation for defer
  40. - Add no-query option for pdf-tools-install
  41. - Fix typo in README
  42. - Fix all notes in README
  43. - Mention use-package-ensure in README
  44. Without requiring `use-package-ensure`, setting `use-package-always-ensure`
  45. did not actually work for me.
  46. ## 2.4
  47. ### Breaking changes
  48. - `use-package` no longer requires `diminish` as a dependency, allowing people
  49. to decide whether they want to use diminish or delight. This means that if
  50. you do use diminish, you'll now need to pull it into your configuration
  51. before any use of the `:diminish` kewyord. For example:
  52. ``` elisp
  53. (use-package diminish :ensure t)
  54. ```
  55. - Emacs 24.3 or higher is now a requirement.
  56. - The `:defer-install` keyword has been removed. It may reappear as an add-on
  57. module for use-package in a future release. See issue #442 for more details.
  58. - There is no longer a `use-package-debug` option, since `use-package-verbose`
  59. already has the possible value of `debug`.
  60. - The ordering of several elements of `use-package-keywords` have changed; if
  61. you had previously customized this (or were an extension author adding to
  62. this list), you may need to rework your changes.
  63. - For extension authors, `:commands` should no longer be propagated down for
  64. autoloading. See more below.
  65. ### Other changes
  66. - Upgrade license to GPL 3.
  67. - If `use-package-verbose` is set to the symbol `debug`, any evaluation errors
  68. during package configuration will cause a complete report to be written to a
  69. `*use-package*` buffer, including: the text of the error, the `use-package`
  70. declaration that caused the error, the post-normalized form of this
  71. declaration, and the macro-expanded version (without verbosity-related
  72. code). Note that this still does not help if there are parsing errors, which
  73. cause Emacs to register a Lisp error at startup time.
  74. - New customization variable `use-package-deferring-keywords`, mainly intended
  75. for use by extension packages, indicates keywords that, if used without
  76. `:demand`, cause deferred loading (as if `:defer t` had been specified).
  77. - The `:ensure` keyword now accepts a specific pinning sub-keyword. For
  78. example:
  79. ``` elisp
  80. (use-package foo
  81. :pin "elpa")
  82. ```
  83. This ensure the package `foo` is installed from `"elpa"`.
  84. ``` elisp
  85. (use-package foo
  86. :ensure bar
  87. :ensure (quux :pin "melpa"))
  88. ```
  89. This says that `foo` ensures that `bar` is installed, as well as `quux` from
  90. `"melpa"`. It does *not* ensure that `foo` is installed, because explicit
  91. `:ensure` keywords were given.
  92. - New `:hook` keyword.
  93. - New `:catch` keyword. If `t` or `nil`, it enables (the default, see
  94. `use-package-defaults`) or disables catching errors at load time in
  95. use-package expansions. It can also be a function taking two arguments: the
  96. keyword being processed at the time the error was encountered, and the error
  97. object (as generated by `condition-case`).
  98. - New keywords `:custom (foo1 bar1) (foo2 bar2)` etc., and `:custom-face`.
  99. NOTE: These are only for people who wish to keep customizations with their
  100. accompanying use-package declarations. Functionally, the only benefit over
  101. using `setq` in a `:config` block is that customizations might execute code
  102. when values are assigned. If you currently use `M-x customize-option` and
  103. save to a settings file, you do not want to use this option.
  104. - New `:magic` and `:magic-fallback` keywords.
  105. - New `:defer-install` keyword.
  106. - New customization variable `use-package-enable-imenu-support`.
  107. - New customization variable `use-package-hook-name-suffix`. Any symbols named
  108. in `:hook`, or in the CAR of cons cells passed to `:hook`, have this text
  109. appended to them as a convenience. If you find yourself using this keyword
  110. to add to hooks of different names, or just don't want such appending done,
  111. you can change the text to an empty string.
  112. - New customization variable `use-package-compute-statistics`, and an
  113. accompanying command `M-x use-package-report`. See the README for more
  114. details.
  115. - Allow `:diminish` to take no arguments.
  116. - Support multiple symbols passed to `:after`, and a mini-DSL using `:all` and
  117. `:any`.
  118. - `:mode` and `:interpreter` can now accept `(rx ...)` forms.
  119. - Using `:load-path` without also using `:ensure` now implies `:ensure nil`.
  120. - `:bind (:map foo-map ...)` now defers binding in the map until the package
  121. has been loaded.
  122. - Print key bindings for keymaps in `describe-personal-keybindings`.
  123. - When `use-package-inject-hooks` is non-nil, always fire `:init` and
  124. `:config` hooks.
  125. - Documentation added for the `:after`, `:defer-install`, `:delight`,
  126. `:requires`, `:when` and `:unless` keywords.
  127. - `:requires SYM` is subtly different from `:if (featurep SYM)`, in that it
  128. happens before the `:preface`. This means that using `:requires` will cause
  129. definitions in the `:preface` to not be visible to the byte-compiler,
  130. leading to possible warnings about unknown functions, or functions that may
  131. not be available at run-time (which can generally be ignored, since
  132. `:requires` is intended as a check for basic system functionality; `:after`
  133. should be used to check for the presence of other modules).
  134. - New undocumented (and currently experimental) keyword `:load` may be used to
  135. change the name of the actual package loaded, rather than the package name,
  136. and may even add other names. For example: `(use-package auctex :load
  137. tex-site)`. This keyword is used internally to generate the `require` for a
  138. package, so that deferral is simply a matter of not generating this keyword.
  139. - The source code is now broken into several files, so that certain optional
  140. features (diminish, delight, ensure) may be maintained separately from the
  141. core functionality.
  142. - When using the `:after` keyword, now even autoloadeds keybinding are
  143. deferred until after that other package has loaded, in order to allow
  144. convenient `:bind` to maps only present in that other package. Consider the
  145. following:
  146. ``` elisp
  147. (use-package helm-descbinds
  148. :load-path "site-lisp/helm-descbinds"
  149. :after helm
  150. :bind ("C-h b" . helm-descbinds)
  151. :init
  152. (fset 'describe-bindings 'helm-descbinds))
  153. ```
  154. The binding of `C-h b` here will not occur until helm is loaded; and after
  155. it is loaded, `helm-descbinds` itself is not loaded until the user presses
  156. `C-h b`.
  157. - For extension authors, if you add a keyword to `use-package-keywords` whose
  158. presence should indicate deferred loading, please also add it to
  159. `use-package-deferring-keywords`. Note that this is a bit of a sledgehammer,
  160. in that the mere presence of these keywords implies deferred loading. For a
  161. more subtle approach, see the new `use-package-autoloads/<KEYWORD>` support
  162. mentioned in the next bullet.
  163. - For extension authors, if you wish deferred loading to possibly occur,
  164. create functions named `use-package-autoloads/<KEYWORD>` for each keyword
  165. that you define, returning an alist of the form `(SYMBOL . TYPE)` of symbols
  166. to be autoloaded. `SYMBOL` should be an interactive function, and `TYPE` the
  167. smybol `command`, but this functionality may be extended in future. These
  168. autoloads are established if deferred loading is to happen.
  169. - If you specify a lambda form rather than a function symbol in any of the
  170. constructs that *might* introduce autoloads: `:bind`, `:bind*`,
  171. `:interpreter`, `:mode`, `:magic`, `:magic-fallback`, and `:hook`: then
  172. deferred loading will no longer be implied, since there's nothing to
  173. associate an autoload with that could later load the module. In these cases,
  174. it will be as if you'd specified `:demand t`, in order to ensure the lambda
  175. form is able to execute in the context of the loaded package.
  176. - For extension authors, there is a new customization variable
  177. `use-package-merge-key-alist` that specifies how values passed to multiple
  178. occurrences of the same key should be merged into a single value, during
  179. normalization of the `use-package` declaration into a proper plist. The
  180. default behavior is to simply append the values together (since they are
  181. always normalized to lists).
  182. ### Bug fixes
  183. - Repeating a bind no longer causes duplicates in personal-keybindings.
  184. - When byte-compiling, correctly output declare-function directives.
  185. - Append to *use-package* when debugging, don't clear it.
  186. - Don't allow :commands, :bind, etc., to be given an empty list.
  187. - Explicit :defer t should override use-package-always-demand.