Make inferior-python-mode-current-file be set via convert-standard-filename

This commit is contained in:
Fabián Ezequiel Gallina 2012-05-17 00:03:03 -03:00 committed by Fabián Ezequiel Gallina
parent d439cda598
commit 24b68537c3

View file

@ -1065,7 +1065,7 @@ commands.)"
(let* ((contents (buffer-substring start end)) (let* ((contents (buffer-substring start end))
(current-file (buffer-file-name)) (current-file (buffer-file-name))
(process (python-shell-get-or-create-process)) (process (python-shell-get-or-create-process))
(temp-file (convert-standard-filename (make-temp-file "py")))) (temp-file (make-temp-file "py")))
(with-temp-file temp-file (with-temp-file temp-file
(insert contents) (insert contents)
(delete-trailing-whitespace) (delete-trailing-whitespace)
@ -1103,13 +1103,13 @@ instead, while internally the shell will continue to use
FILE-NAME." FILE-NAME."
(interactive "fFile to send: ") (interactive "fFile to send: ")
(let ((process (or process (python-shell-get-or-create-process))) (let ((process (or process (python-shell-get-or-create-process)))
(file-name (convert-standard-filename (expand-file-name file-name))) (file-name (expand-file-name file-name))
(temp-file-name (when temp-file-name (temp-file-name (when temp-file-name
(convert-standard-filename (expand-file-name temp-file-name))))
(expand-file-name temp-file-name)))))
(find-file-noselect file-name) (find-file-noselect file-name)
(with-current-buffer (process-buffer process) (with-current-buffer (process-buffer process)
(setq inferior-python-mode-current-file file-name)) (setq inferior-python-mode-current-file
(convert-standard-filename file-name)))
(python-shell-send-string (python-shell-send-string
(format (format
(concat "__pyfile = open('''%s''');" (concat "__pyfile = open('''%s''');"