;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; David Steuber's .emacs file for Carbon Emacs (from cvs) on OS X ;;;; Contains stuff stollen from all over the place. ;;;; Much cargo-cult science to be found here! ;;;; ;;;; Thanks to the following people whom I remember contributed: ;;;; * Marco Baringer for key remapping suggestions and, more ;;;; importantly, for the spell required to ;;;; get Safari to show me the CLHS reference ;;;; pages ;;;; * Trent Buck for giving me a shorter incantation to ;;;; bring up Safari with the CLHS ;;;; * Taylor Campbell for paredit.el ;;;; * Bryan O'Connor for slime configuration help so I can run ;;;; OpenMCL and SBCL at the same time ;;;; ;;;; For those whom I forgot, my apologies. ;;;; ;;;; Feel free to share! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (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. '(column-number-mode t) '(cua-mode nil) '(display-battery-mode nil) '(display-time-mode nil) '(global-font-lock-mode t) '(indent-tabs-mode nil) '(ispell-program-name "/darwin-ports/bin/aspell") '(make-backup-files nil) '(show-paren-mode t) '(show-paren-style (quote parenthesis)) '(mac-option-modifier 'meta) '(mac-command-modifier nil) '(uniquify-buffer-name-style (quote forward) nil (uniquify))) ;; and disabled hot keys (put 'downcase-region 'disabled nil) (put 'upcase-region 'disabled nil) (put 'erase-buffer 'disabled nil) ;; Other places to find .el files (add-to-list 'load-path "/Users/david/usr/share/emacs") (add-to-list 'load-path "/Users/david/usr/src/slime") ;; Load these now instead of relying on autoload (require 'slime) (require 'paredit) (require 'color-theme) ;;; SLIME & Lisp (setq common-lisp-hyperspec-root "file:///Users/david/LispStuff/HyperSpec/") (setq browse-url-browser-function 'browse-url-default-macosx-browser) (setenv "SBCL_HOME" "/Users/david/usr/lib/sbcl/") ; needed for SBCL (setq lisp-openmcl "/Users/david/usr/bin/openmcl") (setq lisp-sbcl "/Users/david/usr/bin/sbcl") ;; by registering your implementations, you can choose one by ;; its "short name" when doing M-- M-x slime (setq slime-lisp-implementations '((openmcl ("/Users/david/usr/bin/openmcl")) ; default (sbcl ("/Users/david/usr/bin/sbcl")))) (setq slime-edit-definition-fallback-function 'find-tag) (setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol) (slime-setup :autodoc t) (global-set-key "\C-cs" 'slime-selector) ;; start openmcl with its own inferior-lisp buffer (defun slime-openmcl () (interactive) (apply #'slime-start (list* :buffer "*inferior-lisp-openmcl*" (slime-lookup-lisp-implementation slime-lisp-implementations 'openmcl)))) ;; sbcl with its own inferior-lisp buffer (defun slime-sbcl () (interactive) (apply #'slime-start (list* :buffer "*inferior-lisp-sbcl*" (slime-lookup-lisp-implementation slime-lisp-implementations 'sbcl)))) ;;; Macintosh fonts (set-terminal-coding-system 'iso-8859-1) (set-face-attribute 'default nil :family "monaco" :height 130) (setq default-frame-alist '((width . 116) (height . 42) (top . 0) (left . 0) (tool-bar-lines . 0))) ;; Configure Taylor Campbell's Paredit for Lisp and Emacs Lisp ;; Available from http://mumble.net/~campbell/emacs/paredit.el (add-hook 'lisp-mode-hook 'enable-paredit-mode) (add-hook 'emacs-lisp-mode-hook 'enable-paredit-mode) (define-key paredit-mode-map ")" 'paredit-close-list) (define-key paredit-mode-map (kbd "M-)") 'paredit-close-list-and-newline) ;; misc settings (color-theme-clarity) ; I like this better than dark-laptop. (add-hook 'text-mode-hook 'turn-on-auto-fill)