Hi Kyle,

On Wed, Jan 14, 2009 at 11:27 PM, Kyle Smith <mr.kyle.sm...@gmail.com> wrote:
> I'm new to Clojure, SLIME, and emacs in general but I've noticed my
> SLIME REPL does not indent properly when I use <return> or C-j. This
> is the error message I see:
>
> "calculate-lisp-indent: Symbol's function definition is void: clojure-
> indent-function"
>
> I've experienced this when setting up Clojure + SLIME via .emacs and
> also when running Clojure Box. When I open a .clj file indentation
> works just fine. I just have trouble with the SLIME REPL.
>
> One thing I noticed is if I evaluate the function clojure-indent-
> function, function clojure-backtracking-indent, and custom clojure-
> mode-use-backtracking-indent (from clojure-mode.el) within the
> *scratch* buffer my SLIME REPL will indent correctly.
>
> I've seen a few posts with similar problems but I haven't found a
> solution that works.

The function "clojure-indent-function" is defined in clojure-mode.el
but clojure-mode.el is only loaded when a Clojure source file is
opened. Therefore, if for example you opened a Clojure source file and
then started the slime repl, you would not have the problem. However,
you don't want to always open a Clojure source file before you start a
repl, so to fix this, make certain that clojure-mode.el is started
before you start the repl. This can be done in a number of ways -
adding the following to your .emacs startup code is probably the
easiest:

(add-hook 'slime-connected-hook (lambda ()
                                  (require 'clojure-mode)))

--
Bill Clementson

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to