Created
September 3, 2013 02:04
-
-
Save seh/6418974 to your computer and use it in GitHub Desktop.
My current SLIME configuration.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;:* lisp.el | |
;:*======================= | |
(defmacro make-key-inserter (def) | |
"Substitute for `self-insert-command'." | |
`(lambda (arg) | |
(interactive "*P") | |
(insert-char ,def (prefix-numeric-value arg)))) | |
(define-key lisp-mode-shared-map "[" 'insert-parentheses) | |
(define-key lisp-mode-shared-map "]" 'move-past-close-and-reindent) | |
(define-key lisp-mode-shared-map "\M-[" (make-key-inserter ?\[)) | |
(define-key lisp-mode-shared-map "\M-]" (make-key-inserter ?\])) | |
(add-hook 'lisp-mode-hook (lambda () | |
(turn-on-font-lock))) | |
(add-to-list 'load-path "/usr/local/lib/common-lisp/slime") | |
(require 'slime-autoloads) | |
(slime-setup '(slime-fancy | |
;; Not provided by "fancy": | |
inferior-slime | |
slime-asdf | |
slime-banner | |
;; This one doesn't `provide' properly: | |
;; slime-cl-indent | |
slime-xref-browser)) | |
(add-hook | |
'slime-load-hook | |
(lambda () | |
(add-hook 'inferior-lisp-mode-hook | |
(lambda () (inferior-slime-mode t))) | |
;; Enhance completion. | |
(let ((sym 'slime-fuzzy-complete-symbol)) | |
(when (fboundp sym) | |
(setq slime-complete-symbol*-fancy t | |
slime-complete-symbol-function sym))) | |
(define-key lisp-mode-shared-map "\M-\C-]" 'slime-close-all-parens-in-sexp) | |
(add-hook 'slime-mode-hook | |
(lambda () | |
(let ((sym 'common-lisp-indent-function)) | |
(when (fboundp sym) | |
(setq lisp-indent-function sym))))) | |
(setq slime-lisp-implementations | |
'((sbcl ("/opt/local/bin/sbcl")))))) | |
;:::::::::::::::::::::::::::::::::::::::::::::::::* | |
(message "Lisp settings initialized") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment