From d818ffa8705888ee614de67e0e15f9576c3ef577 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabi=C3=A1n=20Ezequiel=20Gallina?= Date: Thu, 17 May 2012 00:03:02 -0300 Subject: [PATCH] Use convert-standard-filename to fix temp files path --- lisp/progmodes/python.el | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 24f232bb98c..aef559f8b74 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -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)) -- 2.39.5