     (select-window original-window)))
 
 (defun zomp-make-buffer-local-shell ()
-  (make-variable-buffer-local 'zomp-shell-buffer-name)
-  (setq zomp-shell-buffer-name (format "*zomp-shell<%s>*" (buffer-name))))
+  (set (make-variable-buffer-local 'zomp-shell-buffer-name-base)
+       (format "zomp-shell<%s>" (buffer-name)))
+  (set (make-variable-buffer-local 'zomp-shell-buffer-name)
+       (format "*%s*" zomp-shell-buffer-name-base)))
 
 (defun zomp-start-or-show-shell (&optional prefix)
   "Shows the shell in a buffer and starts it if it wasn't

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; shell interaction

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

(defvar zomp-build-architecture "i386"

(defun zomp-shell ()
  (interactive)
  (let ((zomp-new-shell-buffer-name zomp-shell-buffer-name)
        (default-directory zomp-basedir))
    (display-buffer
     (save-window-excursion
       (set-buffer (make-comint zomp-shell-buffer-name-base (zomp-zompsh-command)))
       (unless (equal (buffer-name) zomp-new-shell-buffer-name)
         (error (format "expected comint buffer to be named %s" zomp-shell-buffer-name)))
       ;; in case zomp-shell-buffer-name is buffer local we need to be sure it
       ;; has the same value in the shell buffer as in the zomp buffer invoking
       ;; the shell
       (zomp-shell-mode)
       (set (make-local-variable 'zomp-shell-buffer-name) zomp-new-shell-buffer-name)
       (current-buffer)))
    (message "Started zomp shell")))

(defun zomp-get-shell-buffer (&optional create-if-not-existing)
  "Get the zomp shell interaction buffer. If `create-if-not-existing' is equal
