From 722c985bb0553b4036bff2ec7227492524320425 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabi=C3=A1n=20Ezequiel=20Gallina?= Date: Thu, 17 May 2012 00:03:32 -0300 Subject: [PATCH] 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 --- lisp/progmodes/python.el | 21 +++++++++++++++++---- 1 file 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.)" dedicated-proc-buffer-name global-proc-buffer-name)))) +(defvar python-shell-internal-buffer nil + "Current internal shell buffer for the current buffer. +This is really not necessary at all for the code to work but it's +there for compatibility with CEDET.") +(make-variable-buffer-local 'python-shell-internal-buffer) + (defun python-shell-internal-get-or-create-process () "Get or create an inferior Internal Python process." (let* ((proc-name (python-shell-internal-get-process-name)) (proc-buffer-name (format "*%s*" proc-name))) (run-python-internal) + (setq python-shell-internal-buffer proc-buffer-name) (get-buffer-process proc-buffer-name))) +(define-obsolete-function-alias + 'python-proc 'python-shell-internal-get-or-create-process "23.3") + +(define-obsolete-variable-alias + 'python-buffer 'python-shell-internal-buffer "23.3") + (defun python-shell-send-string (string &optional process msg) "Send STRING to inferior Python PROCESS. 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'." (python-shell-internal-get-or-create-process) nil)) (define-obsolete-function-alias - 'python-send-receive 'python-shell-internal-send-string "23.3" - "Send STRING to inferior Python (if any) and return result. -The result is what follows `_emacs_out' in the output. -This is a no-op if `python-check-comint-prompt' returns nil.") + 'python-send-receive 'python-shell-internal-send-string "23.3") + +(define-obsolete-function-alias + 'python-send-string 'python-shell-internal-send-string "23.3") (defun python-shell-send-region (start end) "Send the region delimited by START and END to inferior Python process." -- 2.39.5