diff options
| author | Fabián Ezequiel Gallina | 2012-05-17 00:03:44 -0300 |
|---|---|---|
| committer | Fabián Ezequiel Gallina | 2012-05-17 00:03:44 -0300 |
| commit | 4289485a58810ee957c4151f8795b5fe717f264a (patch) | |
| tree | 46a00b9bc8f9264cbeb33d3e01ad46e5b86f66a0 /lisp/progmodes/python.el | |
| parent | 8c6f9e60dfec606a8f00101c41bf6988496cb86a (diff) | |
| download | emacs-4289485a58810ee957c4151f8795b5fe717f264a.tar.gz emacs-4289485a58810ee957c4151f8795b5fe717f264a.zip | |
Function documentation enhancements
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 3b0b418899c..1ede66058e8 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -1184,7 +1184,7 @@ cache." | |||
| 1184 | 1184 | ||
| 1185 | (defun python-nav-jump-to-defun (def) | 1185 | (defun python-nav-jump-to-defun (def) |
| 1186 | "Jump to the definition of DEF in current file. | 1186 | "Jump to the definition of DEF in current file. |
| 1187 | Locations are cached; use a C-u prefix argument to force a | 1187 | Locations are cached; use a `C-u' prefix argument to force a |
| 1188 | rescan." | 1188 | rescan." |
| 1189 | (interactive | 1189 | (interactive |
| 1190 | (list (python-nav-read-defun current-prefix-arg))) | 1190 | (list (python-nav-read-defun current-prefix-arg))) |
| @@ -1637,7 +1637,7 @@ Returns the output. See `python-shell-send-string-no-output'." | |||
| 1637 | (defun python-shell-send-buffer (&optional arg) | 1637 | (defun python-shell-send-buffer (&optional arg) |
| 1638 | "Send the entire buffer to inferior Python process. | 1638 | "Send the entire buffer to inferior Python process. |
| 1639 | 1639 | ||
| 1640 | With prefix arg include lines protected by \"if __name__ == '__main__':\"" | 1640 | With prefix ARG include lines surrounded by \"if __name__ == '__main__':\"" |
| 1641 | (interactive "P") | 1641 | (interactive "P") |
| 1642 | (save-restriction | 1642 | (save-restriction |
| 1643 | (widen) | 1643 | (widen) |
| @@ -1961,7 +1961,7 @@ inferior python process is updated properly." | |||
| 1961 | (interactive) | 1961 | (interactive) |
| 1962 | (let ((process (python-shell-get-process))) | 1962 | (let ((process (python-shell-get-process))) |
| 1963 | (if (not process) | 1963 | (if (not process) |
| 1964 | (error "Completion needs an inferior Python process running.") | 1964 | (error "Completion needs an inferior Python process running") |
| 1965 | (python-shell-completion--do-completion-at-point process)))) | 1965 | (python-shell-completion--do-completion-at-point process)))) |
| 1966 | 1966 | ||
| 1967 | (add-to-list 'debug-ignored-errors | 1967 | (add-to-list 'debug-ignored-errors |
| @@ -2639,7 +2639,8 @@ With optional argument LINE-NUMBER, check that line instead." | |||
| 2639 | (point-marker))))) | 2639 | (point-marker))))) |
| 2640 | 2640 | ||
| 2641 | (defun python-info-beginning-of-backlash (&optional line-number) | 2641 | (defun python-info-beginning-of-backlash (&optional line-number) |
| 2642 | "Return the point where the backlashed line starts." | 2642 | "Return the point where the backlashed line start. |
| 2643 | Optional argument LINE-NUMBER forces the line number to check against." | ||
| 2643 | (save-excursion | 2644 | (save-excursion |
| 2644 | (save-restriction | 2645 | (save-restriction |
| 2645 | (widen) | 2646 | (widen) |
| @@ -2750,8 +2751,8 @@ The type returned can be 'comment, 'string or 'paren." | |||
| 2750 | (t nil)))) | 2751 | (t nil)))) |
| 2751 | 2752 | ||
| 2752 | (defun python-info-looking-at-beginning-of-defun (&optional syntax-ppss) | 2753 | (defun python-info-looking-at-beginning-of-defun (&optional syntax-ppss) |
| 2753 | "Return nil of point is at `beginning-of-defun'." | 2754 | "Check if point is at `beginning-of-defun' using SYNTAX-PPSS." |
| 2754 | (and (not (python-info-ppss-context-type)) | 2755 | (and (not (python-info-ppss-context-type (or syntax-ppss (syntax-ppss)))) |
| 2755 | (save-excursion | 2756 | (save-excursion |
| 2756 | (beginning-of-line 1) | 2757 | (beginning-of-line 1) |
| 2757 | (looking-at python-nav-beginning-of-defun-regexp)))) | 2758 | (looking-at python-nav-beginning-of-defun-regexp)))) |
| @@ -2781,7 +2782,8 @@ to \"^python-\"." | |||
| 2781 | (buffer-local-variables from-buffer))) | 2782 | (buffer-local-variables from-buffer))) |
| 2782 | 2783 | ||
| 2783 | (defun python-util-forward-comment (&optional direction) | 2784 | (defun python-util-forward-comment (&optional direction) |
| 2784 | "Python mode specific version of `forward-comment'." | 2785 | "Python mode specific version of `forward-comment'. |
| 2786 | Optional argument DIRECTION defines the direction to move to." | ||
| 2785 | (let ((comment-start (python-info-ppss-context 'comment)) | 2787 | (let ((comment-start (python-info-ppss-context 'comment)) |
| 2786 | (factor (if (< (or direction 0) 0) | 2788 | (factor (if (< (or direction 0) 0) |
| 2787 | -99999 | 2789 | -99999 |