Mercurial > emacs
comparison lisp/progmodes/python.el @ 84819:745fc321a3b4
Adam Hupp <adam at hupp.org>
(run-python): Import emacs module without waiting; prevents lockup on
error.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Mon, 24 Sep 2007 00:12:17 +0000 |
parents | e5a68f18fcb9 |
children | 855c76036fe8 |
comparison
equal
deleted
inserted
replaced
84818:8171d3c478b9 | 84819:745fc321a3b4 |
---|---|
1373 ;; cmdlist, but that loses the banner and doesn't run the startup | 1373 ;; cmdlist, but that loses the banner and doesn't run the startup |
1374 ;; file. The code might be inline here, but there's enough that it | 1374 ;; file. The code might be inline here, but there's enough that it |
1375 ;; seems worth putting in a separate file, and it's probably cleaner | 1375 ;; seems worth putting in a separate file, and it's probably cleaner |
1376 ;; to put it in a module. | 1376 ;; to put it in a module. |
1377 ;; Ensure we're at a prompt before doing anything else. | 1377 ;; Ensure we're at a prompt before doing anything else. |
1378 (python-send-receive "import emacs; print '_emacs_out ()'"))) | 1378 (python-send-string "import emacs"))) |
1379 (if (derived-mode-p 'python-mode) | 1379 (if (derived-mode-p 'python-mode) |
1380 (setq python-buffer (default-value 'python-buffer))) ; buffer-local | 1380 (setq python-buffer (default-value 'python-buffer))) ; buffer-local |
1381 ;; Without this, help output goes into the inferior python buffer if | 1381 ;; Without this, help output goes into the inferior python buffer if |
1382 ;; the process isn't already running. | 1382 ;; the process isn't already running. |
1383 (sit-for 1 t) ;Should we use accept-process-output instead? --Stef | 1383 (sit-for 1 t) ;Should we use accept-process-output instead? --Stef |