]> code.delx.au - gnu-emacs/commitdiff
Enhancements to internal python shell naming.
authorFabián Ezequiel Gallina <fgallina@cuca>
Thu, 17 May 2012 03:03:29 +0000 (00:03 -0300)
committerFabián Ezequiel Gallina <fgallina@gnu.org>
Thu, 17 May 2012 03:03:29 +0000 (00:03 -0300)
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

index 17afb0ee309484d7eb3ed94c8fbead77a9474a46..777436cf89bbfa2164656878fee72d44f61a04c7 100644 (file)
@@ -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)))))