diff options
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 13 |
1 files changed, 1 insertions, 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.)" | |||
| 1054 | (let* ((contents (buffer-substring start end)) | 1054 | (let* ((contents (buffer-substring start end)) |
| 1055 | (current-file (buffer-file-name)) | 1055 | (current-file (buffer-file-name)) |
| 1056 | (process (python-shell-get-or-create-process)) | 1056 | (process (python-shell-get-or-create-process)) |
| 1057 | (temp-file (make-temp-file "py"))) | 1057 | (temp-file (convert-standard-filename (make-temp-file "py")))) |
| 1058 | (with-temp-file temp-file | 1058 | (with-temp-file temp-file |
| 1059 | (insert contents) | 1059 | (insert contents) |
| 1060 | (delete-trailing-whitespace) | 1060 | (delete-trailing-whitespace) |
| @@ -1062,17 +1062,6 @@ commands.)" | |||
| 1062 | (message (format "Sent: %s..." | 1062 | (message (format "Sent: %s..." |
| 1063 | (buffer-substring (point-min) | 1063 | (buffer-substring (point-min) |
| 1064 | (line-end-position))))) | 1064 | (line-end-position))))) |
| 1065 | ;; Fix Windows/MS-DOS temp file path | ||
| 1066 | (when (or (eq system-type 'windows-nt) | ||
| 1067 | (eq system-type 'ms-dos) | ||
| 1068 | (eq system-type 'cygwin)) | ||
| 1069 | (setq temp-file | ||
| 1070 | (with-temp-buffer | ||
| 1071 | (insert temp-file) | ||
| 1072 | (goto-char (point-min)) | ||
| 1073 | (while (search-forward "/" nil t) | ||
| 1074 | (replace-match "\\" nil t)) | ||
| 1075 | (buffer-substring (point-min) (point-max))))) | ||
| 1076 | (with-current-buffer (process-buffer process) | 1065 | (with-current-buffer (process-buffer process) |
| 1077 | (setq inferior-python-mode-current-file current-file) | 1066 | (setq inferior-python-mode-current-file current-file) |
| 1078 | (setq inferior-python-mode-current-temp-file temp-file)) | 1067 | (setq inferior-python-mode-current-temp-file temp-file)) |