 		     (concat (getenv "SPECWARE4"))))
 	 (bin-dir (concat root-dir
 			  "/Applications/Specware/bin/"
-			  (if (memq system-type '(ms-dos windows-nt windows-95
-						  ms-windows))
+			  (if *windows-system-p*
 			      "windows"
 			    (symbol-name system-type))))
 	 (world-name (concat bin-dir "/Specware4.dxl")))

    ;; The suffix on such files is .dxl.
    ;;
    (setq sw:common-lisp-image-file world-name)
    (setq sw:common-lisp-image-arguments '("+cx")
	  )

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

;; The following is almost the same as the above. The difference is that
;; in the following we execute a Specware application (rather than run Lisp
;; with a Specware world);

(defun run-lisp-application ()
  (interactive)
  (setq sw:common-lisp-host "localhost")
  (setq-default sw::lisp-host sw:common-lisp-host)
;;
;; sw:common-lisp-directory is the directory in which the lisp subprocess will
;; be executed. It is defined in eli/fi-subproc.el with a default value nil
;; This seems to work fine under Unix/Linux but under Windows there is 
;; a "stringp, nil" error message. So we set it to "c:." to avoid the problem.
;;
  (setq sw:common-lisp-directory (getenv "LISP_DIRECTORY"))

;; Below we set a parameter sw:common-lisp-image-name. This is the name 
;; used by eli/fi-subproc.el for the Lisp executable. This is the application
;; we want to run.  The image file (in the ACL sense) or world, is bound 
;; to common-lisp-image-file. If the executable is produced by
;; generate-application, then typically, there will not be an ACL image file.

  (setq sw:common-lisp-image-name (getenv "LISP_EXECUTABLE"))
  (setq sw:common-lisp-image-file (getenv "LISP_HEAP_IMAGE"))
  (setq sw:common-lisp-image-arguments nil) ; '("+c"))

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


(defun run-plain-lisp ()

  (let* ((root-dir (concat (getenv "SPECWARE4") "/"))
	 (bin-dir (concat root-dir
			  "Applications/PSL/bin/"
			  (if *windows-system-p*
			      "windows"
			    (symbol-name system-type))))
	 (world-name (concat bin-dir "/PSL.dxl")))
