0

I use a package that comes with a handy hydra (and install it with use-package at the moment), but i want to change only some of the keys from that hydra.

the hydra looks like :

(defhydra indent-tools-hydra (:color red :hint nil)
(">" indent-tools-indent))

Hydra doc says:

It is possible to omit both BODY-MAP and BODY-KEY if you don’t
want to bind anything.  In that case, typically you will bind the
generated NAME/body command.

I can't find where the bind is either when I use M-x where-is indent-tools-indent .

How do I change the bind then?

1 Answer 1

1

EDIT in response to the comment

Indeed, it seems that the case of omitting the BODY-MAP is not well explained. Then we can use pp-macroexpand-last-sexp to expand the hydra definition (place your cursor after the defhydra form in your example and call M-x pp-macroexpand-last-sexp). We find that the map is bound to indent-tools-hydra/keymap. So you can define your bindings there.

END EDIT

Just define the keybindings in the map the hydra is using.

You can probably find out which map that is by jumping to the library using M-x find-library, and searching for defhydra where the map is defined/configured in the hydra body (see the hydra docstring for info about the format of the body).

2
  • 1
    I edited my question to be more precise because what you said does not fully help me.
    – John Doe
    Commented Jan 25 at 13:30
  • 1
    Okay, I've updated the answer :) Commented Jan 25 at 14:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.