Skip to content

Instantly share code, notes, and snippets.

View cstby's full-sized avatar

Carl Steib cstby

View GitHub Profile
@cstby
cstby / cider-eval-n-defuns.md
Last active January 17, 2022 23:12
Faster feedback in Clojure with `cider-eval-n-defuns`.

Summary

You can use this Emacs function to easily evaluate multiple top-level forms in Clojure using CIDER.

(defun cider-eval-n-defuns (n)
  "Evaluate N top-level forms, starting with the current one."
  (interactive "P")
  (cider-eval-region (car (bounds-of-thing-at-point 'defun))
                     (save-excursion
 (dotimes (i (or n 2))