    (when (equal create-if-not-existing 'create)
      (zomp-shell)
      (get-buffer-process zomp-shell-buffer-name))))
+
+(defun zomp-toggle-variant ()
+  "Toggle between using Zomp variants. See `zomp-build-variant'."
+  (interactive)
+  (setq zomp-build-variant
+        (if (string= "release" zomp-build-variant)
+            "debug"
+          "release"))
+  (minibuffer-message "Now using Zomp build %s%s" (zomp-build-name)
+                      (if (zomp-get-shell-buffer nil)
+                        ", need to restart zompsh to take effect"
+                        "")))
 
 (defun zomp-shell-move-point-to-end ()
   "Will move the point to the end of the shell buffer for all


  (local-set-key [(control c) (?.) (?s)] 'zomp-shell-sexpr-syntax)
  (local-set-key [(control c) (?.) (?i)] 'zomp-shell-indent-syntax)

  (zomp-add-seperator zomp-sep-3)
  (zomp-add-action zomp-shell-run [(control c)(control d)] "Run function...")

(defvar zomp-shell-buffer-name "*zomp-shell*"
  "The name of the buffer in which the zomp shell runs")

(defvar zomp-build-architecture "x86_64"
  "The name of the architecture to be used")

(defvar zomp-build-variant "release"
  "Whether to use the Zomp \"debug\" or \"release\" build.")

(defun zomp-build-name ()
  "Returns the variant of Zomp used. This value is composed of the build variant
and the architecture like this: \"variant-architecture\"."
  (format "%s-%s" zomp-build-variant zomp-build-architecture))

(defun zomp-zompsh-command ()
  "Returns the command to run zompsh."
  (format "./build/%s/deploy/zompsh" (zomp-build-name)))

(define-derived-mode zomp-shell-mode shell-mode "ZompSh"
  "Major mode for a zomp shell in which you can interactively
  compile and run zomp code"
