Macos – How to change meta key from alt to cmd on Mac in Emacs 24

emacsmacos

I've downloaded Emacs 24 pretest for Mac OS X according to the emacs starter kit guide. Before I've been using Carbon Emacs as the version 1 of starter kit recommends, but version 2 does requires me to upgrade Emacs 24.

The problem is, that in Carbon Emacs, it is cmd that is used for the meta key, but in Emacs 24 pretest, I have to use alt instead.

Is there any simple way to change the keybinding, or do I have to chose another version?

Best Answer

Use the following,

 (setq mac-option-modifier 'super)
 (setq mac-command-modifier 'meta)