Emacs config utilizing prelude as a base
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
979 B

  1. ;; On OS X Emacs doesn't use the shell PATH if it's not started from
  2. ;; the shell. Let's fix that:
  3. (exec-path-from-shell-initialize)
  4. ;; Emacs users obviously have little need for Command and Option keys,
  5. ;; but they do need Meta and Super
  6. (setq mac-command-modifier 'super)
  7. (setq mac-option-modifier 'meta)
  8. (defun prelude-swap-meta-and-super ()
  9. "Swap the mapping of meta and super. Very useful for people using their Mac
  10. with a Windows external keyboard from time to time."
  11. (interactive)
  12. (if (eq mac-command-modifier 'super)
  13. (progn
  14. (setq mac-command-modifier 'meta)
  15. (setq mac-option-modifier 'super)
  16. (message "Command is now bound to META and Option is bound to SUPER."))
  17. (progn
  18. (setq mac-command-modifier 'super)
  19. (setq mac-option-modifier 'meta)
  20. (message "Command is now bound to SUPER and Option is bound to META."))))
  21. (define-key prelude-mode-map (kbd "C-c w") 'prelude-swap-meta-and-super)
  22. (provide 'prelude-osx)