;;; -*- Mode: emacs-lisp -*-

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Expand the list of packages shown with M-x list-packages.  This should,
;;; for example, allow SLIME to be loaded via the package list mechanism.
;;;
;;; NOTE: If the "slime" package doesn't show up when you do M-x
;;; list-packages, try M-x package-list-packages.
;;;

(require 'package)		       

(add-to-list 'package-archives
             '("melpa" . "http://melpa.org/packages/") t)

(package-initialize)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; SLIME and Lisp setup
;;;

;;; NOTE: Change this to point to where your Lisp is installed.

(setq inferior-lisp-program "/usr/local/bin/sbcl")

(package-install "slime")

(require 'slime-autoloads)
(slime-setup '(slime-fancy slime-presentations))

(global-set-key "\C-cs" 'slime-selector)

;;; Set fill column, autofill for Lisp buffers:
(add-hook 'lisp-mode-hook 
	  '(lambda () 
	    (slime-mode)
	    (setq fill-column 80)
	    (turn-on-auto-fill)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Parenthesis matching -- this can be done in customizations, too.  Matching
;;; is done by default, but setting show-paren-mode will cause the matching
;;; parenthesis to be highlighted when the cursor is next to a parenthesis
;;;

(show-paren-mode t)
