Changing emacs bindings on Mac OS X for command to be meta

I'm using GNU Emacs 23.2.1 (x86_64-apple-darwin, NS apple-appkit-1038.29) of 2010-05-08 on black.local on OS X. I downloaded it from here: http://emacsformacosx.com/

My problem is that it doesn't have the command keys mapped to the normal emacs Meta bindings - it has them mapped to what an osx user knows Command-v is now 'cut' for example when I do a describe-keybinding.

How can I get rid of these osx bindings, and make Command mapped back to the normal gnu Meta bindings?


Found it here: http://www.emacswiki.org/emacs/AquamacsFAQ

(setq mac-command-modifier 'meta)

Try KeyRemap4MacBook (Works on all macs - despite the name). It allows remapping practically every key on your keyboard (even stuff like different mappings to left and right shift).

When you define your own mappings in a xml file you can use all kinds of fancy options like Application specific mappings and device specific mappings.

You can also alter the keys comfortable in stock emacs with M-x customize-group RET ns RET

A tip - as some people need the alt key to input special characters is to map 'left alt' to 'fn' and set emacs to use 'fn' as 'meta'.