use-package icon indicating copy to clipboard operation
use-package copied to clipboard

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

Open realcomplex opened this issue 3 years ago • 2 comments

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.

realcomplex avatar Aug 10 '22 12:08 realcomplex

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

piyo avatar Aug 11 '22 04:08 piyo

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.

realcomplex avatar Aug 11 '22 07:08 realcomplex

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

DamienCassou avatar Aug 15 '22 12:08 DamienCassou

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.

chadhs avatar Aug 17 '22 13:08 chadhs

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

jwiegley avatar Aug 18 '22 16:08 jwiegley