;;; .emacs for SLIME working with cygwin emacs

(add-to-list 'load-path "/cygdrive/c/work/slime")
(setq slime-lisp-implementations
      '((abcl ("/cygdrive/c/work/abcl/abcl.bat"))))
(require 'slime)
(slime-setup '(slime-repl slime-asdf slime-fancy slime-banner))

(defun slime-to-lisp-translation (filename)
  (replace-regexp-in-string 
   "\n" "" (shell-command-to-string
	    (format "cygpath.exe --windows %s" filename))))

(defun lisp-to-slime-translation (filename)
  (replace-regexp-in-string 
   "\n" "" (shell-command-to-string 
	    (format "cygpath.exe --unix %s filename"))))

(setq slime-to-lisp-filename-function #'slime-to-lisp-translation)
(setq lisp-to-slime-filename-function #'lisp-to-slime-translation)
