jwiegley / use-package

A use-package declaration for simplifying your .emacs
https://jwiegley.github.io/use-package
GNU General Public License v3.0
4.42k stars 261 forks source link

Make sure that bind-key's `override-global-mode` is initially on #993

Closed realcomplex closed 2 years ago

realcomplex commented 2 years ago

In cb90d3f the arguments to define-minor-mode were changed erroneously. Whereas the override-global-mode was initially defined as (define-minor-mode override-global-mode "..." t ""), the two latter arguments where changed to :global t :lighter "". However, the two original arguments corresponded to the keywords :init-value and :lighter, respectively.

With :init-value t missing, the minor mode isn't enabled by default, and bind-key* appears not to work (see also #991). This fixes the issue.

Note that to follow the exact meaning of the original code, one would also have to remove the :global t argument. I don't know if that's desirable or not, probably not.

piyo commented 2 years ago

Why is :global t being set? cb90d3fa4168d7e1b2f035f4fbb0d5d08db1fbec is a code refactor so please remove it from with your PR.

realcomplex commented 2 years ago

Yes that makes sense, like I said I didn't know if there was actually any intention behind making the minor mode global in cb90d3f but let's stick to the original meaning of the code.

DamienCassou commented 2 years ago

This PR is important to make bind* work and it's working fine for me.

chadhs commented 2 years ago

Just a heads up, my global overrides stopped working as of this update. I had to explicitly (setq override-global-mode t) to make them work again. I can provide more info if necessary.

jwiegley commented 2 years ago

That's curious, so the :init-value t setting does not set the initial value to t?