Open wesnel opened 1 year ago
It would be nice to abstract this logic on the which-key side, so that any package can use it and which-key doesn't have to know about these packages
I just tried the PR, and it LGTM.
Ok I have found a bug, typing , m m
(C-M-) throws an error.
Hi @wesnel, @AkibAzmain :)
What do we need to merge this?
@AkibAzmain you mentioned that you found an error, what was it?
hi @AkibAzmain, i believe i have fixed your error.
typing , m m
equates to typing C-M-
, which resulted in the error:
Error running timer ‘which-key--update’: (error "C- must prefix a single character, not M-")
i have fixed this by first performing a check on the current devil command string with key-valid-p
. please let me know if anyone knows of a better way to accomplish this.
i have also rebased to fix conflicts with the master branch.
thanks all!
Would love to see this merged!
Hi, thanks for the contribution. I'm currently working on getting which-key merged into core emacs. In the process, I am disentangling the third-party support code from which-key in a way that will allow for third-party support without putting custom code in the which-key file.
See what I did recently with god-mode so you can update this PR. It may no longer be necessary at all. To be clear the goal is to allow for third-party support without modifying the which-key code at all. This should be possible now, but if not I can make further changes.
What is Devil?
The above description comes from their README at:
https://github.com/susam/devil
Unfortunately, Devil is not currently supported by which-key. For example, when I type
, x
, the which-key popup forC-x
does not appear. Instead, I merely see the following text in the echo area:With this patch, I have mimicked the existing god-mode logic in which-key to intercept the current Devil prompt and spawn a which-key popup.
This feature was requested by susam/devil#3: