Commit graph

568 commits

Author SHA1 Message Date
Fabián Ezequiel Gallina
e2d8d4790f Documentation enhancements 2012-05-17 00:03:09 -03:00
Fabián Ezequiel Gallina
c0428ba0bd Better shell setup using the new python-shell-send-setup-codes function.
At the moment of shell setup, all the pending output is accepted so
the prompt is always displayed correctly.
2012-05-17 00:03:09 -03:00
Fabián Ezequiel Gallina
9f1537ef3e Added indentation support for continuation of dotted expressions
Expressions like these are now supported and indented correctly:

    Object.objects.exclude(foo=1)\
                  .filter(bar=2)\
                  .values_list('baz')

Also added a small fix to python-info-assignment-continuation-line-p
to check the match for the operator is not inside some paren.
2012-05-17 00:03:08 -03:00
Fabián Ezequiel Gallina
c43cd8b10f Enhancements to python-indent-electric-colon.
Only de-indent line if it really closes a block.
2012-05-17 00:03:08 -03:00
Fabián Ezequiel Gallina
14a7849583 New function python-info-ppss-context
Use this function for most syntax-ppss related tasks. While in some
parts code could be longer it makes everything more readable.

This is the first step for a cleaner indentation machinery.
2012-05-17 00:03:07 -03:00
Fabián Ezequiel Gallina
099bf0104e Added commentary about installing pyreadline on system that bundles Python without readline 2012-05-17 00:03:07 -03:00
Fabián Ezequiel Gallina
da3d48d7d6 Remove find-file-noselect invocation in python-shell-send-file 2012-05-17 00:03:07 -03:00
Fabián Ezequiel Gallina
2db30ac50a Use insert instead of insert-string 2012-05-17 00:03:06 -03:00
Fabián Ezequiel Gallina
62feb91565 Better non-standard shell integration support
Added python-shell-prompt-output-regexp to match the prompts
added before output in shells like iPython. With the value of
this variable the output generated for
python-shell-send-string-no-ouput is cleaned up.

Moved completion variables and bindings setup for shell to
inferior-python-mode definition.

Renamed python-shell-completion-strings-code to
python-shell-completion-string-code.

improved python-shell-completion--get-completions string
splitting.

Cleaned up some unecessary messages.

Better code sending need test for python-shell-completion-setup
python-ffap-setup and python-eldoc-setup.

Added example for iPython integration in the commentary section.
2012-05-17 00:03:06 -03:00
Fabián Ezequiel Gallina
9ce938be0b Shell integration improvements and cleanups
Removed functions python-shell-clear-latest-output and
python-shell-send-and-clear-output in favor of
python-shell-send-string-no-output.

Also python-shell-send-string now supports multiline string statements
so you won't have to worry calling python-shell-send-file again.

All this changes should make integrations with other Python shells
than standard more robust.
2012-05-17 00:03:06 -03:00
Fabián Ezequiel Gallina
73ed683681 python.el now bytecompiles without warnings 2012-05-17 00:03:05 -03:00
Fabián Ezequiel Gallina
e2803784cf Implemented Skeletons after GNU/Emacs python.el
6 basic skeletons are defined: class, def, for, if, try and while.

While these skeletons are strongly based on GNU/Emacs' current
python.el a better definition macro, a generic template for
try/except/finally/else blocks and a cool menu display is included.
2012-05-17 00:03:05 -03:00
Fabián Ezequiel Gallina
67845102b2 Explain we have python-indent-electric-colon 2012-05-17 00:03:05 -03:00
Fabián Ezequiel Gallina
cb42456fc6 Don't deactivate mark after indenting commands 2012-05-17 00:03:04 -03:00
Fabián Ezequiel Gallina
76eefb1fe5 Small fix to python-indent-electric-colon
Check current indentation is greater than the current calculated
indentation.
2012-05-17 00:03:04 -03:00
Fabián Ezequiel Gallina
ffdb56c385 Implemented python-indent-electric-colon 2012-05-17 00:03:04 -03:00
Fabián Ezequiel Gallina
17d13b8526 Fixed indentation of multi-line function call's closing parenthesis 2012-05-17 00:03:03 -03:00
Fabián Ezequiel Gallina
24b68537c3 Make inferior-python-mode-current-file be set via convert-standard-filename 2012-05-17 00:03:03 -03:00
Fabián Ezequiel Gallina
d439cda598 Enhanced python-shell-send-file function
python-shell-send-file function now can be called interactively and
will do the right thing.

Also the python code that sent the file was improved so the shell
considers the correct path when evaluating the file.

Removed the inferior-python-mode-current-temp-file variable, after
this update inferior-python-mode-current-file is enough.
2012-05-17 00:03:03 -03:00
Fabián Ezequiel Gallina
57808175eb Added commentary about auto-indentation on newlines for python-mode.el users 2012-05-17 00:03:02 -03:00
Fabián Ezequiel Gallina
d818ffa870 Use convert-standard-filename to fix temp files path 2012-05-17 00:03:02 -03:00
Fabián Ezequiel Gallina
d8e594dba8 Fixed highlighting for dictionary assignments 2012-05-17 00:03:02 -03:00
Fabián Ezequiel Gallina
6eb68dc25b Fixed pdb-track on Windows
make-temp-file is returning the temp file path with the wrong type of
slashes.
2012-05-17 00:03:01 -03:00
Fabián Ezequiel Gallina
534e24385b Fixed incorrect syntax highlighting for variable assignations 2012-05-17 00:03:01 -03:00
Fabián Ezequiel Gallina
14d9f80c0d Fixed indentation guess logic to never accept 0 as a possible value 2012-05-17 00:03:01 -03:00
Fabián Ezequiel Gallina
78334b439d Implemented python-eldoc-at-point (python-describe-symbol replacement) 2012-05-17 00:03:00 -03:00
Fabián Ezequiel Gallina
8b3e0e76ee Implemented python-check 2012-05-17 00:03:00 -03:00
Fabián Ezequiel Gallina
2947016aa7 Small changes to ffap support 2012-05-17 00:03:00 -03:00
Fabián Ezequiel Gallina
046428d328 Added ffap support 2012-05-17 00:02:59 -03:00
Fabián Ezequiel Gallina
1066882c6d Simplified python-eldoc-function using python-shell-send-and-clear-output 2012-05-17 00:02:59 -03:00
Fabián Ezequiel Gallina
138df81369 Implemeneted python-shell-clear-latest-output and python-shell-send-and-clear-output
Also Simplified python-shell-completion--get-completions using
python-shell-send-and-clear-output
2012-05-17 00:02:59 -03:00
Fabián Ezequiel Gallina
9e6629387d Eldoc integration is now compatible with python 3 2012-05-17 00:02:58 -03:00
Fabián Ezequiel Gallina
ed0eb59464 Make shell use completion-at-point for autocompletion. 2012-05-17 00:02:58 -03:00
Fabián Ezequiel Gallina
fc87f759ed Fixed called-interactively-p invocation. 2012-05-17 00:02:57 -03:00
Fabián Ezequiel Gallina
db1497be14 Cleaned up TODO 2012-05-17 00:02:57 -03:00
Fabián Ezequiel Gallina
075a0f6194 Enhanced shell and code autocompletion.
python-shell-completion-complete-at-point and
python-completion-complete-at-point now share common code.

Also lots of fixes related to the cleanup of shell output has been
made so completion code is really robust now.
2012-05-17 00:02:57 -03:00
Fabián Ezequiel Gallina
3d6913c7d1 Fixes to shell completion at point 2012-05-17 00:02:57 -03:00
Fabián Ezequiel Gallina
13d914ed50 Fixed shell region sending 2012-05-17 00:02:56 -03:00
Fabián Ezequiel Gallina
4e531f7a7e Documentation fixes 2012-05-17 00:02:56 -03:00
Fabián Ezequiel Gallina
19b122e44e Do not indent at the beginning of buffer fix 2012-05-17 00:02:56 -03:00
Fabián Ezequiel Gallina
69bab1deb3 Do not indent at the beginning of buffer 2012-05-17 00:02:55 -03:00
Fabián Ezequiel Gallina
df700cc99e Fixed infinite while loop in python-info-current-defun
Was caused when a beginning of defun was in the beginning of buffer
because python-beginning-of-innermost-defun never reached the real
start when (bobp)
2012-05-17 00:02:55 -03:00
Fabián Ezequiel Gallina
b962ebad98 Modified autocompletion code setup
Now it is compatible with python 2.x and python 3.x
2012-05-17 00:02:54 -03:00
Fabián Ezequiel Gallina
13d1a42edb Fixed indentation inside parens when comments are around 2012-05-17 00:02:54 -03:00
Fabián Ezequiel Gallina
bbac1eb8ab python-indent-guess-indent-offset improvements 2012-05-17 00:02:54 -03:00
Fabián Ezequiel Gallina
183f9296f1 Fixed backspace behavior for delete-selection-mode. 2012-05-17 00:02:53 -03:00
Fabián Ezequiel Gallina
954aa7bdb8 Enhanced python-indent-guess-indent-offset logic. 2012-05-17 00:02:53 -03:00
Fabián Ezequiel Gallina
79dafa51ba python-shell-get-or-create-process preserves current buffer. 2012-05-17 00:02:53 -03:00
Fabián Ezequiel Gallina
66b0b492bc Generalized use of python-shell-send-file with cleanup of prompts. 2012-05-17 00:02:52 -03:00
Fabián Ezequiel Gallina
6ac2041b86 Cleanup prompts when sending region to shell. 2012-05-17 00:02:52 -03:00