summaryrefslogtreecommitdiff
path: root/lisp/progmodes/python.el
AgeCommit message (Collapse)Author
2014-11-22Set PYTHONUNBUFFERED on shell startup.Fabián Ezequiel Gallina
Fixes: debbugs:18595 * lisp/progmodes/python.el (python-shell-unbuffered): New var. (python-shell-calculate-process-environment): Use it. * test/automated/python-tests.el (python-shell-calculate-process-environment-4) (python-shell-calculate-process-environment-5): New tests. (python-shell-make-comint-3): Use file-equal-p. (python-shell-get-or-create-process-1) (python-shell-get-or-create-process-2) (python-shell-get-or-create-process-3): Fix interpreter for Windows.
2014-11-16* lisp/progmodes/python.el (python-mode): Avoid use of set-local toFabián Ezequiel Gallina
keep Emacs 24.x compatibility.
2014-11-16Fixes: debbugs:18596Fabián Ezequiel Gallina
* lisp/progmodes/python.el (run-python): Allow CMD to be optional and default it to a safe command, even for Windows. (bug#18596)
2014-11-16Prevent resizing the echo area when iPython is enabledFabián Ezequiel Gallina
Fixes: debbugs:18794 * lisp/progmodes/python.el (python-eldoc--get-doc-at-point): Strip shell output before returning.
2014-11-16* lisp/progmodes/python.el (python-shell-calculate-command): RenameFabián Ezequiel Gallina
from python-shell-parse-command. Cleanup. (run-python, run-python-internal): Use it. (python-shell-calculate-pythonpath): Rename from python-new-pythonpath. (python-shell-calculate-process-environment): Use it. (python-shell-calculate-exec-path): Add comment. * test/automated/python-tests.el (python-shell-calculate-process-environment-2): Fix test. (python-shell-calculate-process-environment-1) (python-shell-calculate-process-environment-3): Cleanup.
2014-11-16Merge from emacs-24Stefan Monnier
2014-11-15Fixes: debbugs:18432Fabián Ezequiel Gallina
* lisp/progmodes/python.el (python-indent-calculate-levels): Fix indentation behavior multiline dedenter statement. * test/automated/python-tests.el (python-indent-dedenters-8): New test for Bug#18432.
2014-11-15Fix region indentationFabián Ezequiel Gallina
Fixes: debbugs:18843 * lisp/progmodes/python.el (python-indent-region): Use python-indent-line and skip special cases. * test/automated/python-tests.el (python-indent-region-1) (python-indent-region-2, python-indent-region-3) (python-indent-region-4, python-indent-region-5): New tests.
2014-11-15Eldoc setup code enhancementsFabián Ezequiel Gallina
Fixes: debbugs:18962 * lisp/progmodes/python.el (python-eldoc-setup-code): Enhance string type checks, simplify printing.
2014-11-14Backport Use derived-mode-p in python.el instead of equality test with ↵Ivan Andrus
major-mode Fixes: debbugs:18854 * progmodes/python.el (python-ffap-module-path): Use `derived-mode-p' instead of equality test on `major-mode'.
2014-11-14Use derived-mode-p in python.el instead of equality test on major-modeIvan Andrus
* progmodes/python.el (python-shell-font-lock-kill-buffer): (python-shell-font-lock-with-font-lock-buffer) (python-shell-get-buffer, python-ffap-module-path): Use `derived-mode-p' instead of equality test on `major-mode'.
2014-11-14Rename python-shell-virtualenv-path to fit GNU conventionsFabián Ezequiel Gallina
* lisp/progmodes/python.el (python-shell-virtualenv-root): Rename from python-shell-virtualenv-path. (python-shell-internal-get-process-name) (python-shell-calculate-process-environment) (python-shell-calculate-exec-path): Use it.
2014-11-14* lisp/progmodes/python.el (python-shell-completion-get-completions):Fabián Ezequiel Gallina
Fix previous merge.
2014-10-20* lisp/progmodes/python.el (inferior-python-mode): Use add-hook.Stefan Monnier
2014-10-12Merge from emacs-24; up to 2014-07-26T11:58:24Z!schwab@linux-m68k.orgGlenn Morris
2014-10-12Fix import completion. Fabián Ezequiel Gallina
* lisp/progmodes/python.el (python-shell-completion-get-completions): Fix import case regexp. Fixes: debbugs:18582
2014-10-03* lisp/progmodes/python.el: Avoid building unneeded markers.Stefan Monnier
(python-font-lock-keywords, python-indent-dedent-line) (python-fill-paren, python-shell-completion-complete-or-indent): Prefer point over point-marker. (inferior-python-mode): Remove redundant completion settings.
2014-10-02Merge from emacs-24Stefan Monnier
2014-09-30* lisp/progmodes/python.el (python-shell-completion-get-completions):Stefan Monnier
Use python-shell--prompt-calculated-input-regexp from the process buffer. Don't assume that `line' comes from the process buffer. Fixes: debbugs:18582
2014-09-30Merge from emacs-24Stefan Monnier
2014-09-30* lisp/progmodes/python.el (python-fill-paren): Don't inf-loop at EOB.Leonardo Nobrega
Fixes: debbugs:18462
2014-09-29Rename 24.5 to 25.1Stefan Monnier
Except where we expect to backport the corresponding change.
2014-09-11Spelling fixes.Paul Eggert
* lisp/ses.el (ses-file-format-extend-parameter-list): Rename from ses-file-format-extend-paramter-list. All uses changed. * lisp/gnus-cloud.el (gnus-cloud-parse-version-1): Fix misspelling of ":delete".
2014-09-02Merge from emacs-24; up to 2014-07-04T02:28:54Z!dmantipov@yandex.ruGlenn Morris
2014-09-01* lisp/progmodes/python.el (python-indent-post-self-insert-function):Fabián Ezequiel Gallina
Avoid electric colon at beginning-of-defun. * test/automated/python-tests.el: (python-indent-electric-colon-1): New test. (Bug#18228)
2014-08-27Merge from emacs-24; up to 2014-07-02T00:57:53Z!juri@jurta.orgGlenn Morris
2014-08-20Extract python-new-pythonpath to handle PYTHONPATH in user codeSam Steingold
* lisp/progmodes/python.el (python-new-pythonpath): Extract from `python-shell-calculate-process-environment'.
2014-08-18* lisp/progmodes/python.el (python-shell-prompt-detect): Remove redundantStefan Monnier
executable-find. Fixes: debbugs:18244
2014-08-04* lisp/progmodes/python.el: Fix completions inside (i)pdb.Fabián Ezequiel Gallina
(python-shell-completion-pdb-string-code): Make obsolete. (python-shell-completion-get-completions): Use python-shell-completion-string-code resending setup code continuously for (i)pdb.
2014-08-02* progmodes/python.el: Completion code cleanups.Fabián Ezequiel Gallina
(python-shell-completion-get-completions): Detect and send import statements directly to completion function. (python-shell-completion-at-point): Simplify prompt calculation and import vs input completion logic.
2014-07-31* lisp/progmodes/python.el: Shell output capture enhancements.Fabián Ezequiel Gallina
(python-shell-accept-process-output): New function. (inferior-python-mode) (python-shell-send-setup-code): Use it.
2014-07-28* lisp/progmodes/python.el (inferior-python-mode): Make input promptsFabián Ezequiel Gallina
read-only.
2014-07-28Merge from emacs-24; up to 2014-06-26T06:55:15Z!rgm@gnu.orgGlenn Morris
2014-07-28Parse completion input in a iPython friendly way.Fabián Ezequiel Gallina
* lisp/progmodes/python.el (python-shell-completion-at-point): Rename from python-shell-completion-complete-at-point. (inferior-python-mode): Use it. (python-completion-at-point): Rename from python-completion-complete-at-point. Parse input up to first backward occurrence of whitespace, open-paren, close-paren or string delimiter. (python-mode): Use it. Fixes: debbugs:18084
2014-07-28Prevent Python process shell buffer to pop twice.Fabián Ezequiel Gallina
* lisp/progmodes/python.el (python-shell-switch-to-shell): Do not call pop-to-buffer.
2014-07-28* lisp/progmodes/python.elFabián Ezequiel Gallina
(python-shell-with-shell-buffer): New macro. (python-shell-font-lock-get-or-create-buffer) (python-shell-font-lock-kill-buffer) (python-shell-font-lock-with-font-lock-buffer) (python-shell-font-lock-cleanup-buffer) (python-shell-font-lock-toggle): Use it. (python-shell-font-lock-turn-on) (python-shell-font-lock-turn-off): Use it. Make command.
2014-07-27Grab all Python process output before inferior-python-mode hooks.Fabián Ezequiel Gallina
* lisp/progmodes/python.el (inferior-python-mode): Call accept-process-output and sit-for to ensure all output for process has been received before running hooks. (python-shell-internal-get-or-create-process): Cleanup accept-process-output and sit-for calls.
2014-07-27More robust shell startup and code setup.Fabián Ezequiel Gallina
* lisp/progmodes/python.el (python-shell-make-comint): Remove accept-process-output call. (python-shell-get-buffer): Return current buffer if major-mode is inferior-python-mode. (python-shell-get-or-create-process): Use it. (python-shell-send-setup-code): Send all setup code in one string, output success message and accept-process-output.
2014-07-27Cleanup error signals. Fabián Ezequiel Gallina
* lisp/progmodes/python.el (python-indent-shift-left): Use user-error instead. (python-shell-prompt-detect): Use lwarn with python group. (python-completion-complete-at-point) (python-eldoc--get-doc-at-point): Don't signal error. Fixes: debbugs:18067
2014-07-27Support for packages in Python shell. Fabián Ezequiel Gallina
* lisp/progmodes/python.el (python-shell--package-depth): New var. (python-shell-package-enable): New command. (python-util-list-directories, python-util-list-files) (python-util-list-packages): New functions. Fixes: debbugs:13570
2014-07-26* python.el (python-shell-enable-font-lock): Fix typo in earlier change.Glenn Morris
2014-07-26Faster comint output.Fabián Ezequiel Gallina
* lisp/progmodes/python.el: (python-comint-output-filter-function): Make obsolete. (python-comint-postoutput-scroll-to-bottom): New function. (inferior-python-mode): Set comint-output-filter-functions to a minimum. Fixes: debbugs:16875
2014-07-26* lisp/progmodes/python.el (inferior-python-mode): Doc fix.Fabián Ezequiel Gallina
2014-07-26* lisp/progmodes/python.el (python-shell-font-lock-post-command-hook):Fabián Ezequiel Gallina
Safeguard current point and undo history.
2014-07-26Robust shell syntax highlighting. (Bug#18084, Bug#16875)Fabián Ezequiel Gallina
* lisp/progmodes/python.el: (python-shell-prompt-input-regexps): Add iPython block prompt. (python-shell-output-syntax-table): Delete var. (python-shell-font-lock-with-font-lock-buffer): New macro. (python-shell-font-lock-get-or-create-buffer) (python-shell-font-lock-kill-buffer) (python-shell-font-lock-cleanup-buffer) (python-shell-font-lock-post-command-hook) (python-shell-font-lock-turn-off): New functions. (python-shell-font-lock-turn-on): New function. (inferior-python-mode): Use it. (python-shell-font-lock-toggle): New command. (python-shell-font-lock-enable): Rename from python-shell-enable-font-lock. (run-python-internal): Use it. (python-shell-font-lock-comint-output-filter-function): New function. (python-shell-comint-end-of-output-p): New function. (python-shell-output-filter): Use it. (python-util-comint-last-prompt): New function. (python-util-text-properties-replace-name): New function.
2014-07-21Spelling fixes.Paul Eggert
2014-07-21Merge from emacs-24; up to 2014-06-25T10:17:41Z!rgm@gnu.orgGlenn Morris
2014-07-20* lisp/progmodes/python.el: Add comment about pipe buffering andFabián Ezequiel Gallina
solutions for missing/delayed output in inferior Python shells. Fixes: debbugs:17304
2014-07-20* lisp/progmodes/python.el (python-mode): Don't setFabián Ezequiel Gallina
mode-require-final-newline. Fixes: debbugs:17990
2014-07-20Make python.el work with IPython automatically. Fabián Ezequiel Gallina
* lisp/progmodes/python.el: (python-shell-completion-setup-code): New value supporting iPython. (python-shell-completion-string-code): New value supporting iPython. (python-shell-completion-get-completions): Use them. (python-shell-completion-module-string-code): Make obsolete. (python-shell-prompt-input-regexps) (python-shell-prompt-output-regexps): Add safeguard for ipdb. (python-shell-output-filter): Fix comment typo. * test/automated/python-tests.el: (python-util-clone-local-variables-1): Fix test. Fixes: debbugs:15510