I\'m using emacsformacosx.com and would like to stop the Meta_R (right meta, or right option key) on my Apple keyboard from being an Emacs meta key.
The rea
Aquamacs has a variable called ns-right-alternate-modifier. If I am reading the documentation correctly, this should do what you want:
(setq ns-right-alternate-modifier nil)
I am unsure whether this is supported on stock GNU Emacs.
To map the the left alt key with META and the right alt key with ALT, on the Mac OS X version of GNU Emacs, I use:
(setq mac-option-key-is-meta t)
(setq mac-right-option-modifier nil)
It should do the job for the behaviour you expect.
I found a solution for my macbook pro with french keyboard.
Considering that I hardly ever use the Fn key here what i did:
; ALT is considered as ALT and not interpreted as META
(setq-default mac-option-modifier nil)
; Fn is considered as META and not interpreted as Fn
(setq-default mac-function-modifier 'meta)
So I can fool around with as many backslash as I want in emacs!
\\[GREAT!!!]\\
This is not exactly what you want, but this is what I do and may help someone (for instance on the Macbook keyboard which has only one option key): You could bind just the keys you want:
(global-set-key "\M-_" (lambda () (interactive) (ucs-insert "2014")))
for em dash, etc. Just bind whatever you use commonly. In the rare case you want to type something you haven't bound, you can (in Aquamacs, and it should be possible in other Emacsen as well) hit C-;
which is bound to toggle-mac-option-modifier
, so that Option key is no longer Meta, type the character, and hit C-;
again.