         ;; to leave Specware zombies behind if the user just exists from XEmacs 
 	;; (which runs as a separate proccess communicating with Specware).
 
-	(if *windows-system-p* '("+cm") nil)) 
+	(if *windows-system-p* '("+cm") nil))
+
+      (setq sw:common-lisp-host "localhost")
+      (setq-default sw::lisp-host sw:common-lisp-host)
 
       (sw:add-specware-to-isabelle-path)
 


    (let ((log-warning-minimum-level 'error))
      ;; Don't show spurious warning message
      (if sw:image-is-executable
	  (sw:common-lisp sw:common-lisp-buffer-name
			  sw:common-lisp-directory
			  sw:common-lisp-image-file
			  sw:common-lisp-image-arguments
			  sw:common-lisp-host
			  nil)
	(sw:common-lisp sw:common-lisp-buffer-name
			sw:common-lisp-directory
			sw:common-lisp-image-name
			sw:common-lisp-image-arguments
			sw:common-lisp-host
			sw:common-lisp-image-file
			)))
    (goto-char (point-max))
    ))

					    slash-dir)))
  (eval-in-lisp-in-order (format "(specware::setenv \"SPECWARE4\" %S)"
				    (sw::normalize-filename *specware4-dir)))
  (eval-in-lisp-in-order (format "(cl:load %S)"
				 (concat *specware4-dir "/Applications/Handwritten/Lisp/exit-on-errors")))
  (eval-in-lisp-in-order (format "(cl:load %S)"
				 (concat *specware4-dir "/Applications/Handwritten/Lisp/memory-management")))
  (eval-in-lisp-in-order (format "(cl:namestring (specware::change-directory %S))" 
				 build-dir))
  (eval-in-lisp-in-order "(cl-user::set-gc-parameters-for-build nil)")
  (eval-in-lisp-in-order "(cl:load \"Specware4.lisp\")")
  (eval-in-lisp-in-order "(cl-user::compact-memory t)")
  (eval-in-lisp-in-order "(cl-user::set-gc-parameters-for-use nil)")
  (when (file-exists-p world-name)
    (rename-file world-name 
		 (concat bin-dir "/Specware4-saved." *lisp-image-extension*)
		 t))
  (sit-for 5)
  (eval-in-lisp-in-order (format (case *specware-lisp*
