aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Readjust indentation automatically on lines with closing parens.Fabián Ezequiel Gallina2012-05-171-0/+24
| | | | | | | | For this to work `python-indent-post-self-insert-function' is added to the `post-self-insert-hook.' when python-mode is initialized. New functions: + `python-indent-post-self-insert-function'
* Removed tabs and fixed indentation in several parts.Fabián Ezequiel Gallina2012-05-171-18/+18
|
* Do not call `switch-to-buffer' in `python-shell-get-or-create-process'Fabián Ezequiel Gallina2012-05-171-4/+2
| | | | | For this to work properly `run-python' now calls `python-shell-make-comint' with the POP argument set to nil.
* Treat empty triple quoteTakafumi Arakaki2012-05-171-0/+1
| | | | Fix #70
* Small fix in `python-shell-send-defun' (#69 thanks mafm-git!)Fabián Ezequiel Gallina2012-05-171-2/+4
|
* Customizable variable to control syntax highlighting in shell.Dan Davison2012-05-171-0/+14
| | | | Default is on.
* Don't send "if __name__ == '__main__':" to interpreterDan Davison2012-05-171-4/+17
|
* Disregard leading whitespace when forming module completionsDan Davison2012-05-171-2/+4
| | | | | This allows an indented import line (e.g. in a function or method body) to be completed.
* Deactivate mark on python-shell-send-regionDan Davison2012-05-171-2/+1
|
* Use `completion-at-point` instead of `comint-dynamic-complete` in shell ↵Dan Davison2012-05-171-1/+1
| | | | completion
* Pass entire line of input to module completerDan Davison2012-05-171-4/+12
| | | | | | | The module completer wants e.g. 'from xxx' as input, not just 'xxx'. This change also causes all modules to be offered as completions to 'from ', whereas previously this was regarded as empty input.
* Enhancements on ipython 0.10 setup documentation (thanks to @tkf for the hint)Fabián Ezequiel Gallina2012-05-171-2/+4
|
* Added missing dot in `python-completion-complete-at-point' errorFabián Ezequiel Gallina2012-05-171-1/+1
|
* Enhanced completion subject finding logic for ↵Fabián Ezequiel Gallina2012-05-171-2/+19
| | | | `python-shell-completion--do-completion-at-point'
* Make `python-shell-completion--do-completion-at-point' to return a list for ↵Fabián Ezequiel Gallina2012-05-171-32/+11
| | | | | | | `completion-at-point' do it's job instead of replicating completion logic. Removed vars: + python-shell-completion-original-window-configuration
* Make `python-shell-completion--do-completion-at-point' work for calls done ↵Fabián Ezequiel Gallina2012-05-171-3/+5
| | | | | | | | via `python-completion-complete-at-point'. The comint prompt retrieval logic was failing on `python-shell-completion--do-completion-at-point' when calls to it happened from outside the process buffer.
* python-end-of-defun-function now works correctly when comments are not ↵Fabián Ezequiel Gallina2012-05-171-1/+6
| | | | | | | | | | | | | | indented properly. Calling `end-of-defun' on a python file will now do the correct thing, even for cases like this: def fib(n): if n < 2: # base cases return n else: return fib(n - 2) + fib(n - 1)
* Enhancements on indentation for lines after a backslash continuation.Fabián Ezequiel Gallina2012-05-171-4/+31
| | | | | | | | | | | | | | | | | | | | | Backslashed continuations with parens in the middle are now handled correctly. Things like this are now indented properly: objects = Thing.objects.all() \ .filter( type="toy", status="bought" subtype="car" ) \ .aggregate( Sum('amount') ) \ .values_list() New Functions: * `python-info-beginning-of-backlash' returns the point where a backslashed line start.
* Added self to the list of font-lock-keywordsFabián Ezequiel Gallina2012-05-171-1/+3
|
* Updated `python-font-lock-keywords' to match latest Python 2.7 and 3.2 ↵Fabián Ezequiel Gallina2012-05-171-34/+54
| | | | documentation.
* Beautified codeFabián Ezequiel Gallina2012-05-171-162/+177
| | | | | | * All columns are now less that 79 chars. * Removed tabs that were beign used to indent code. * Reindented the whole file.
* Enhancements on indentation code and related functions.Fabián Ezequiel Gallina2012-05-171-180/+238
| | | | | | | | | | | | | | | | | | | | | | | This commit includes: * A more robust implementation of `python-indent-calculate-indentation'. * enhancements on `python-indent-context' when dealing with backslashes and blocks. * Many changes, comments and enhancements to `python-indent-calculate-indentation'. Many of them especially focused to match pep8 guidelines, being this one the most important new one: http://mail.python.org/pipermail/python-dev/2011-June/111760.html * Better `python-info-line-ends-backslash-p' that would work as intended on narrowed buffers. * `python-info-continuation-line-p' now does what's supposed to do. * Enhanced implementation of `python-info-continuation-line-p', `python-info-block-continuation-line-p' and `python-info-assignment-continuation-line-p' New Functions: * `python-util-forward-comment' a simple replacement `forward-comment' with some necessary enhancements.
* `python-check' now can have named buffers on its own depending the command ↵Fabián Ezequiel Gallina2012-05-171-1/+9
| | | | | | | launched. New vars: + python-check-buffer-name
* Enhancements on python-check command.Fabián Ezequiel Gallina2012-05-171-2/+4
| | | | | Use pyflakes (PyChecker is dead) and run the process respecting virtualenv rules.
* Removed :safe attribute for dangerous variablesFabián Ezequiel Gallina2012-05-171-22/+11
| | | | | | | | | | | | | | | Changed vars: + python-shell-interpreter + python-shell-interpreter-args + python-shell-completion-setup-code + python-shell-completion-string-code + python-shell-completion-module-string-code + python-shell-completion-pdb-string-code + python-ffap-setup-code + python-ffap-string-code + python-check-command + python-eldoc-setup-code + python-eldoc-string-code
* Fixed docstring typosFabián Ezequiel Gallina2012-05-171-2/+2
|
* Enhanced shell setup for Windows.Fabián Ezequiel Gallina2012-05-171-1/+13
| | | | | Also added documentation explaining how to spawn the iPython process on Windows.
* Added compatibility with lastest CEDET.Fabián Ezequiel Gallina2012-05-171-4/+17
| | | | | | | | | Obsolete variables definitions: + python-buffer => python-shell-internal-buffer Obsolete functions definitions: + python-proc => python-shell-internal-get-or-create-process + python-send-string => python-shell-internal-send-string
* Improvements on completion code.Fabián Ezequiel Gallina2012-05-171-21/+28
| | | | | Do no complete when defining a code block (we can't do this until finding some way of getting raw tabs to the interpreter correctly)
* Improved completion support when in [i]pdbFabián Ezequiel Gallina2012-05-171-7/+20
| | | | | | | | `python-shell-completion--do-completion-at-point' has been modified in order to support different completion contexts easily. New vars: + python-shell-completion-pdb-string-code
* Added `python-pdbtrack-activate' variable to allow users to ↵Fabián Ezequiel Gallina2012-05-171-1/+7
| | | | | | activate/deactivate pdbtrack. To keep in sync with the old behavior its default value is t.
* Renamed stuff to keep "namespace" clean.Fabián Ezequiel Gallina2012-05-171-11/+11
| | | | | | Renamed vars: + python-shell-module-completion-string-code => python-shell-completion-module-string-code + python-completion-original-window-configuration => python-shell-completion-original-window-configuration
* Don't request completions for zero-length inputDan Davison2012-05-171-2/+3
| | | | | Fixes a bug in which incorrect completion output was displayed, for example when point was after a closing paren.
* Make `python-shell-send-string-no-output' delete trailing newlines from output.Fabián Ezequiel Gallina2012-05-171-10/+8
|
* Dismiss completions buffer when unique completion has been madeDan Davison2012-05-171-1/+11
|
* Documentation enhancementsFabián Ezequiel Gallina2012-05-171-6/+10
|
* Renamed indentity occurrences to identity in previous commmitFabián Ezequiel Gallina2012-05-171-4/+4
|
* Enhancements to internal python shell naming.Fabián Ezequiel Gallina2012-05-171-7/+6
| | | | | | | | 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.
* Enhancements to pdbtrack.Fabián Ezequiel Gallina2012-05-171-40/+42
| | | | | | | | | | | | | | | | | | | | | | | pdbtrack now handles correctly the case where the stacktrace information is on the second line. All python buffers not opened by the user and used for tracking are closed automatically when tracking process finishes. Simplified code for keeping the tracked buffer. Removed vars: + python-pdbtrack-tracking-buffers Removed functions: + python-pdbtrack-get-or-add-tracking-buffers New vars: + python-pdbtrack-tracked-buffer + python-pdbtrack-buffers-to-kill New functions: + python-pdbtrack-set-tracked-buffer
* Enhancements to pdbtrackFabián Ezequiel Gallina2012-05-171-59/+48
| | | | | | | | pdbtracking now autodetects the filename being tracked from the prompt and not from the `inferior-python-mode-current-file' variable. Removed vars: + `inferior-python-mode-current-file'
* Documentation enhancements and other small fixes.Fabián Ezequiel Gallina2012-05-171-7/+6
| | | | | Removed vars: + python-shell-import-line-regexp
* Complete module import lines in addition to variable namesDan Davison2012-05-171-9/+33
| | | | | | | | | | | | | | | | Available when using ipython v0.11. Completions on lines starting with "from " or "import " are supplied by IPython.core.completerlib.module_completion ipython v0.11 configuration: (setq python-shell-interpreter "ipython" python-shell-completion-setup-code "from IPython.core.completerlib import module_completion\n" python-shell-module-completion-string-code "';'.join(module_completion('''%s'''))\n" python-shell-completion-string-code "';'.join(get_ipython().Completer.all_completions('''%s'''))\n")
* Return appropriate value to comint-dynamic-completeDan Davison2012-05-171-31/+23
| | | | | | This avoids a "No completions for ..." message being issued when a completion has been made. Also, reduces redundancy between the inferior-python-mode and python-mode completion code.
* Enhancements to `python-shell-calculate-process-environment'Fabián Ezequiel Gallina2012-05-171-1/+22
| | | | | | The `python-shell-extra-pythonpaths' variable have been introduced as simple way of adding paths to the PYTHONPATH without affecting existing values.
* Enhancements on `python-shell-calculate-process-environment' and ↵Fabián Ezequiel Gallina2012-05-171-27/+11
| | | | | | | `python-shell-calculate-exec-path' Removed functions: + python-util-merge
* Added simple way of jumping to current buffer's class/function definitionsFabián Ezequiel Gallina2012-05-171-22/+67
| | | | | | | | | | | | | | | | The new `python-nav-jump-to-defun' function allows a user to jump fast and easy to a function or class definition in the current buffer. For this a entry in the menu and the C-c C-j keybinding have been introduced. New functions: + `python-nav-list-defun-positions' + `python-nav-read-defun' + `python-nav-jump-to-defun' The new function `python-nav-list-defun-positions' does the same as a relevant part of the `python-imenu-create-index' so the latter has been refactored to use it.
* Enhancements to python-shell-send-string-no-output to work OK with iPython 0.11Fabián Ezequiel Gallina2012-05-171-18/+16
| | | | | Also the documentation has been updated with info to make iPython 0.11 and 0.10 work with python.el's shell integration.
* Make run-python-internal to set process-query-on-exit-flag to nilFabián Ezequiel Gallina2012-05-171-4/+7
| | | | Also python-shell-make-comint now returns the process buffer name.
* Fixed indentation case for after beginning of blockFabián Ezequiel Gallina2012-05-171-1/+4
|
* Renamed python-clone-local-variables to python-util-clone-local-variablesFabián Ezequiel Gallina2012-05-171-2/+2
|