     (goto-char (point-max))
     (comint-bol nil)
     (not (eq (point) (point-max)))))
+
+(defun specware-build-cd-command (dir)
+  (specware-build-command "cd %s" (if *windows-system-p* dir (shell-filename dir))))
 
 (defun specware-build-command (str &rest args)
   (let ((win (get-buffer-window *specware-build-buffer-name*)))

	(accept-process-output proc (or timeout 5))))))

(defun set-socket-init-for-specware ()
  (message "set-socket-init-for-specware")
  (setq sw:common-lisp-image-arguments
    (list "-L" (getenv "SOCKET_INIT_FILE"))))


              (gnu/linux "linux")
	      (t (symbol-name system-type))))))

(defvar fi:allegro-run-status-string)
(defvar comint-status)

(defun wait-for-prompt (&optional timeout)
  (unless (eq lisp-emacs-interface-type 'slime)
    (sit-for 0.1 t)
