imaxima, xemacs and windows



It appears that the problem was that xemacs could not use the png file 
while the gs process was still running. I managed to get imaxima working 
  with this correction to the code:

--------------------------------------
  (when (eq system-type 'windows-nt)
		   (setq filename (imaxima-subst-char-in-string ?\\ ?/ filename))
		   (kill-process imaxima-gs-process)
		   (imaxima-start-gs ))
		 (setq str (concat " " str))
		 (set-text-properties 0 (length str)
				      `(begin-glyph
					,(make-glyph (vector imaxima-image-type
							     :file filename))) str)
		 (add-text-properties 1 (length str) '(invisible t) str)
		 str)
------------------------------------------

This kills and restarts the gs process. There might be a neater and more 
convenient way to do this but at least it works this way. I still get a 
'^M' at the end of every expression, is that normal?

Osmo