   (if confirm-msg
       `(defun ,name () (interactive)
          (when (y-or-n-p ,confirm-msg)
-           (zomp-tl-do ,command)))
-    `(defun ,name () (interactive) (zomp-tl-do ,command))))
-
-(zomp-dofun zomp-tl-exit "!exit" "Really quit running toplevel? ")
+           (zomp-shell-do ,command)))
+    `(defun ,name () (interactive) (zomp-shell-do ,command))))
+
+(zomp-dofun zomp-tl-exit "!exit" "Really quit running shell? ")
 (zomp-dofun zomp-tl-list-all-bindings "!bindings")
 (zomp-dofun zomp-tl-help "!help")
 (zomp-dofun zomp-tl-toggle-llvm-printing "!llvm")

  (interactive)
  (when (called-interactively-p)
    (message "Evaluating buffer"))
  (zomp-tl-do (buffer-substring (buffer-end -1) (buffer-end 1)) 'create "


")
  (zomp-tl-move-point-to-end))

(defun zomp-tl-discard-input ()
  (interactive)
  (zomp-tl-do "!"))

(defun zomp-tl-run-test ()
  (interactive)
  (when (called-interactively-p)
    (message "Running function test"))
  (zomp-tl-move-point-to-end)
  (zomp-tl-do "!run test"))

(defun zomp-run (&optional prefix)
"Will run test() after evaluating
- the current toplevel expression (function) if toplevel is running
- the current buffer of toplevel is not running
so you can use this as a quick way to start working on a project.

Run this with a prefix to start a toplevel specific to this buffer"
  (interactive "P")
  (when prefix
    (zomp-make-buffer-local-toplevel))
  (if (zomp-get-toplevel-buffer)
      (progn
        (zomp-request-execution-abort)
        (zomp-tl-eval-current))
    (zomp-start-or-show-toplevel prefix)
    (zomp-tl-eval-buffer))
  (zomp-tl-run-test))

(defun zomp-request-execution-abort ()
  "Send a signal to the toplevel to request it to abort the
current main() execution.

Will cause the zompRequestedPause() function to return true. Any
application honoring this will then return from main to allow the
editor to trigger recompilations etc. and possibly resume main()"
  (interactive)
  (when (zomp-get-toplevel-buffer)
    (with-current-buffer zomp-toplevel-buffer-name
      (comint-interrupt-subjob))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

      (set-buffer (get-buffer-create zomp-symbol-buffer))
      (insert-file-contents zomp-symbol-file nil nil nil t))
    (process-send-string
     (zomp-get-shell-buffer)
     (concat "!silent !writeSymbols " zomp-symbol-file "
"))))

