(custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(global-font-lock-mode t nil (font-core))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. ) (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-command-key-is-meta nil) ;; Define the return key to avoid problems on MacOS X (define-key function-key-map [return] [13]) (global-set-key [(alt a)] 'mark-whole-buffer) (global-set-key [(alt v)] 'yank) (global-set-key [(alt c)] 'kill-ring-save) (global-set-key [(alt x)] 'kill-region) (global-set-key [(alt s)] 'save-buffer) (global-set-key [(alt l)] 'goto-line) (global-set-key [(alt o)] 'find-file) (global-set-key [(alt f)] 'isearch-forward) (global-set-key [(alt g)] 'isearch-repeat-forward) (global-set-key [(alt w)] (lambda () (interactive) (kill-buffer (current-buffer)))) (global-set-key [(alt .)] 'keyboard-quit) ;; I disabled this since I want to avoid hitting Cmd-q accidentally. ;(global-set-key [(alt q)] 'save-buffers-kill-emacs) (require 'redo) (global-set-key [(alt z)] 'undo) (global-set-key [(alt shift z)] 'redo)