Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

which-key-add-keymap-based-replacements for prefix #316

Open
Ergus opened this issue Jul 20, 2021 · 3 comments
Open

which-key-add-keymap-based-replacements for prefix #316

Ergus opened this issue Jul 20, 2021 · 3 comments

Comments

@Ergus
Copy link

Ergus commented Jul 20, 2021

Hi:

I use the command which-key-add-keymap-based-replacements to substitute the +prefix entries when possible.

Up to now I have something like (which-key-add-keymap-based-replacements flyspell-mode-map "C-c f" "flyspell") but I see that the new syntax wants a const pair there as the last argument...

What's the intended way to specify that? use a nil?

@justbur
Copy link
Owner

justbur commented Jul 28, 2021

It should actually accept what you have there. Is that line not working?

@Ergus
Copy link
Author

Ergus commented Jul 28, 2021

It should actually accept what you have there. Is that line not working?

Yes, it works, but it is not a cons pair. That is the recommended way to do it according to the documentation.

@justbur
Copy link
Owner

justbur commented Jul 29, 2021

The cons pair is more explicit. The string version is for backwards compatibility. With a string, the function constructs the cons pair (STRING . BINDING) by looking up the corresponding key binding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants