2012-04-17 17:35:21 +03:00
|
|
|
;; On OS X Emacs doesn't use the shell PATH if it's not started from
|
2012-10-21 09:23:09 +03:00
|
|
|
;; the shell. Let's fix that:
|
|
|
|
(exec-path-from-shell-initialize)
|
2012-04-17 17:35:21 +03:00
|
|
|
|
2013-01-17 12:17:57 +02:00
|
|
|
;; It's all in the Meta
|
|
|
|
(setq mac-command-modifier 'meta)
|
2012-04-17 17:35:21 +03:00
|
|
|
(setq mac-option-modifier 'meta)
|
2012-10-05 10:31:31 +03:00
|
|
|
|
|
|
|
(defun prelude-swap-meta-and-super ()
|
|
|
|
"Swap the mapping of meta and super. Very useful for people using their Mac
|
|
|
|
with a Windows external keyboard from time to time."
|
|
|
|
(interactive)
|
|
|
|
(if (eq mac-command-modifier 'super)
|
|
|
|
(progn
|
|
|
|
(setq mac-command-modifier 'meta)
|
|
|
|
(setq mac-option-modifier 'super)
|
|
|
|
(message "Command is now bound to META and Option is bound to SUPER."))
|
|
|
|
(progn
|
|
|
|
(setq mac-command-modifier 'super)
|
|
|
|
(setq mac-option-modifier 'meta)
|
|
|
|
(message "Command is now bound to SUPER and Option is bound to META."))))
|
|
|
|
|
|
|
|
(define-key prelude-mode-map (kbd "C-c w") 'prelude-swap-meta-and-super)
|
|
|
|
|
2012-04-17 17:35:21 +03:00
|
|
|
(provide 'prelude-osx)
|