 (defmulti paredit (fn [k & args] k))
 
 (defn open-balanced
-  [[o c] {:keys [text offset length] :as t}]
+  [[o c] {:keys [text offset length] :as t} 
+   chars-with-no-space-before chars-with-no-space-after]
   #_(prn "t:" t)
   (if (in-code? text offset)
-    (let [add-pre-space? (not (contains? (into *real-spaces* *open-brackets*) (previous-char t)))
-          add-post-space? (not (contains? (into *extended-spaces* *close-brackets*) (next-char t)))
+    (let [add-pre-space? (not (contains? chars-with-no-space-before 
+                                         (previous-char t)))
+          add-post-space? (not (contains? chars-with-no-space-after 
+                                          (next-char t)))
           ins-str (str (if add-pre-space? " " "")
                        (str o c)
                        (if add-post-space? " " ""))

                   "(a,| b)" "(a, [|] b)"
                   "(a,|b)" "(a, [|] b)"
                   "(a,|)" "(a, [|])"}]
    ]
  ])


	                 "(defun f (x)\n  |)"
	                "; (Foo.|"
	                 "; (Foo.)|"}]
      ["["         :paredit-open-square
                 {"(a b |c d)"  "(a b [|] c d)"
                  "(foo \"bar |baz\" quux)" "(foo \"bar [|baz\" quux)"}
                  {"(a b|c d)" "(a b [|] c d)"
