Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change meta key from alt to cmd on Mac in Emacs 24?

Tags:

emacs

macos

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?

like image 913
Jakub Arnold Avatar asked Oct 12 '11 16:10

Jakub Arnold


People also ask

How do I change meta key in Emacs?

From SecureCRT's menu, choose Options | Session Options. Under Emulation | Emacs, select Use Alt as Meta key. Select OK.

What is the meta key on Mac for Emacs?

On the Mac, Emacs can use either the option key or the command key as the META key. If the value of the variable mac-command-key-is-meta is non- nil (its default value), Emacs uses the command key as the META key. Otherwise it uses the option key as the META key.


1 Answers

Use the following,

 (setq mac-option-modifier 'super)  (setq mac-command-modifier 'meta) 
like image 139
Hamza Yerlikaya Avatar answered Oct 09 '22 09:10

Hamza Yerlikaya