Skip to content
This repository was archived by the owner on Oct 2, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions slamhound.el
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,17 @@
Requires active nrepl or slime connection."
(interactive)
(let* ((code (slamhound-clj-string buffer-file-name))
(result (plist-get (nrepl-send-string-sync code) :stdout)))
(if (string-match "^:error \\(.*\\)" result)
(error (match-string 1 result))
(result (nrepl-send-string-sync code))
(out (if (plist-member result :stdout)
(plist-get result :stdout)
(lax-plist-get (cdr result) "out"))))
(if (string-match "^:error \\(.*\\)" out)
(error (match-string 1 out))
(goto-char (point-min))
;; skip any header comments before the ns
(forward-sexp)
(backward-kill-sexp)
(insert result))))
(insert out))))

(provide 'slamhound)
;;; slamhound.el ends here