diff options
| author | Joakim Verona | 2012-06-13 18:00:21 +0200 |
|---|---|---|
| committer | Joakim Verona | 2012-06-13 18:00:21 +0200 |
| commit | 13d6898b0656b38da837261ec20a055a1be4a7e5 (patch) | |
| tree | b3399abf9cbea221b083b5bd8368915169b02fb1 /lisp/progmodes/python.el | |
| parent | 5259b41aab32e82ff06d977877f2e456541b3c0b (diff) | |
| parent | 8cca97031d60136b3bdebef0d978ee3fe40eddec (diff) | |
| download | emacs-13d6898b0656b38da837261ec20a055a1be4a7e5.tar.gz emacs-13d6898b0656b38da837261ec20a055a1be4a7e5.zip | |
upstream, doesn build yet
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 620ea8cd519..8595ac581c0 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -1601,13 +1601,18 @@ behavior, change `python-remove-cwd-from-path' to nil." | |||
| 1601 | ;; Fixme: Write a `coding' header to the temp file if the region is | 1601 | ;; Fixme: Write a `coding' header to the temp file if the region is |
| 1602 | ;; non-ASCII. | 1602 | ;; non-ASCII. |
| 1603 | (interactive "r") | 1603 | (interactive "r") |
| 1604 | (let* ((f (make-temp-file "py" nil ".py")) | 1604 | (let* ((temporary-file-directory |
| 1605 | (if (file-remote-p default-directory) | ||
| 1606 | (concat (file-remote-p default-directory) "/tmp") | ||
| 1607 | temporary-file-directory)) | ||
| 1608 | (f (make-temp-file "py" nil ".py")) | ||
| 1609 | (f-local (or (file-remote-p f 'localname) f)) | ||
| 1605 | (command | 1610 | (command |
| 1606 | ;; IPython puts the FakeModule module into __main__ so | 1611 | ;; IPython puts the FakeModule module into __main__ so |
| 1607 | ;; emacs.eexecfile becomes useless. | 1612 | ;; emacs.eexecfile becomes useless. |
| 1608 | (if (string-match "^ipython" python-command) | 1613 | (if (string-match "^ipython" python-command) |
| 1609 | (format "execfile %S" f) | 1614 | (format "execfile %S" f-local) |
| 1610 | (format "emacs.eexecfile(%S)" f))) | 1615 | (format "emacs.eexecfile(%S)" f-local))) |
| 1611 | (orig-start (copy-marker start))) | 1616 | (orig-start (copy-marker start))) |
| 1612 | (when (save-excursion | 1617 | (when (save-excursion |
| 1613 | (goto-char start) | 1618 | (goto-char start) |