Hi everyone,

just finished a small hack for swank-clojure (see my fork on github:
github.com/bertschi/swank-clojure)
The repl thread now has access to the last three input forms that were
typed into the repl. These forms are accessible as **1, **2 and **3
respectively. The Common Lisp names +, ++ and +++ would not work in
Clojure and the output forms are numbered *1, *2 and *3, so this is
what I came up with.

Based on this functionality, I added the Emacs function slime-extract-
test. To explain what it does, here is an example. Imagine the
following repl interaction:

   user> (range 7)
   (0 1 2 3 4 5 6)

   user> (range 3)
   (0 1 2)

   user> (concat *1 *2)
   (0 1 2 0 1 2 3 4 5 6)

Now, hit M-x slime-extract-test and this gets transformed into an
expression suitable for clojure.test

   (is (= (concat (range 3) (range 7)) '(0 1 2 0 1 2 3 4 5 6)))

which is written into a "Testing" buffer.

What do you think? Any use for that?

    Nils

-- 
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

Reply via email to