I have the following code in .emacs
: (global-set-key (kbd "M-x g") 'gnus)
to start Gnus with the keybinding M-x g
. I obtain: error: Key sequence M-x g starts with non-prefix key M-x
. How can I define keybindings starting with M-x
? Is this a bad thing to do and should be avoided? I find it more intuitive since the "long version" is M-x gnus
. Defining it as C-c g
for example is no problem but then you start Gnus with C-c g
and, for example, R via M-x R
which is not very intuitive (in contrast to starting both via M-x + 1 letter
The key M-x is already bound to the command execute-extended-command
, which then asks you to provide the name of a command to execute (in you case: gnus
).
Since R
is a command only one-character long, it looks like M-x R is a key sequence, but it's not: it's M-x followed by entering R
in the minibuffer and you have to hit RET to validate your input.
In short:
gnus
, like this: (defalias 'g 'gnus)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With