Skip to content

Commit ed0cd4d

Browse files
committed
Merge pull request #21 from syohex/refactoring
Refactoring
2 parents a69c568 + 7aa0299 commit ed0cd4d

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

inf-clojure.el

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -352,19 +352,16 @@ Prefix argument AND-GO means switch to the Clojure buffer afterwards."
352352
(end-of-defun)
353353
(let ((end (point)) (case-fold-search t))
354354
(beginning-of-defun)
355-
(inf-clojure-eval-region (point) end)))
356-
(if and-go (inf-clojure-switch-to-repl t)))
355+
(inf-clojure-eval-region (point) end and-go))))
357356

358357
(defun inf-clojure-eval-buffer (&optional and-go)
359358
"Send the current buffer to the inferior Clojure process.
360359
Prefix argument AND-GO means switch to the Clojure buffer afterwards."
361360
(interactive "P")
362361
(save-excursion
363-
(end-of-buffer)
364-
(let ((end (point)) (case-fold-search t))
365-
(beginning-of-buffer)
366-
(inf-clojure-eval-region (point) end)))
367-
(if and-go (inf-clojure-switch-to-repl t)))
362+
(widen)
363+
(let ((case-fold-search t))
364+
(inf-clojure-eval-region (point-min) (point-max) and-go))))
368365

369366
(defun inf-clojure-eval-last-sexp (&optional and-go)
370367
"Send the previous sexp to the inferior Clojure process.

0 commit comments

Comments
 (0)