Created
January 21, 2009 18:53
-
-
Save wilkes/50110 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(require 'slime) | |
(slime-setup) | |
(require 'clojure-auto) | |
(require 'clojure-paredit) | |
(add-to-list 'auto-mode-alist '("\\.clj$" . clojure-mode)) | |
;; These are extra key defines because I kept typing them. | |
;; Within clojure-mode, have Ctrl-x Ctrl-e evaluate the last | |
;; expression. | |
;; Ctrl-c Ctrl-e is also there, because I kept typoing it. | |
(add-hook 'clojure-mode-hook | |
'(lambda () | |
(define-key clojure-mode-map "\C-c\C-e" 'lisp-eval-last-sexp) | |
(define-key clojure-mode-map "\C-x\C-e" 'lisp-eval-last-sexp))) | |
(define-key slime-mode-map (kbd "<return>") 'newline-and-indent) | |
(define-key slime-mode-map (kbd "C-j") 'newline) | |
(defun clj-repl (binary) | |
(interactive (list (read-file-name "Clojure binary: "))) | |
(setq swank-clojure-binary binary) | |
(require 'swank-clojure-autoload) | |
(slime)) | |
(defun clj () | |
(interactive) | |
(clj-repl "~/bin/clojure")) | |
(defun pt-repl2 () | |
(interactive) | |
(clj-repl "~/Projects/gh/pivotal-tracker-clj/bin/slime")) | |
(defun storybox-repl () | |
(interactive) | |
(clj-repl "~/Projects/gh/storybox/script/slime")) | |
(defun fnord-repl () | |
(interactive) | |
(clj-repl "~/Projects/gh/fnord/bin/slime")) | |
(provide 'my-clojure) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment