]> git.eshelyaron.com Git - emacs.git/commit
Autodetect Python shell prompts.
authorFabián Ezequiel Gallina <fgallina@gnu.org>
Sat, 19 Jul 2014 13:13:07 +0000 (10:13 -0300)
committerFabián Ezequiel Gallina <fgallina@gnu.org>
Sat, 19 Jul 2014 13:13:07 +0000 (10:13 -0300)
commitd949ade3c101981d015b3d78d061bdff584df13a
treed5e486ede2477b8f139720eabda8f6965086daef
parent64384ca4ded41824f30a0a2470a65160dd486207
Autodetect Python shell prompts.

* lisp/progmodes/python.el:
(python-shell-interpreter-interactive-arg)
(python-shell-prompt-detect-enabled)
(python-shell-prompt-detect-failure-warning)
(python-shell-prompt-input-regexps)
(python-shell-prompt-output-regexps): New vars.
(python-shell-prompt-calculated-input-regexp)
(python-shell-prompt-calculated-output-regexp): New vars.
(python-shell-get-process-name)
(python-shell-internal-get-process-name)
(python-shell-output-filter)
(python-shell-completion-get-completions): Use them.
(python-shell-prompt-detect)
(python-shell-prompt-validate-regexps): New functions.
(python-shell-prompt-set-calculated-regexps): New function.
(inferior-python-mode): Use it.  Also honor overriden
python-shell-interpreter and python-shell-interpreter-args.
(python-shell-make-comint): Honor overriden
python-shell-interpreter and python-shell-interpreter-args.
(python-shell-get-or-create-process): Make it testable by allowing
to call run-python non-interactively.
(python-util-valid-regexp-p): New function.
(python-shell-prompt-regexp, python-shell-prompt-block-regexp)
(python-shell-prompt-output-regexp)
(python-shell-prompt-pdb-regexp): Use it as defcustom :safe.

* test/automated/python-tests.el (python-shell-make-comint-1):
(python-shell-make-comint-2): Fix indentation.
(python-shell-make-comint-3)
(python-shell-make-comint-4): New tests.
(python-shell-get-or-create-process-1): Fix test.
(python-shell-get-or-create-process-2)
(python-shell-get-or-create-process-3): New tests.
(python-shell-internal-get-or-create-process-1): Fix test.
(python-shell-prompt-detect-1): New test.
(python-shell-prompt-detect-2): New test.  (Bug#17370)
(python-shell-prompt-detect-3)
(python-shell-prompt-detect-4)
(python-shell-prompt-detect-5)
(python-shell-prompt-detect-6)
(python-shell-prompt-validate-regexps-1)
(python-shell-prompt-validate-regexps-2)
(python-shell-prompt-validate-regexps-3)
(python-shell-prompt-validate-regexps-4)
(python-shell-prompt-validate-regexps-5)
(python-shell-prompt-validate-regexps-6)
(python-shell-prompt-validate-regexps-7)
(python-shell-prompt-set-calculated-regexps-1)
(python-shell-prompt-set-calculated-regexps-2)
(python-shell-prompt-set-calculated-regexps-3)
(python-shell-prompt-set-calculated-regexps-4)
(python-shell-prompt-set-calculated-regexps-5)
(python-shell-prompt-set-calculated-regexps-6)
(python-util-valid-regexp-p-1): New tests.
lisp/ChangeLog
lisp/progmodes/python.el
test/ChangeLog
test/automated/python-tests.el