(require 'cl) (defvar emacs-directory "~/emacs/" "The directory containing the emacs configuration files.") ; Define the load-path (pushnew (expand-file-name emacs-directory) load-path) ;;; MacOS X specific stuff (setq mac-option-modifier 'meta) (setq mac-command-modifier 'hyper) (global-set-key [(hyper a)] 'mark-whole-buffer) (global-set-key [(hyper v)] 'yank) (global-set-key [(hyper c)] 'kill-ring-save) (global-set-key [(hyper x)] 'kill-region) (global-set-key [(hyper s)] 'save-buffer) (global-set-key [(hyper l)] 'goto-line) (global-set-key [(hyper o)] 'find-file) (global-set-key [(hyper f)] 'isearch-forward) (global-set-key [(hyper g)] 'isearch-repeat-forward) (global-set-key [(hyper w)] (lambda () (interactive) (kill-buffer (current-buffer)))) (global-set-key [(hyper .)] 'keyboard-quit) ;; I disabled this since I want to avoid hitting Cmd-q accidentally. (global-set-key [(hyper q)] 'save-buffers-kill-emacs) (require 'redo) (global-set-key [(hyper z)] 'undo) (global-set-key [(hyper shift z)] 'redo)