Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: ccecb9951e
Fetching contributors…

Cannot retrieve contributors at this time

file 93 lines (78 sloc) 2.883 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
(autoload 'turn-on-cldoc-mode "cldoc" nil t)
(dolist (hook '(lisp-mode-hook
                slime-repl-mode-hook))
  (add-hook hook 'turn-on-cldoc-mode))

;;(add-to-list 'load-path "/opt/local/share/emacs/site-lisp/slime")
;;(add-to-list 'load-path "/opt/local/share/ema/site-lisp/slime/contrib")

;;(require 'slime)

;; (slime-setup
;; '(inferior-slime
;; slime-asdf
;; slime-autodoc
;; slime-banner
;; slime-c-p-c
;; slime-editing-commands
;; slime-fancy-inspector
;; slime-fancy
;; slime-fuzzy
;; slime-highlight-edits
;; slime-parse
;; slime-presentation-streams
;; slime-presentations
;; slime-references
;; slime-scratch
;; slime-tramp
;; slime-typeout-frame
;; slime-xref-browser)) ; fixed per suggestion from tcr on #lisp

;;(setq slime-net-coding-system 'utf-8-unix)

(setq slime-lisp-implementations
      '((sbcl ("/opt/local/bin/sbcl" "--core"
               "/Users/aufflick/Library/Lisp/sbcl.core-with-slime")
              :init (lambda (port-file _)
                      (format
"(swank:start-server %S :coding-system \"utf-8-unix\")\n"
                              port-file))
              :coding-system utf-8-unix)
        (cmucl ("lisp"))
        (ecl ("ecl"))
        (allegro ("/usr/local/stow/AllegroCL/alisp"))
        (clisp ("clisp") :coding-system utf-8-unix)
        (lispworks (""))
        (openmcl ("dx86cl64"))
        (ccl ("/opt/ccl/scripts/ccl64" "-K" "utf-8")
             :coding-system utf-8-unix)))


(setq slime-default-lisp 'sbcl)

(defun start-slime ()
  (interactive)
  (unless (slime-connected-p)
    (save-excursion (slime))))

(add-hook 'slime-mode-hook 'start-slime)
(add-hook 'slime-load-hook
          #'(lambda () (require 'slime-fancy)))
(add-hook 'inferior-lisp-mode-hook
          #'(lambda () (inferior-slime-mode t)))

(setq special-display-regexps
     (quote (("slime-repl" (height . 40) (width . 80)
                           (top . 85) (left . 50))
             ("sldb" (height . 30) (width . 50)
                     (left . 10) (top . 25)))))

(eval-after-load "hyperspec"
  '(progn
     (setq common-lisp-hyperspec-root
           "/Users/aufflick/Documents/Documentation/HyperSpec/")))

;;(require 'hyperspec)

(defun indent-or-complete (&optional arg)
  (interactive "p")
  (if (or (looking-back "^\\s-*") (bolp))
      (call-interactively 'lisp-indent-line)
    (call-interactively 'slime-indent-and-complete-symbol)))

(eval-after-load "lisp-mode"
  '(progn
     (define-key lisp-mode-map [tab] 'indent-or-complete)
     (define-key lisp-mode-map [(meta ?q)] 'slime-reindent-defun)))

(eval-after-load "slime"
  '(progn
     (define-key slime-mode-map [return] 'paredit-newline)
     (define-key slime-repl-mode-map [tab] 'indent-or-complete)
     (define-key inferior-slime-mode-map [(control ?c) (control ?p)]
                 'slime-repl-previous-prompt)))
Something went wrong with that request. Please try again.