Skip to content

Commit

Permalink
cursor location after extract-fn
Browse files Browse the repository at this point in the history
  • Loading branch information
joodie committed Nov 7, 2011
1 parent ca025f3 commit 3da40de
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/clojure_refactoring/payload/clojure-refactoring-mode.el
Expand Up @@ -102,7 +102,8 @@
(insert (read s))) (insert (read s)))


(defun clojure-refactoring-extract-fn (fn-name) (defun clojure-refactoring-extract-fn (fn-name)
"Extracts a function." "Extracts the expression at point into a function. Moves point
to args of new function (where the doc string should be)."
(interactive "sFunction name: ") (interactive "sFunction name: ")
(let ((defn (slime-defun-at-point)) (let ((defn (slime-defun-at-point))
(body (get-sexp))) (body (get-sexp)))
Expand All @@ -113,7 +114,9 @@
(clojure-refactoring-call-with-string-args (clojure-refactoring-call-with-string-args
"extract-method" "extract-method" "extract-method" "extract-method"
defn body fn-name))) defn body fn-name)))
(indent-sexp))) (indent-sexp)
(next-line)
(right-char 2)))


(defun clojure-refactoring-thread-expr (str) (defun clojure-refactoring-thread-expr (str)
(let ((body (get-sexp))) (let ((body (get-sexp)))
Expand Down

0 comments on commit 3da40de

Please sign in to comment.