technomancy/swank-clojure — Issue #88: Readme instructions to get syntax highlighting in REPL need update
Author: weissjeffm
Created: 2011-12-08 16:35:34+00:00
State: open

From the readme,

"Put this in your Emacs configuration to get syntax highlighting in the slime repl:

(add-hook 'slime-repl-mode-hook 'clojure-mode-font-lock-setup) "

That hook did not work for me. I know little about emacs internals, but I found a suggestion that did work for me:

(add-hook 'slime-repl-mode-hook
(lambda ()
(font-lock-mode nil)
(clojure-mode-font-lock-setup)
(font-lock-mode t)))

Not sure why it is necessary to turn font-lock-mode off and on like that, but it would not work without it.