Commit fd16b061 authored by Juanma Barranquero's avatar Juanma Barranquero
Browse files

lisp/progmodes/python.el: Fix docstring typos.

(defconst, python-syntax-count-quotes)
(python-indent-region, python-indent-shift-right)
(python-indent-dedent-line-backspace, python-nav-backward-sexp)
(python-nav-backward-sexp-safe, python-nav-backward-up-list)
(python-shell-prompt-block-regexp, python-shell-prompt-output-regexp)
(python-shell-prompt-pdb-regexp, python-shell-enable-font-lock)
(inferior-python-mode, python-shell-make-comint, run-python-internal)
(python-shell-buffer-substring, python-shell-send-buffer)
(python-pdbtrack-activate, python-pdbtrack-stacktrace-info-regexp)
(python-completion-complete-at-point, python-fill-docstring-style)
(python-eldoc-function, python-imenu-format-item-label)
(python-imenu-format-parent-item-label)
(python-imenu-format-parent-item-jump-label)
(python-imenu--build-tree, python-imenu-create-index)
(python-imenu-create-flat-index): Fix docstring typos.
(python-indent-context, python-shell-prompt-regexp, run-python):
Remove superfluous backslashes.
(python-indent-line, python-nav-beginning-of-defun)
(python-shell-get-buffer, python-shell-get-process)
(python-info-current-defun, python-info-current-line-comment-p)
(python-info-current-line-empty-p, python-util-popn): Doc fixes.
(python-indent-post-self-insert-function, python-shell-send-file)
(python-shell-completion-get-completions)
(python-shell-completion-complete-or-indent)
(python-eldoc--get-doc-at-point): Reflow docstrings.
parent b6d8543c
2014-03-15 Juanma Barranquero <lekktu@gmail.com>
* progmodes/python.el (defconst, python-syntax-count-quotes)
(python-indent-region, python-indent-shift-right)
(python-indent-dedent-line-backspace, python-nav-backward-sexp)
(python-nav-backward-sexp-safe, python-nav-backward-up-list)
(python-shell-prompt-block-regexp, python-shell-prompt-output-regexp)
(python-shell-prompt-pdb-regexp, python-shell-enable-font-lock)
(inferior-python-mode, python-shell-make-comint, run-python-internal)
(python-shell-buffer-substring, python-shell-send-buffer)
(python-pdbtrack-activate, python-pdbtrack-stacktrace-info-regexp)
(python-completion-complete-at-point, python-fill-docstring-style)
(python-eldoc-function, python-imenu-format-item-label)
(python-imenu-format-parent-item-label)
(python-imenu-format-parent-item-jump-label)
(python-imenu--build-tree, python-imenu-create-index)
(python-imenu-create-flat-index): Fix docstring typos.
(python-indent-context, python-shell-prompt-regexp, run-python):
Remove superfluous backslashes.
(python-indent-line, python-nav-beginning-of-defun)
(python-shell-get-buffer, python-shell-get-process)
(python-info-current-defun, python-info-current-line-comment-p)
(python-info-current-line-empty-p, python-util-popn): Doc fixes.
(python-indent-post-self-insert-function, python-shell-send-file)
(python-shell-completion-get-completions)
(python-shell-completion-complete-or-indent)
(python-eldoc--get-doc-at-point): Reflow docstrings.
2014-03-14 Glenn Morris <rgm@gnu.org> 2014-03-14 Glenn Morris <rgm@gnu.org>
* emacs-lisp/package.el (package-menu-mode-map): * emacs-lisp/package.el (package-menu-mode-map):
...@@ -35,7 +63,7 @@ ...@@ -35,7 +63,7 @@
2014-03-14 Juanma Barranquero <lekktu@gmail.com> 2014-03-14 Juanma Barranquero <lekktu@gmail.com>
* net/socks.el (socks, socks-override-functions) * net/socks.el (socks, socks-override-functions)
(socks-find-services-entry): FT (socks-find-services-entry):
* progmodes/hideif.el (hif-set-var, hif-nexttoken, hif-comma) * progmodes/hideif.el (hif-set-var, hif-nexttoken, hif-comma)
(hif-find-ifdef-block): (hif-find-ifdef-block):
* progmodes/modula2.el (m2-indent): Fix docstring typos. * progmodes/modula2.el (m2-indent): Fix docstring typos.
......
...@@ -357,7 +357,7 @@ ...@@ -357,7 +357,7 @@
(defmacro python-rx (&rest regexps) (defmacro python-rx (&rest regexps)
"Python mode specialized rx macro. "Python mode specialized rx macro.
This variant of `rx' supports common python named REGEXPS." This variant of `rx' supports common Python named REGEXPS."
(let ((rx-constituents (append python-rx-constituents rx-constituents))) (let ((rx-constituents (append python-rx-constituents rx-constituents)))
(cond ((null regexps) (cond ((null regexps)
(error "No regexp")) (error "No regexp"))
...@@ -528,7 +528,7 @@ The type returned can be `comment', `string' or `paren'." ...@@ -528,7 +528,7 @@ The type returned can be `comment', `string' or `paren'."
(defsubst python-syntax-count-quotes (quote-char &optional point limit) (defsubst python-syntax-count-quotes (quote-char &optional point limit)
"Count number of quotes around point (max is 3). "Count number of quotes around point (max is 3).
QUOTE-CHAR is the quote char to count. Optional argument POINT is QUOTE-CHAR is the quote char to count. Optional argument POINT is
the point where scan starts (defaults to current point) and LIMIT the point where scan starts (defaults to current point), and LIMIT
is used to limit the scan." is used to limit the scan."
(let ((i 0)) (let ((i 0))
(while (and (< i 3) (while (and (< i 3)
...@@ -683,7 +683,7 @@ AFTER-LINE.") ...@@ -683,7 +683,7 @@ AFTER-LINE.")
(defun python-indent-context () (defun python-indent-context ()
"Get information on indentation context. "Get information on indentation context.
Context information is returned with a cons with the form: Context information is returned with a cons with the form:
\(STATUS . START) (STATUS . START)
Where status can be any of the following symbols: Where status can be any of the following symbols:
...@@ -963,11 +963,11 @@ variable `python-indent-current-level'. ...@@ -963,11 +963,11 @@ variable `python-indent-current-level'.
When the variable `last-command' is not equal to one of the When the variable `last-command' is not equal to one of the
symbols inside `python-indent-trigger-commands' and FORCE-TOGGLE symbols inside `python-indent-trigger-commands' and FORCE-TOGGLE
is nil it calculates possible indentation levels and saves it in is nil it calculates possible indentation levels and saves them
the variable `python-indent-levels'. Afterwards it sets the in the variable `python-indent-levels'. Afterwards it sets the
variable `python-indent-current-level' correctly so offset is variable `python-indent-current-level' correctly so offset is
equal to (`nth' `python-indent-current-level' equal to
`python-indent-levels')" (nth python-indent-current-level python-indent-levels)"
(or (or
(and (or (and (memq this-command python-indent-trigger-commands) (and (or (and (memq this-command python-indent-trigger-commands)
(eq last-command this-command)) (eq last-command this-command))
...@@ -1010,14 +1010,14 @@ See `python-indent-line' for details." ...@@ -1010,14 +1010,14 @@ See `python-indent-line' for details."
(defun python-indent-dedent-line-backspace (arg) (defun python-indent-dedent-line-backspace (arg)
"De-indent current line. "De-indent current line.
Argument ARG is passed to `backward-delete-char-untabify' when Argument ARG is passed to `backward-delete-char-untabify' when
point is not in between the indentation." point is not in between the indentation."
(interactive "*p") (interactive "*p")
(when (not (python-indent-dedent-line)) (when (not (python-indent-dedent-line))
(backward-delete-char-untabify arg))) (backward-delete-char-untabify arg)))
(put 'python-indent-dedent-line-backspace 'delete-selection 'supersede) (put 'python-indent-dedent-line-backspace 'delete-selection 'supersede)
(defun python-indent-region (start end) (defun python-indent-region (start end)
"Indent a python region automagically. "Indent a Python region automagically.
Called from a program, START and END specify the region to indent." Called from a program, START and END specify the region to indent."
(let ((deactivate-mark nil)) (let ((deactivate-mark nil))
...@@ -1076,7 +1076,7 @@ any lines in the region are indented less than COUNT columns." ...@@ -1076,7 +1076,7 @@ any lines in the region are indented less than COUNT columns."
(add-to-list 'debug-ignored-errors "^Can't shift all lines enough") (add-to-list 'debug-ignored-errors "^Can't shift all lines enough")
(defun python-indent-shift-right (start end &optional count) (defun python-indent-shift-right (start end &optional count)
"Shift lines contained in region START END by COUNT columns to the left. "Shift lines contained in region START END by COUNT columns to the right.
COUNT defaults to `python-indent-offset'. If region isn't COUNT defaults to `python-indent-offset'. If region isn't
active, the current line is shifted. The shifted region includes active, the current line is shifted. The shifted region includes
the lines in which START and END lie." the lines in which START and END lie."
...@@ -1091,10 +1091,9 @@ the lines in which START and END lie." ...@@ -1091,10 +1091,9 @@ the lines in which START and END lie."
(defun python-indent-post-self-insert-function () (defun python-indent-post-self-insert-function ()
"Adjust indentation after insertion of some characters. "Adjust indentation after insertion of some characters.
This function is intended to be added to the This function is intended to be added to `post-self-insert-hook.'
`post-self-insert-hook.' If a line renders a paren alone, after If a line renders a paren alone, after adding a char before it,
adding a char before it, the line will be re-indented the line will be re-indented automatically if needed."
automatically if needed."
(when (and electric-indent-mode (when (and electric-indent-mode
(eq (char-before) last-command-event)) (eq (char-before) last-command-event))
(cond (cond
...@@ -1176,10 +1175,10 @@ With positive ARG search backwards, else search forwards." ...@@ -1176,10 +1175,10 @@ With positive ARG search backwards, else search forwards."
(defun python-nav-beginning-of-defun (&optional arg) (defun python-nav-beginning-of-defun (&optional arg)
"Move point to `beginning-of-defun'. "Move point to `beginning-of-defun'.
With positive ARG search backwards else search forward. When ARG With positive ARG search backwards else search forward.
is nil or 0 defaults to 1. When searching backwards nested ARG nil or 0 defaults to 1. When searching backwards,
defuns are handled with care depending on current point nested defuns are handled with care depending on current
position. Return non-nil if point is moved to point position. Return non-nil if point is moved to
`beginning-of-defun'." `beginning-of-defun'."
(when (or (null arg) (= arg 0)) (setq arg 1)) (when (or (null arg) (= arg 0)) (setq arg 1))
(let ((found)) (let ((found))
...@@ -1559,7 +1558,7 @@ backward N times." ...@@ -1559,7 +1558,7 @@ backward N times."
(defun python-nav-backward-sexp (&optional arg) (defun python-nav-backward-sexp (&optional arg)
"Move backward across expressions. "Move backward across expressions.
With ARG, do it that many times. Negative arg -N means move With ARG, do it that many times. Negative arg -N means move
backward N times." forward N times."
(interactive "^p") (interactive "^p")
(or arg (setq arg 1)) (or arg (setq arg 1))
(python-nav-forward-sexp (- arg))) (python-nav-forward-sexp (- arg)))
...@@ -1580,7 +1579,7 @@ backward N times." ...@@ -1580,7 +1579,7 @@ backward N times."
(defun python-nav-backward-sexp-safe (&optional arg) (defun python-nav-backward-sexp-safe (&optional arg)
"Move backward safely across expressions. "Move backward safely across expressions.
With ARG, do it that many times. Negative arg -N means move With ARG, do it that many times. Negative arg -N means move
backward N times." forward N times."
(interactive "^p") (interactive "^p")
(or arg (setq arg 1)) (or arg (setq arg 1))
(python-nav-forward-sexp-safe (- arg))) (python-nav-forward-sexp-safe (- arg)))
...@@ -1640,7 +1639,7 @@ This command assumes point is not in a string or comment." ...@@ -1640,7 +1639,7 @@ This command assumes point is not in a string or comment."
(defun python-nav-backward-up-list (&optional arg) (defun python-nav-backward-up-list (&optional arg)
"Move backward out of one level of parentheses (or blocks). "Move backward out of one level of parentheses (or blocks).
With ARG, do this that many times. With ARG, do this that many times.
A negative argument means move backward but still to a less deep spot. A negative argument means move forward but still to a less deep spot.
This command assumes point is not in a string or comment." This command assumes point is not in a string or comment."
(interactive "^p") (interactive "^p")
(or arg (setq arg 1)) (or arg (setq arg 1))
...@@ -1695,36 +1694,36 @@ position, else returns nil." ...@@ -1695,36 +1694,36 @@ position, else returns nil."
:group 'python) :group 'python)
(defcustom python-shell-prompt-regexp ">>> " (defcustom python-shell-prompt-regexp ">>> "
"Regular Expression matching top\-level input prompt of python shell. "Regular expression matching top-level input prompt of Python shell.
It should not contain a caret (^) at the beginning." It should not contain a caret (^) at the beginning."
:type 'string :type 'string
:group 'python :group 'python
:safe 'stringp) :safe 'stringp)
(defcustom python-shell-prompt-block-regexp "[.][.][.] " (defcustom python-shell-prompt-block-regexp "[.][.][.] "
"Regular Expression matching block input prompt of python shell. "Regular expression matching block input prompt of Python shell.
It should not contain a caret (^) at the beginning." It should not contain a caret (^) at the beginning."
:type 'string :type 'string
:group 'python :group 'python
:safe 'stringp) :safe 'stringp)
(defcustom python-shell-prompt-output-regexp "" (defcustom python-shell-prompt-output-regexp ""
"Regular Expression matching output prompt of python shell. "Regular expression matching output prompt of Python shell.
It should not contain a caret (^) at the beginning." It should not contain a caret (^) at the beginning."
:type 'string :type 'string
:group 'python :group 'python
:safe 'stringp) :safe 'stringp)
(defcustom python-shell-prompt-pdb-regexp "[(<]*[Ii]?[Pp]db[>)]+ " (defcustom python-shell-prompt-pdb-regexp "[(<]*[Ii]?[Pp]db[>)]+ "
"Regular Expression matching pdb input prompt of python shell. "Regular expression matching pdb input prompt of Python shell.
It should not contain a caret (^) at the beginning." It should not contain a caret (^) at the beginning."
:type 'string :type 'string
:group 'python :group 'python
:safe 'stringp) :safe 'stringp)
(defcustom python-shell-enable-font-lock t (defcustom python-shell-enable-font-lock t
"Should syntax highlighting be enabled in the python shell buffer? "Should syntax highlighting be enabled in the Python shell buffer?
Restart the python shell after changing this variable for it to take effect." Restart the Python shell after changing this variable for it to take effect."
:type 'boolean :type 'boolean
:group 'python :group 'python
:safe 'booleanp) :safe 'booleanp)
...@@ -1890,9 +1889,9 @@ It makes parens and quotes be treated as punctuation chars.") ...@@ -1890,9 +1889,9 @@ It makes parens and quotes be treated as punctuation chars.")
(define-derived-mode inferior-python-mode comint-mode "Inferior Python" (define-derived-mode inferior-python-mode comint-mode "Inferior Python"
"Major mode for Python inferior process. "Major mode for Python inferior process.
Runs a Python interpreter as a subprocess of Emacs, with Python Runs a Python interpreter as a subprocess of Emacs, with Python
I/O through an Emacs buffer. Variables I/O through an Emacs buffer. Variables `python-shell-interpreter'
`python-shell-interpreter' and `python-shell-interpreter-args' and `python-shell-interpreter-args' control which Python
controls which Python interpreter is run. Variables interpreter is run. Variables
`python-shell-prompt-regexp', `python-shell-prompt-regexp',
`python-shell-prompt-output-regexp', `python-shell-prompt-output-regexp',
`python-shell-prompt-block-regexp', `python-shell-prompt-block-regexp',
...@@ -1960,8 +1959,8 @@ variable. ...@@ -1960,8 +1959,8 @@ variable.
(compilation-shell-minor-mode 1)) (compilation-shell-minor-mode 1))
(defun python-shell-make-comint (cmd proc-name &optional pop internal) (defun python-shell-make-comint (cmd proc-name &optional pop internal)
"Create a python shell comint buffer. "Create a Python shell comint buffer.
CMD is the python command to be executed and PROC-NAME is the CMD is the Python command to be executed and PROC-NAME is the
process name the comint buffer will get. After the comint buffer process name the comint buffer will get. After the comint buffer
is created the `inferior-python-mode' is activated. When is created the `inferior-python-mode' is activated. When
optional argument POP is non-nil the buffer is shown. When optional argument POP is non-nil the buffer is shown. When
...@@ -2000,8 +1999,8 @@ command used to call the interpreter and define DEDICATED, so a ...@@ -2000,8 +1999,8 @@ command used to call the interpreter and define DEDICATED, so a
dedicated process for the current buffer is open. When numeric dedicated process for the current buffer is open. When numeric
prefix arg is other than 0 or 4 do not SHOW. prefix arg is other than 0 or 4 do not SHOW.
Runs the hook `inferior-python-mode-hook' (after the Runs the hook `inferior-python-mode-hook' after
`comint-mode-hook' is run). \(Type \\[describe-mode] in the `comint-mode-hook' is run. (Type \\[describe-mode] in the
process buffer for a list of commands.)" process buffer for a list of commands.)"
(interactive (interactive
(if current-prefix-arg (if current-prefix-arg
...@@ -2021,7 +2020,7 @@ Input and output via buffer named after ...@@ -2021,7 +2020,7 @@ Input and output via buffer named after
`python-shell-internal-get-process-name' returns. `python-shell-internal-get-process-name' returns.
This new kind of shell is intended to be used for generic This new kind of shell is intended to be used for generic
communication related to defined configurations, the main communication related to defined configurations; the main
difference with global or dedicated shells is that these ones are difference with global or dedicated shells is that these ones are
attached to a configuration, not a buffer. This means that can attached to a configuration, not a buffer. This means that can
be used for example to retrieve the sys.path and other stuff, be used for example to retrieve the sys.path and other stuff,
...@@ -2037,7 +2036,7 @@ startup." ...@@ -2037,7 +2036,7 @@ startup."
(python-shell-internal-get-process-name) nil t)))) (python-shell-internal-get-process-name) nil t))))
(defun python-shell-get-buffer () (defun python-shell-get-buffer ()
"Get inferior Python buffer for current buffer and return it." "Return inferior Python buffer for current buffer."
(let* ((dedicated-proc-name (python-shell-get-process-name t)) (let* ((dedicated-proc-name (python-shell-get-process-name t))
(dedicated-proc-buffer-name (format "*%s*" dedicated-proc-name)) (dedicated-proc-buffer-name (format "*%s*" dedicated-proc-name))
(global-proc-name (python-shell-get-process-name nil)) (global-proc-name (python-shell-get-process-name nil))
...@@ -2049,7 +2048,7 @@ startup." ...@@ -2049,7 +2048,7 @@ startup."
(and global-running global-proc-buffer-name)))) (and global-running global-proc-buffer-name))))
(defun python-shell-get-process () (defun python-shell-get-process ()
"Get inferior Python process for current buffer and return it." "Return inferior Python process for current buffer."
(get-buffer-process (python-shell-get-buffer))) (get-buffer-process (python-shell-get-buffer)))
(defun python-shell-get-or-create-process () (defun python-shell-get-or-create-process ()
...@@ -2216,7 +2215,7 @@ source file.") ...@@ -2216,7 +2215,7 @@ source file.")
This is a wrapper over `buffer-substring' that takes care of This is a wrapper over `buffer-substring' that takes care of
different transformations for the code sent to be evaluated in different transformations for the code sent to be evaluated in
the python shell: the python shell:
1. When Optional Argument NOMAIN is non-nil everything under an 1. When optional argument NOMAIN is non-nil everything under an
\"if __name__ == '__main__'\" block will be removed. \"if __name__ == '__main__'\" block will be removed.
2. When a subregion of the buffer is sent, it takes care of 2. When a subregion of the buffer is sent, it takes care of
appending extra empty lines so tracebacks are correct. appending extra empty lines so tracebacks are correct.
...@@ -2288,7 +2287,7 @@ the python shell: ...@@ -2288,7 +2287,7 @@ the python shell:
(defun python-shell-send-buffer (&optional arg) (defun python-shell-send-buffer (&optional arg)
"Send the entire buffer to inferior Python process. "Send the entire buffer to inferior Python process.
With prefix ARG allow execution of code inside blocks delimited With prefix ARG allow execution of code inside blocks delimited
by \"if __name__== '__main__':\"" by \"if __name__== '__main__':\"."
(interactive "P") (interactive "P")
(save-restriction (save-restriction
(widen) (widen)
...@@ -2319,8 +2318,8 @@ When argument ARG is non-nil do not include decorators." ...@@ -2319,8 +2318,8 @@ When argument ARG is non-nil do not include decorators."
delete) delete)
"Send FILE-NAME to inferior Python PROCESS. "Send FILE-NAME to inferior Python PROCESS.
If TEMP-FILE-NAME is passed then that file is used for processing If TEMP-FILE-NAME is passed then that file is used for processing
instead, while internally the shell will continue to use instead, while internally the shell will continue to use FILE-NAME.
FILE-NAME. If DELETE is non-nil, delete the file afterwards." If DELETE is non-nil, delete the file afterwards."
(interactive "fFile to send: ") (interactive "fFile to send: ")
(let* ((process (or process (python-shell-get-or-create-process))) (let* ((process (or process (python-shell-get-or-create-process)))
(temp-file-name (when temp-file-name (temp-file-name (when temp-file-name
...@@ -2420,8 +2419,7 @@ and use the following as the value of this variable: ...@@ -2420,8 +2419,7 @@ and use the following as the value of this variable:
(defun python-shell-completion-get-completions (process line input) (defun python-shell-completion-get-completions (process line input)
"Do completion at point for PROCESS. "Do completion at point for PROCESS.
LINE is used to detect the context on how to complete given LINE is used to detect the context on how to complete given INPUT."
INPUT."
(let* ((prompt (let* ((prompt
;; Get last prompt of the inferior process buffer (this ;; Get last prompt of the inferior process buffer (this
;; intentionally avoids using `comint-last-prompt' because ;; intentionally avoids using `comint-last-prompt' because
...@@ -2507,8 +2505,8 @@ using that one instead of current buffer's process." ...@@ -2507,8 +2505,8 @@ using that one instead of current buffer's process."
(defun python-shell-completion-complete-or-indent () (defun python-shell-completion-complete-or-indent ()
"Complete or indent depending on the context. "Complete or indent depending on the context.
If content before pointer is all whitespace indent. If not try If content before pointer is all whitespace, indent.
to complete." If not try to complete."
(interactive) (interactive)
(if (string-match "^[[:space:]]*$" (if (string-match "^[[:space:]]*$"
(buffer-substring (comint-line-beginning-position) (buffer-substring (comint-line-beginning-position)
...@@ -2520,14 +2518,14 @@ to complete." ...@@ -2520,14 +2518,14 @@ to complete."
;;; PDB Track integration ;;; PDB Track integration
(defcustom python-pdbtrack-activate t (defcustom python-pdbtrack-activate t
"Non-nil makes python shell enable pdbtracking." "Non-nil makes Python shell enable pdbtracking."
:type 'boolean :type 'boolean
:group 'python :group 'python
:safe 'booleanp) :safe 'booleanp)
(defcustom python-pdbtrack-stacktrace-info-regexp (defcustom python-pdbtrack-stacktrace-info-regexp
"> \\([^\"(<]+\\)(\\([0-9]+\\))\\([?a-zA-Z0-9_<>]+\\)()" "> \\([^\"(<]+\\)(\\([0-9]+\\))\\([?a-zA-Z0-9_<>]+\\)()"
"Regular Expression matching stacktrace information. "Regular expression matching stacktrace information.
Used to extract the current line and module being inspected." Used to extract the current line and module being inspected."
:type 'string :type 'string
:group 'python :group 'python
...@@ -2613,9 +2611,9 @@ Argument OUTPUT is a string with the output from the comint process." ...@@ -2613,9 +2611,9 @@ Argument OUTPUT is a string with the output from the comint process."
(defun python-completion-complete-at-point () (defun python-completion-complete-at-point ()
"Complete current symbol at point. "Complete current symbol at point.
For this to work the best as possible you should call For this to work as best as possible you should call
`python-shell-send-buffer' from time to time so context in `python-shell-send-buffer' from time to time so context in
inferior python process is updated properly." inferior Python process is updated properly."
(let ((process (python-shell-get-process))) (let ((process (python-shell-get-process)))
(if (not process) (if (not process)
(error "Completion needs an inferior Python process running") (error "Completion needs an inferior Python process running")
...@@ -2660,12 +2658,12 @@ fill parens." ...@@ -2660,12 +2658,12 @@ fill parens."
This affects `python-fill-string' behavior with regards to This affects `python-fill-string' behavior with regards to
triple quotes positioning. triple quotes positioning.
Possible values are DJANGO, ONETWO, PEP-257, PEP-257-NN, Possible values are `django', `onetwo', `pep-257', `pep-257-nn',
SYMMETRIC, and NIL. A value of NIL won't care about quotes `symmetric', and nil. A value of nil won't care about quotes
position and will treat docstrings a normal string, any other position and will treat docstrings a normal string, any other
value may result in one of the following docstring styles: value may result in one of the following docstring styles:
DJANGO: `django':
\"\"\" \"\"\"
Process foo, return bar. Process foo, return bar.
...@@ -2677,7 +2675,7 @@ DJANGO: ...@@ -2677,7 +2675,7 @@ DJANGO:
If processing fails throw ProcessingError. If processing fails throw ProcessingError.
\"\"\" \"\"\"
ONETWO: `onetwo':
\"\"\"Process foo, return bar.\"\"\" \"\"\"Process foo, return bar.\"\"\"
...@@ -2688,7 +2686,7 @@ ONETWO: ...@@ -2688,7 +2686,7 @@ ONETWO:
\"\"\" \"\"\"
PEP-257: `pep-257':
\"\"\"Process foo, return bar.\"\"\" \"\"\"Process foo, return bar.\"\"\"
...@@ -2698,7 +2696,7 @@ PEP-257: ...@@ -2698,7 +2696,7 @@ PEP-257:
\"\"\" \"\"\"
PEP-257-NN: `pep-257-nn':
\"\"\"Process foo, return bar.\"\"\" \"\"\"Process foo, return bar.\"\"\"
...@@ -2707,7 +2705,7 @@ PEP-257-NN: ...@@ -2707,7 +2705,7 @@ PEP-257-NN:
If processing fails throw ProcessingError. If processing fails throw ProcessingError.
\"\"\" \"\"\"
SYMMETRIC: `symmetric':
\"\"\"Process foo, return bar.\"\"\" \"\"\"Process foo, return bar.\"\"\"
...@@ -3064,8 +3062,8 @@ The skeleton will be bound to python-skeleton-NAME." ...@@ -3064,8 +3062,8 @@ The skeleton will be bound to python-skeleton-NAME."
(defun python-check (command) (defun python-check (command)
"Check a Python file (default current buffer's file). "Check a Python file (default current buffer's file).
Runs COMMAND, a shell command, as if by `compile'. See Runs COMMAND, a shell command, as if by `compile'.
`python-check-command' for the default." See `python-check-command' for the default."
(interactive (interactive
(list (read-string "Check command: " (list (read-string "Check command: "
(or python-check-custom-command (or python-check-custom-command
...@@ -3130,10 +3128,9 @@ Runs COMMAND, a shell command, as if by `compile'. See ...@@ -3130,10 +3128,9 @@ Runs COMMAND, a shell command, as if by `compile'. See
(defun python-eldoc--get-doc-at-point (&optional force-input force-process) (defun python-eldoc--get-doc-at-point (&optional force-input force-process)
"Internal implementation to get documentation at point. "Internal implementation to get documentation at point.
If not FORCE-INPUT is passed then what If not FORCE-INPUT is passed then what `python-info-current-symbol'
`python-info-current-symbol' returns will be used. If not returns will be used. If not FORCE-PROCESS is passed what
FORCE-PROCESS is passed what `python-shell-get-process' returns `python-shell-get-process' returns is used."
is used."
(let ((process (or force-process (python-shell-get-process)))) (let ((process (or force-process (python-shell-get-process))))
(if (not process) (if (not process)
(error "Eldoc needs an inferior Python process running") (error "Eldoc needs an inferior Python process running")
...@@ -3146,9 +3143,9 @@ is used." ...@@ -3146,9 +3143,9 @@ is used."
(defun python-eldoc-function () (defun python-eldoc-function ()
"`eldoc-documentation-function' for Python. "`eldoc-documentation-function' for Python.
For this to work the best as possible you should call For this to work as best as possible you should call
`python-shell-send-buffer' from time to time so context in `python-shell-send-buffer' from time to time so context in
inferior python process is updated properly." inferior Python process is updated properly."
(python-eldoc--get-doc-at-point)) (python-eldoc--get-doc-at-point))
(defun python-eldoc-at-point (symbol) (defun python-eldoc-at-point (symbol)
...@@ -3185,15 +3182,15 @@ It must be a function with two arguments: TYPE and NAME.") ...@@ -3185,15 +3182,15 @@ It must be a function with two arguments: TYPE and NAME.")
It must be a function with two arguments: TYPE and NAME.") It must be a function with two arguments: TYPE and NAME.")
(defun python-imenu-format-item-label (type name) (defun python-imenu-format-item-label (type name)
"Return imenu label for single node using TYPE and NAME." "Return Imenu label for single node using TYPE and NAME."
(format "%s (%s)" name type)) (format "%s (%s)" name type))
(defun python-imenu-format-parent-item-label (type name) (defun python-imenu-format-parent-item-label (type name)
"Return imenu label for parent node using TYPE and NAME." "Return Imenu label for parent node using TYPE and NAME."
(format "%s..." (python-imenu-format-item-label type name))) (format "%s..." (python-imenu-format-item-label type name)))
(defun python-imenu-format-parent-item-jump-label (type _name) (defun python-imenu-format-parent-item-jump-label (type _name)
"Return imenu label for parent node jump using TYPE and NAME." "Return Imenu label for parent node jump using TYPE and NAME."
(if (string= type "class")