aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorFabián Ezequiel Gallina2012-05-17 00:03:29 -0300
committerFabián Ezequiel Gallina2012-05-17 00:03:29 -0300
commit279c9272ee87a6bdbf40ac8ddb0cbffa09a9afc6 (patch)
treee441eee77978106678a74397424374025c05c7c9 /lisp/progmodes/python.el
parente1f00930bf11bfcfca0d7efd7503ab04b8f08d6a (diff)
downloademacs-279c9272ee87a6bdbf40ac8ddb0cbffa09a9afc6.tar.gz
emacs-279c9272ee87a6bdbf40ac8ddb0cbffa09a9afc6.zip
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.
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el13
1 files 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."
1181(defcustom python-shell-setup-codes '(python-shell-completion-setup-code 1181(defcustom python-shell-setup-codes '(python-shell-completion-setup-code
1182 python-ffap-setup-code 1182 python-ffap-setup-code
1183 python-eldoc-setup-code) 1183 python-eldoc-setup-code)
1184 "List of code run by `python-shell-send-setup-codes'. 1184 "List of code run by `python-shell-send-setup-codes'."
1185Each variable can contain either a simple string with the code to
1186execute or a cons with the form (CODE . DESCRIPTION), where CODE
1187is a string with the code to execute and DESCRIPTION is the
1188description of it."
1189 :type '(repeat symbol) 1185 :type '(repeat symbol)
1190 :group 'python 1186 :group 'python
1191 :safe 'listp) 1187 :safe 'listp)
@@ -1232,8 +1228,13 @@ uniqueness for different types of configurations."
1232 (md5 1228 (md5
1233 (concat 1229 (concat
1234 (python-shell-parse-command) 1230 (python-shell-parse-command)
1231 python-shell-prompt-regexp
1232 python-shell-prompt-block-regexp
1233 python-shell-prompt-output-regexp
1235 (mapconcat #'symbol-value python-shell-setup-codes "") 1234 (mapconcat #'symbol-value python-shell-setup-codes "")
1236 (mapconcat #'indentity python-shell-process-environment "") 1235 (mapconcat #'indentity python-shell-process-environment "")
1236 (mapconcat #'indentity python-shell-extra-pythonpaths "")
1237 (mapconcat #'indentity python-shell-exec-path "")
1237 (or python-shell-virtualenv-path "") 1238 (or python-shell-virtualenv-path "")
1238 (mapconcat #'indentity python-shell-exec-path ""))))) 1239 (mapconcat #'indentity python-shell-exec-path "")))))
1239 1240
@@ -1548,8 +1549,6 @@ This function takes the list of setup code to send from the
1548 (accept-process-output process python-shell-send-setup-max-wait) 1549 (accept-process-output process python-shell-send-setup-max-wait)
1549 (dolist (code python-shell-setup-codes) 1550 (dolist (code python-shell-setup-codes)
1550 (when code 1551 (when code
1551 (when (consp code)
1552 (setq msg (cdr code)))
1553 (message (format msg code)) 1552 (message (format msg code))
1554 (python-shell-send-string-no-output 1553 (python-shell-send-string-no-output
1555 (symbol-value code) process))))) 1554 (symbol-value code) process)))))