     (let ((current (shm-actual-node)))
       (cond
        ((shm-find-overlay 'shm-quarantine)
-        (insert open)
+        (shm-insert-string open)
         (let ((point (point)))
           (insert close)
           (goto-char point)))
        (t
-        (shm-adjust-dependents
-         (point)
-         (+
-          (if (not (or (looking-back "[ ,[({]")
-                       (bolp)))
-              (progn (insert " ") 1)
-            0)
-          (length open)
-          (length close)))
-        (insert open)
+        (shm-insert-string open)
         (let ((point (point)))
-          (insert close)
+          (shm-insert-string close)
           (when (and (/= (point) (line-end-position))
                      (not (looking-at "[]){} ,]")))
-            (insert " "))
+            (shm-insert-string " "))
           (goto-char point)
           (shm/init t))))))))
 

    (cond
     ((and current
           (string= "Pat" (shm-node-type-name current)))
      (insert "{}")
      (forward-char -1))
     (t
      (shm-delimit "{" "}")))))

       ;; When inside a list, indent to the list's position with an
       ;; auto-inserted comma.
       ((eq 'List (shm-node-cons parent))
        (shm-insert-string ",")
        (shm-set-node-overlay parent-pair))
       (t
        (shm-insert-string ",")
        (shm-set-node-overlay parent-pair))))))

(defun shm/single-quote ()
