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.
python-shell-make-comint now passes all parent buffer variables to the
comint buffer created ensuring local variables work as intended. Also,
this function now receives a third optional argument called POP that
establishes if the created comint buffer should be displayed or not
after its creation.
when set to a string, makes the values stored in
`python-shell-process-environment' and `python-shell-exec-path' to be
modified properly so shells are started with the specified virtualenv.
New Variables:
* python-shell-virtualenv-path
New functions:
* python-shell-calculate-process-environment
* python-shell-calculate-exec-path
This new kind of shell is intended to be used for generic
communication related to defined configurations. The main difference
with global or dedicated shells is that these ones are attached to a
configuration, not a buffer. This means that can be used for example
to retrieve the sys.path and other stuff, without messing with user
shells.
New Variables:
* python-shell-internal-buffer-name,
New functions:
* python-shell-internal-get-process-name
* run-python-internal
* python-shell-internal-get-or-create-process
* python-shell-internal-send-string (makes python-send-receive obsolete)
* python-eldoc-setup-code: The code to get help now uses the
inspect element. When an object doesn't have documentation and
if it is callable it returns the signature for it. Also when
an object does contain documentation it only returns the first
line.
* python-eldoc-at-point: has been simplified to just message the
doc header of objects.
* python-info-current-defun: was not taking into account the
current indentation so point was always inside a defun, even
if the indentation was less or equal than the defun above.
Doing (setq python-indent-levels '(0)) was causing the value of
python-indent-levels to not be initialized correctly on next calls to
python-indent-calculate-indentation. Using (setq python-indent-levels
(list 0)) instead does the trick but I'm not sure why.
For this, four new variables which contain the symbol name of the
function that specifies the behavior of fill-paragraph on certain
conditions were added:
* python-fill-comment-function: For comments
* python-fill-string-function: For strings
* python-fill-decorator-function: For decorators
* python-fill-paren-function: For parens
All of these variables are safe local variables in the case the value
provided is a symbol. Out of the box, they default to these four new
functions respectively:
* python-fill-comment
* python-fill-string
* python-fill-decorator
* python-fill-paren
When point is at beginning-of-defun, end-of-defun moves to the end of
the defun, even if it contains nested defuns. When point is at any
inner defun end-of-defun moves to the end of it, if another inner
defun exists at the same level point is moved to it.
For beginning-of-defun things are funkier, it would move backwards
following nested defuns in order. This will be fixed soon.
Note: Decorators are considered part of defuns.
Removed:
* python-use-beginning-of-innermost-defun
* python-beginning-of-innermost-defun-regexp
Renamed:
* python-beginning-of-defun => python-nav-beginning-of-defun
* python-beginning-of-defun-regexp => python-nav-beginning-of-defun-regexp