   ([]
    `(debug-repl nil ~(meta &form)))
   ([retform]
-   `(debug-repl retform ~(meta &form)))
+   `(debug-repl ~retform ~(meta &form)))
   ([retform form-meta]
+   `(debug-repl ~retform ~(meta &form) ~{}))
+  ([retform form-meta injected-locals]
    `(let [debug-meta# ~(assoc form-meta
                               :ns *ns*
                               :file *file*)
           eval-fn# (fn [e-form#]
                      (eval-with-locals (merge {(symbol "debug-meta") debug-meta#
                                                (symbol "in-debug-ns") (fn [] (in-ns (ns-name (:ns debug-meta#))))}
+                                              ~injected-locals
                                               (local-bindings)
-                                              {(symbol "quit-dr") ~quit-dr}) e-form#))]
+                                              {(symbol "quit-dr") ~quit-dr})
+                                       e-form#))]
       (try
         (binding [level (unchecked-inc level)]
           (clojure.main/repl

            (if-let [new-form# (.nextElement ^java.util.Enumeration quit-dr-exception)]
              (eval-fn# new-form#)
              (eval-fn# ~retform))
            (throw e#)))))))

(defmacro assert-repl [assertion-form]
  `(when *assert*

(ns cmma.dev
  (:require [clojure.walk :as walk]))

;; Simpler debug-repl :: https://github.com/stuarthalloway/circumspec/blob/master/src/clojure/contrib/debug.clj
(defmacro local-bindings
