]> git.eshelyaron.com Git - emacs.git/commit
Allow `:diminish` with no arguments
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Wed, 14 Jun 2017 18:24:01 +0000 (20:24 +0200)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Sat, 8 Jul 2017 13:32:46 +0000 (15:32 +0200)
commitca83649a324128fafa33fad2dc58f54eb1c0480c
treea62042e45b6dbcd32f36f912f6a48a54d8172740
parent463e38b1887e27a9d23c9036f60accc30db0d89e
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.
lisp/use-package/use-package.el
test/lisp/use-package/use-package-tests.el