   "true if character at offset offset is in a code
    position, e.g. not in a string, regexp, literal char or comment"
   [s offset]
-  (not (#{\" \; \\} (-> (parse s offset) :parents peek :type))))
+  (not (#{\" \; \\} (-> (parse s offset) :parents peek :tag))))
 
 (defn insert
   "insert what at offset. offset shifted by what's length, selection length unchanged"

	                 "\\| " "\\(| "
	                 "\\\\| " "\\\\ (|) "}]
	    [")"         :paredit-close-round
	                {#_"(a b |c [])" #_"(a b c [])|"
	                 #_"(a b |c   )" #_"(a b c)|"
                   #_"( a,  b |[a b ]   )" #_"( a,  b [a b ])|"
                   #_"( a,  b [|a b ]   )" #_"( a,  b [a b ])|"

(defvar *text* (atom {:text "" :offset 0 :length 0})
  "defines a text, with :offset being the cursor position,
   and :length being a possible selection (may be negative)")
