By mistake I have binded M-x ( used for doing all the operations ) to a newly defined function ? How do I unbind it ? Now Alt-x always executes my function 🙁 I dont want to exit emacs and restart again, I have lot of buffers open, so is there a way out here ?
Share
The command usually run is
execute-extended-command, just rebind it.To rebind it, you have several options:
Just make what you did before, but just use instead your own function above mentioned
execute-extended-command. If you did it with M-x command, then you maybe dont know, but M-x is not only produced byAlt-x, but as there are keyboard layouts that have no Alt (or Meta) key, you can useEsc xinstead.Rebind it with elisp command. To do this, change to the
*scratch*buffer, enter(global-set-key (kbd "M-x") 'execute-extended-command)and execute it withC-j.Maybe by using the menue (I usually dont use it, so I am not sure on this point)