On Aug 10, 3:23 pm, Steve Purcell <st...@sanityinc.com> wrote: > On 10 Aug 2010, at 19:19, Mike Meyer wrote: > > > > > > > On Tue, 10 Aug 2010 09:57:02 -0700 (PDT) > > Alexis Rondeau <alexis.rond...@gmail.com> wrote: > >> What I would like to do is to enable clojure-mode when I get my REPL > >> (connected either via swank-clojure-project or lein swank/M-x slime- > >> connect) but whenever I do M-x clojure-mode, the REPL stops (I think) > >> evaluating. While the syntax highlighting does take effect, writing an > >> expression and pressing Enter yields nothing. The message I get is > >> 'Buffer is read-only". > > > I think you're wanting something that's not possible. Not very > > desirable, for that matter. > > > The repl buffer is a nice tool for communicating with a running > > clojure, so it binds Enter to slime-repl-return, which evaluates the > > current input string. clojure-mode is meant for editing clojure code, > > so it binds Enter to newline-and-indent-relative, to make it easy to > > type the next line in your clojure program. Turning on clojure-mode in > > the repl rebinds Enter (and probably other things), thus breaking them > > in the repl. > > > While you could write a mode that did what you want, I don't think > > anyone has done it yet. The issue is that code you edit in the repl > > isn't saved anywhere if the repl exits. Normally, you create a file > > for your clojure code, and edit that in clojure mode. That gives you > > commands to send functions (and etc.) to the repl so you can test > > them. > > You can, however, make the slime REPL better aware of Clojure syntax (and > font-locking). See the function slime-clojure-repl-setup in my emacs config > here:http://github.com/purcell/emacs.d/blob/master/init-clojure.el > > -Steve
Yes, thank you very much Steve. That looks a lot like what I was thinking of in the first place. Awesome! -- 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 Note that posts from new members are moderated - please be patient with your first post. 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