mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-23 06:00:41 -08:00
Replaced references from python-beginning-of-innermost-defun to python-beginning-of-defun-function
This commit is contained in:
parent
c2cb97aec2
commit
2ed294c5df
1 changed files with 9 additions and 10 deletions
|
|
@ -1251,18 +1251,17 @@ the output."
|
||||||
(python-shell-send-region (point-min) (point-max))))
|
(python-shell-send-region (point-min) (point-max))))
|
||||||
|
|
||||||
(defun python-shell-send-defun (arg)
|
(defun python-shell-send-defun (arg)
|
||||||
"Send the (inner|outer)most def or class to inferior Python process.
|
"Send the current defun to inferior Python process.
|
||||||
When argument ARG is non-nil sends the innermost defun."
|
When argument ARG is non-nil sends the innermost defun."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(python-shell-send-region (progn
|
(python-shell-send-region
|
||||||
(or (if arg
|
(progn
|
||||||
(python-beginning-of-innermost-defun)
|
(or (python-beginning-of-defun-function)
|
||||||
(python-beginning-of-defun-function))
|
(progn (beginning-of-line) (point-marker))))
|
||||||
(progn (beginning-of-line) (point-marker))))
|
(progn
|
||||||
(progn
|
(or (python-end-of-defun-function)
|
||||||
(or (python-end-of-defun-function)
|
(progn (end-of-line) (point-marker)))))))
|
||||||
(progn (end-of-line) (point-marker)))))))
|
|
||||||
|
|
||||||
(defun python-shell-send-file (file-name &optional process temp-file-name)
|
(defun python-shell-send-file (file-name &optional process temp-file-name)
|
||||||
"Send FILE-NAME to inferior Python PROCESS.
|
"Send FILE-NAME to inferior Python PROCESS.
|
||||||
|
|
@ -1943,7 +1942,7 @@ not inside a defun."
|
||||||
(when (not (>= (current-indentation) python-indent-offset))
|
(when (not (>= (current-indentation) python-indent-offset))
|
||||||
(while (and (not (eobp)) (forward-comment 1))))
|
(while (and (not (eobp)) (forward-comment 1))))
|
||||||
(while (and (not (equal 0 (current-indentation)))
|
(while (and (not (equal 0 (current-indentation)))
|
||||||
(python-beginning-of-innermost-defun))
|
(python-beginning-of-defun-function))
|
||||||
(back-to-indentation)
|
(back-to-indentation)
|
||||||
(looking-at "\\(?:def\\|class\\) +\\([^(]+\\)[^:]+:\\s-*\n")
|
(looking-at "\\(?:def\\|class\\) +\\([^(]+\\)[^:]+:\\s-*\n")
|
||||||
(setq names (cons (match-string-no-properties 1) names)))))
|
(setq names (cons (match-string-no-properties 1) names)))))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue