Closed Kungsgeten closed 5 years ago
Thanks for looking at it. I actually wanted to fix it as part of a bigger change but forgot about it later (I personally always specify hints in my hydras). There is a currently unused function pretty-hydra--normalize-head
that was designed for this purpose. You can check for existence of explicit hints there and add the command name if there is none, then you just need to do a (-map #'pretty-hydra--normalize-head heads)
before generating docstrings etc.
Need to think about the edge case where cmd
is an expression not a command. I think it should just signal an error in that case saying hint is required.
Actually fixed it in commit https://github.com/jerrypnz/major-mode-hydra.el/commit/c6554ead6d683fcee1318ae38f5b4188980df2ac now available on develop
branch only.
I had a go at #10 The tests are failing though, since the expected column width isn't correct for a head without hint. Also there may be other problems, if using :width parameter, or :toggle or some other stuff I haven't tested. I thought that this might be a good start for discussion though :)