          (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: ")

    (when (file-exists-p zomp-symbol-file)
      (set-buffer (get-buffer-create zomp-symbol-buffer))
      (insert-file-contents zomp-symbol-file nil nil nil t))
    (zomp-tl-do (concat "!silent !writeSymbols " zomp-symbol-file))
    ))

(defconst zomp-identifier-chars "a-zA-Z0-9:*_")
(defconst zomp-identifier-regexp "[a-zA-Z][a-zA-Z0-9:*_]*")

(defun zomp-tl-eval-buffer ()
  (interactive)
  (message "Evaluating buffer")
  (zomp-tl-do (buffer-substring (buffer-end -1) (buffer-end 1)) 'create "


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

