diff options
| author | Fabián Ezequiel Gallina | 2014-12-27 03:32:01 -0300 |
|---|---|---|
| committer | Fabián Ezequiel Gallina | 2014-12-27 03:32:01 -0300 |
| commit | ed65b91571572b73a5c0f8834f94f670390247bd (patch) | |
| tree | 7382059757b4e6c70819435e1249ce9e7b4aebf8 /lisp/progmodes/python.el | |
| parent | 2dd5163d764f395eb31a2306dba385d123af4aba (diff) | |
| download | emacs-ed65b91571572b73a5c0f8834f94f670390247bd.tar.gz emacs-ed65b91571572b73a5c0f8834f94f670390247bd.zip | |
Fix for previous commit
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 02d0cbef262..8bbbd69095c 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -2624,6 +2624,10 @@ instead, while internally the shell will continue to use FILE-NAME. | |||
| 2624 | If DELETE is non-nil, delete the file afterwards." | 2624 | If DELETE is non-nil, delete the file afterwards." |
| 2625 | (interactive "fFile to send: ") | 2625 | (interactive "fFile to send: ") |
| 2626 | (let* ((process (or process (python-shell-get-or-create-process))) | 2626 | (let* ((process (or process (python-shell-get-or-create-process))) |
| 2627 | (encoding (with-temp-buffer | ||
| 2628 | (insert-file-contents | ||
| 2629 | (or temp-file-name file-name)) | ||
| 2630 | (python-info-encoding))) | ||
| 2627 | (temp-file-name (when temp-file-name | 2631 | (temp-file-name (when temp-file-name |
| 2628 | (expand-file-name | 2632 | (expand-file-name |
| 2629 | (or (file-remote-p temp-file-name 'localname) | 2633 | (or (file-remote-p temp-file-name 'localname) |
| @@ -2632,12 +2636,7 @@ If DELETE is non-nil, delete the file afterwards." | |||
| 2632 | (expand-file-name | 2636 | (expand-file-name |
| 2633 | (or (file-remote-p file-name 'localname) | 2637 | (or (file-remote-p file-name 'localname) |
| 2634 | file-name))) | 2638 | file-name))) |
| 2635 | temp-file-name)) | 2639 | temp-file-name))) |
| 2636 | (encoding | ||
| 2637 | (with-temp-buffer | ||
| 2638 | (insert-file-contents | ||
| 2639 | (or temp-file-name file-name)) | ||
| 2640 | (python-info-encoding)))) | ||
| 2641 | (when (not file-name) | 2640 | (when (not file-name) |
| 2642 | (error "If FILE-NAME is nil then TEMP-FILE-NAME must be non-nil")) | 2641 | (error "If FILE-NAME is nil then TEMP-FILE-NAME must be non-nil")) |
| 2643 | (python-shell-send-string | 2642 | (python-shell-send-string |