I'd like to map a command in emacs to a key-binding. I want the command Control-l
to have the same effect as the command Alt-x goto-line
followed by a return (since that command first needs a return to be invoked and then a line number).
I modified the init file as follows:
(define-key (M-x goto-line) '\C-l)
but that didn't work. The error was that define-key
was being given more than 1 arguments.
Does anyone know how to reset key-bindings in emacs?
Thanks!
M-g g is the default shortcut for goto-line
. You might want to try that.
To redefine C-l use:
(global-set-key (kbd "C-l") 'goto-line)
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