(add-hook 'slime-repl-mode-hook
(defun clojure-mode-slime-font-lock ()
(let (font-lock-mode)
(clojure-mode-font-lock-setup))))
The results are not visibly different from having not added this
slime-repl-mode-hook.
Once the repl buffer is open, I can get font-lock to work by
doing this manually:
M-x clojure-mode-font-lock-setup
M-x font-lock-mode (turning it off)
M-x font-lock-mode (turning it back on)
What am I misunderstanding?
I'm running:
- Emacs 24.0.91.1
- clojure-mode 1.11.5
- slime 20100404.1
- slime-repl 20100404
- clojure 1.3.0
- clojure-maven-plugin 1.3.8
- swank-clojure 1.3.4
Incidentally, what's with this strange form of let?
(let (font-lock-mode) ;; <- shouldn't this bind variables?
(clojure-mode-font-lock-setup))
// Ben
> M-x clojure-mode-font-lock-setup
> M-x font-lock-mode (turning it off)
> M-x font-lock-mode (turning it back on)
does. The suggested (add-hook 'slime-repl-mode-hook
'clojure-mode-font-lock-setup) does not work either.
You can automate the manual workaround with this:
(add-hook 'slime-repl-mode-hook
(lambda ()
(clojure-mode-font-lock-setup)
(font-lock-mode)
(font-lock-mode)))
jack.
Incidentally, what's with this strange form of let?
(let (font-lock-mode) ;; <- shouldn't this bind variables?
(clojure-mode-font-lock-setup))
Excellent! This worked for me.
Many thanks for the tip.
// ben