Alexandre Patry

Reducing entropy one post at a time

Alt Car in Emacs for OSX

When I installed emacs for OSX, right option key acted as Meta instead of my beloved alt-car. It can be fixed using these steps:

  1. If you use emacs 23 or prior, install package.el
  2. Add marmalade to the list of repositories in your .emacs: ;; Adds marmalade to package.el (require ‘package)
    (add-to-list ‘package-archives ‘(“marmalade” . ”http://marmalade-repo.org/packages/”)) (package-initialize)
  3. Refresh your package index using M-x package-refresh-contents
  4. Install mac-key-mode using M-x package-install mac-key-mode
  5. Configure the right option key to act like alt-car using the following lines in your .emacs: (require ‘mac-key-mode) (setq mac-option-key-is-meta t) (setq mac-right-option-modifier nil)
  6. Restart emacs

You should now be able to use the right option key as alt-car to enjoy characters like @ and } on a french canadian keyboard.

emacs

Comments