diff options
| author | Fabián Ezequiel Gallina | 2012-05-17 00:03:32 -0300 |
|---|---|---|
| committer | Fabián Ezequiel Gallina | 2012-05-17 00:03:32 -0300 |
| commit | 722c985bb0553b4036bff2ec7227492524320425 (patch) | |
| tree | 7e696d087960bd3efbf1ae7401821cb8d3d65d4d /lisp/progmodes/python.el | |
| parent | 338a21d0d138a008c985a82d650f8b4a1b5b35d3 (diff) | |
| download | emacs-722c985bb0553b4036bff2ec7227492524320425.tar.gz emacs-722c985bb0553b4036bff2ec7227492524320425.zip | |
Added compatibility with lastest CEDET.
Obsolete variables definitions:
+ python-buffer => python-shell-internal-buffer
Obsolete functions definitions:
+ python-proc => python-shell-internal-get-or-create-process
+ python-send-string => python-shell-internal-send-string
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 5842dc021c6..9e83ac77f6b 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -1426,13 +1426,26 @@ of commands.)" | |||
| 1426 | dedicated-proc-buffer-name | 1426 | dedicated-proc-buffer-name |
| 1427 | global-proc-buffer-name)))) | 1427 | global-proc-buffer-name)))) |
| 1428 | 1428 | ||
| 1429 | (defvar python-shell-internal-buffer nil | ||
| 1430 | "Current internal shell buffer for the current buffer. | ||
| 1431 | This is really not necessary at all for the code to work but it's | ||
| 1432 | there for compatibility with CEDET.") | ||
| 1433 | (make-variable-buffer-local 'python-shell-internal-buffer) | ||
| 1434 | |||
| 1429 | (defun python-shell-internal-get-or-create-process () | 1435 | (defun python-shell-internal-get-or-create-process () |
| 1430 | "Get or create an inferior Internal Python process." | 1436 | "Get or create an inferior Internal Python process." |
| 1431 | (let* ((proc-name (python-shell-internal-get-process-name)) | 1437 | (let* ((proc-name (python-shell-internal-get-process-name)) |
| 1432 | (proc-buffer-name (format "*%s*" proc-name))) | 1438 | (proc-buffer-name (format "*%s*" proc-name))) |
| 1433 | (run-python-internal) | 1439 | (run-python-internal) |
| 1440 | (setq python-shell-internal-buffer proc-buffer-name) | ||
| 1434 | (get-buffer-process proc-buffer-name))) | 1441 | (get-buffer-process proc-buffer-name))) |
| 1435 | 1442 | ||
| 1443 | (define-obsolete-function-alias | ||
| 1444 | 'python-proc 'python-shell-internal-get-or-create-process "23.3") | ||
| 1445 | |||
| 1446 | (define-obsolete-variable-alias | ||
| 1447 | 'python-buffer 'python-shell-internal-buffer "23.3") | ||
| 1448 | |||
| 1436 | (defun python-shell-send-string (string &optional process msg) | 1449 | (defun python-shell-send-string (string &optional process msg) |
| 1437 | "Send STRING to inferior Python PROCESS. | 1450 | "Send STRING to inferior Python PROCESS. |
| 1438 | When MSG is non-nil messages the first line of STRING." | 1451 | When MSG is non-nil messages the first line of STRING." |
| @@ -1486,10 +1499,10 @@ Returns the output. See `python-shell-send-string-no-output'." | |||
| 1486 | (python-shell-internal-get-or-create-process) nil)) | 1499 | (python-shell-internal-get-or-create-process) nil)) |
| 1487 | 1500 | ||
| 1488 | (define-obsolete-function-alias | 1501 | (define-obsolete-function-alias |
| 1489 | 'python-send-receive 'python-shell-internal-send-string "23.3" | 1502 | 'python-send-receive 'python-shell-internal-send-string "23.3") |
| 1490 | "Send STRING to inferior Python (if any) and return result. | 1503 | |
| 1491 | The result is what follows `_emacs_out' in the output. | 1504 | (define-obsolete-function-alias |
| 1492 | This is a no-op if `python-check-comint-prompt' returns nil.") | 1505 | 'python-send-string 'python-shell-internal-send-string "23.3") |
| 1493 | 1506 | ||
| 1494 | (defun python-shell-send-region (start end) | 1507 | (defun python-shell-send-region (start end) |
| 1495 | "Send the region delimited by START and END to inferior Python process." | 1508 | "Send the region delimited by START and END to inferior Python process." |