]> git.eshelyaron.com Git - emacs.git/commitdiff
Use convert-standard-filename to fix temp files path
authorFabián Ezequiel Gallina <fgallina@cuca>
Thu, 17 May 2012 03:03:02 +0000 (00:03 -0300)
committerFabián Ezequiel Gallina <fgallina@gnu.org>
Thu, 17 May 2012 03:03:02 +0000 (00:03 -0300)
lisp/progmodes/python.el

index 24f232bb98c78808b11eb3ed952c114f19fef14c..aef559f8b741741b8ac4063c251104f2f1623858 100644 (file)
@@ -1054,7 +1054,7 @@ commands.)"
   (let* ((contents (buffer-substring start end))
          (current-file (buffer-file-name))
          (process (python-shell-get-or-create-process))
-         (temp-file (make-temp-file "py")))
+         (temp-file (convert-standard-filename (make-temp-file "py"))))
     (with-temp-file temp-file
       (insert contents)
       (delete-trailing-whitespace)
@@ -1062,17 +1062,6 @@ commands.)"
       (message (format "Sent: %s..."
                        (buffer-substring (point-min)
                                          (line-end-position)))))
-    ;; Fix Windows/MS-DOS temp file path
-    (when (or (eq system-type 'windows-nt)
-              (eq system-type 'ms-dos)
-              (eq system-type 'cygwin))
-      (setq temp-file
-            (with-temp-buffer
-              (insert temp-file)
-              (goto-char (point-min))
-              (while (search-forward "/" nil t)
-                (replace-match "\\" nil t))
-              (buffer-substring (point-min) (point-max)))))
     (with-current-buffer (process-buffer process)
       (setq inferior-python-mode-current-file current-file)
       (setq inferior-python-mode-current-temp-file temp-file))