From 279c9272ee87a6bdbf40ac8ddb0cbffa09a9afc6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabi=C3=A1n=20Ezequiel=20Gallina?= Date: Thu, 17 May 2012 00:03:29 -0300 Subject: [PATCH] Enhancements to internal python shell naming. The internal python shell now takes into account more shell settings in order to generate the unique hash for its name. Also `python-shell-setup-codes' has been simplified and is not allowed to be a list of cons anymore. --- lisp/progmodes/python.el | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 17afb0ee309..777436cf89b 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1181,11 +1181,7 @@ virtualenv." (defcustom python-shell-setup-codes '(python-shell-completion-setup-code python-ffap-setup-code python-eldoc-setup-code) - "List of code run by `python-shell-send-setup-codes'. -Each variable can contain either a simple string with the code to -execute or a cons with the form (CODE . DESCRIPTION), where CODE -is a string with the code to execute and DESCRIPTION is the -description of it." + "List of code run by `python-shell-send-setup-codes'." :type '(repeat symbol) :group 'python :safe 'listp) @@ -1232,8 +1228,13 @@ uniqueness for different types of configurations." (md5 (concat (python-shell-parse-command) + python-shell-prompt-regexp + python-shell-prompt-block-regexp + python-shell-prompt-output-regexp (mapconcat #'symbol-value python-shell-setup-codes "") (mapconcat #'indentity python-shell-process-environment "") + (mapconcat #'indentity python-shell-extra-pythonpaths "") + (mapconcat #'indentity python-shell-exec-path "") (or python-shell-virtualenv-path "") (mapconcat #'indentity python-shell-exec-path ""))))) @@ -1548,8 +1549,6 @@ This function takes the list of setup code to send from the (accept-process-output process python-shell-send-setup-max-wait) (dolist (code python-shell-setup-codes) (when code - (when (consp code) - (setq msg (cdr code))) (message (format msg code)) (python-shell-send-string-no-output (symbol-value code) process))))) -- 2.39.5