1

I'm using a Mac keyboard on Ubuntu at work. What do I add to my .emacs file to turn the command key to Meta? I tried (setq mac-command-key-is-meta t) and (setq mac-command-key 'meta) and neither works.

Daniel DiPaolo
  • 55,313
  • 14
  • 116
  • 115
dimvar
  • 561
  • 5
  • 14

2 Answers2

2

have you tried

(setq mac-command-modifier 'meta)

staticor
  • 620
  • 9
  • 19
1

I think in Ubunto, your best bet may be to just use xkeymaps to re-define the key in the first place... because you kind of want that key to be meta for everything... I'd just do it globally.

Neither of those variables exist in emacs. You should probably do a C-h v variable name before you bother trying to use a variable...

However, mac-keyboard-modifier-mask-alist seems like it might be what you are looking for. I would swap the option and command values and see if it does what you want.

Brian Postow
  • 11,709
  • 17
  • 81
  • 125
  • 1
    For various reasons I don't want to do it globally. So I'm only looking for ways of how to do it in Emacs. Turns out these variables exist only on OS X versions of Emacs. http://www.mail-archive.com/emacs-pretest-bug@gnu.org/msg01743.html C-h v says nothing about the variable that you mention either on Emacs23. – dimvar May 27 '10 at 16:50
  • I'm running OSX... what emacs are you running? I notice that I'm running v 22.1 so, I'm way behind the times... – Brian Postow May 27 '10 at 17:51
  • 23.1 on ubuntu 10.04 (the latest available from synaptic) – dimvar May 28 '10 at 00:01