Skip to content

Instantly share code, notes, and snippets.

@hyone
Created January 20, 2012 06:04
Show Gist options
  • Save hyone/1645612 to your computer and use it in GitHub Desktop.
Save hyone/1645612 to your computer and use it in GitHub Desktop.
Fix syntax to work with slime repl (clojure) with paredit
;; From https://github.com/overtone/live-coding-emacs/blob/master/lib/durendal/durendal.el
(defun clojure-slime-repl-fix-syntax ()
(modify-syntax-entry ?\{ "(}")
(modify-syntax-entry ?\} "){")
(modify-syntax-entry ?\[ "(]")
(modify-syntax-entry ?\] ")[")
(modify-syntax-entry ?~ "' ")
(modify-syntax-entry ?, " ")
(modify-syntax-entry ?^ "'")
(modify-syntax-entry ?= "'"))
(add-hook 'slime-repl-mode-hook 'clojure-slime-repl-fix-syntax)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment