default-directory is remote, create temp file on remote
filesystem.
(python-shell-send-file): When file is remote, pass local view of
file paths to remote Python interpreter. (Bug#12340)
* progmodes/python.el
(python-shell-completion--do-completion-at-point)
(python-shell-completion--get-completions): Remove
functions.
(python-shell-completion-complete-at-point): New function.
(python-completion-complete-at-point): Use it.
* lisp/progmodes/python.el (python-shell-get-process-name): Don't mess
with same-window-buffer-names.
* lisp/eshell/eshell.el (eshell-add-to-window-buffer-names)
(eshell-remove-from-window-buffer-names): Make obsolete.
(eshell-buffer-name, eshell-unload-hook): Don't use them.
(eshell): Just use pop-to-buffer-same-window instead.
(python-pdbtrack-buffers-to-kill, python-shell-internal-buffer)
(python-shell-internal-last-output): Use make-local-variable
instead of make-variable-buffer-local.
(python-syntax-context) Rename from python-info-ppss-context.
(python-syntax-context-type): Rename from
python-info-ppss-context-type.
(python-syntax-comment-or-string-p): Rename from
python-info-ppss-comment-or-string-p.
* progmodes/python.el (python-shell-make-comint): Add optional
argument INTERNAL.
(run-python-internal): Use it.
(python-shell-internal-get-or-create-process): Check for new
internal buffer names.
* progmodes/python.el (python-shell-send-setup-max-wait): Delete var.
(python-shell-make-comint): accept-process-output at startup.
(run-python-internal): Set inferior-python-mode-hook to nil.
(python-shell-internal-get-or-create-process): call sit-for.
(python-preoutput-result): Add obsolete alias.
(python-shell-internal-send-string): Use it.
(python-shell-send-setup-code): Remove call to
accept-process-output.
run-python.
(python-shell-make-comint): Fix pop-to-buffer call.
(run-python): Autoload. New arg SHOW.
(python-shell-get-or-create-process): Do not pop python process
buffer.
(python-info-current-symbol): New function.
(python-eldoc-at-point): Use python-info-current-symbol.
(python-info-current-defun): Fix cornercase on first defun scan.
(python-eldoc--get-doc-at-point): Use python-info-current-symbol
and signal error when no inferior python process is available.
* progmodes/python.el (python-info-beginning-of-block-statement-p)
(python-info-ppss-comment-or-string-p): New functions.
(python-info-ppss-context): Small fix for string check.
Fixes: debbugs:11910
* progmodes/python.el (python-nav-beginning-of-statement): Rename
from python-nav-statement-start.
(python-nav-end-of-statement): Rename from
python-nav-statement-end.
(python-nav-beginning-of-block): Rename from
python-nav-block-start.
(python-nav-end-of-block): Rename from python-nav-block-end.
Fixes: debbugs:11899
This is a backport of Stefan Monnier's migration to the new font-lock
machinery (introduced in 2010-09-10T23:13:42Z!monnier@iro.umontreal.ca).
New Vars:
+ python-syntax-propertize-function
Deleted Vars:
+ python-font-lock-syntactic-keywords
This reverts commit f4d086427343eb0b8bc91355388d2437c568b1f6, reversing
changes made to 8f697fd2ef23a9e1d9a06ac8ca419d76ccedb27d.
While the fix worked with empty triple quoted strings it broke simpler cases
like these:
"""
def someting(a, b, c):
"
"""
or
'''
def someting(a, b, c):
'
'''
Another approach is needed for giving triple quoted string the correct syntax.
`python-nav-beginning-of-defun' and
`python-beginning-of-defun-function' have changed and now they don't
handle decorators anymore.
`python-end-of-defun-function' is now smart enough to detect the real
ending of the current defun.
`python-shell-send-defun' always sends the outermost defun and
includes decorators. When called with prefix argument the decorators
are skipped.
`python-info-current-defun' has been modified to use the new defun
movement API.
New Functions:
+ python-info-looking-at-beginning-of-defun
This is a simplified version of @dandavison pull request (thanks dan!)
`python-nav-list-defun-positions' now uses
`python-nav-list-defun-positions-cache' buffer local variable to store
cached values of defun positions.
`python-nav-jump-to-defun' now benefits from this new cache and if
called with prefix argument it will invalidate it so new defuns are
scanned.
New Vars:
+ `python-nav-list-defun-positions-cache'
`python-indent-line' and `python-indent-electric-colon' now uses the
new `python-info-closing-block-message' function that takes care of
messaging the block the current line is closing (if applicable).
New Functions:
+ `python-info-closing-block-message'
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'