5

I am exploring switching from Emacs for Mac OS X (that is, the official GNU Emacs, compiled for macOS: https://emacsformacosx.com ) to the emacs-mac port, Mitsuharu Yamamoto's version of emacs with additional support for macOS ( https://bitbucket.org/mituharu/emacs-mac/ ).

My reason for switching is to want better, more idiomatic Mac support, so I'd like to configure emacs-mac so that it uses the alt/option key for meta, and supports the as many as possible of the normal system keybindings for the command key? That is, I want to support CMD-S for save, CMD-C for copy, CMD-V for paste, CMD- for end of line, etc..

The closest I have come is this snippet, but this merely disables that CMD key rather than reproducing or revealing default Mac behaviors:

(let ((is-emacs-mac-by-yamamaoto
       (and (boundp 'mac-carbon-version-string)
            (string= window-system "mac"))))

  ;; let "alt/option" key work as META
  ;; (instead of acting as it usually does for text entry)
  (setq mac-option-modifier 'meta)

  ;; Disregard the "command" key entirely
  ;; (instead of using it for META)
  (setq mac-command-modifier nil)

  ;; let "command" key pass to system
  (setq mac-pass-command-to-system 't))

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.