I need to assign M-" as a shortcut to some function. How do I do that?

Doing this gives error

 (define-key some-mode-map (kbd 'M-"') 'somefunction) 

You need to use doble-quotes for kbd:

 (define-key some-mode-map (kbd "M-\"") 'somefunction) 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.