          (unless (zomp-get-toplevel-buffer)
            (zomp-toplevel)))))
 
-(defun zomp-tl-do (code &optional create-if-not-existing)
+(defun zomp-tl-do (code &optional create-if-not-existing append)
   "Send some text to the zomp toplevel. If
   `create-if-not-existing' is 'create then the toplevel will be
   started if it is not running, yet"
+  (process-send-string (zomp-get-toplevel-buffer) "!prompt
+")
   (process-send-string
    (zomp-get-toplevel-buffer create-if-not-existing)
-   (concat code "
+   (concat code (or append "
 ")))
+  (process-send-string (zomp-get-toplevel-buffer) "!prompt #
+"))
 
 (defun zomp-tl-run (funcname)
   (interactive "MName of function: ")

(defun zomp-tl-eval-buffer ()
  (interactive)
  (message "Evaluating buffer")
  (process-send-region (zomp-get-toplevel-buffer 'create) (buffer-end -1) (buffer-end 1))
  (process-send-string (zomp-get-toplevel-buffer) "
")
  (zomp-tl-move-point-to-end))


  (interactive)
  (message "Evaluating region")
  (zomp-request-execution-abort)
  (zomp-tl-do (buffer-substring (region-beginning) (region-end)) 'create "


"))
