Subject: bug#38426: 27.0.50; [PATCH] * python.el: new function python-shell-send-statement

From: <[email-masked]>
Date: Sun, 15 Dec 2019 16:52:51 +0800

Hi Eli,

Thank you for your comments, they're very helpful, I had change the
modifications according your comments.
An individual mail with patch only is send, please check and review it
again. Thanks.

-----Original Message-----
From: Eli Zaretskii <[email-masked]> 
Sent: Saturday, December 14, 2019 20:17
To: [email-masked]
Cc: [email-masked]; [email-masked]
Subject: Re: 27.0.50; [PATCH] * python.el: new function
python-shell-send-statement

> From: <[email-masked]>
> Date: Fri, 29 Nov 2019 16:40:55 +0800
> 
> >From 61db0e91094297ddca302eaf691cf5b4ff82ebf6 Mon Sep 17 00:00:00 
> >2001
> From: "lin.sun" <[email-masked]>
> Date: Fri, 29 Nov 2019 03:10:12 -0500
> Subject: [PATCH] * python.el: new function python-shell-send-statement
> 
> Add new function `python-shell-send-statement' and bind to key "C-c 
> C-e" for sending statement under cursor to inferior Python process.

Thanks.  A few comments below:

> +(defun python-shell-send-statement (&optional send-main msg)
> +  "Send the statement delimited by 
> +`python-nav-beginning-of-statement' and

The first line of a doc string should be a complete sentence, and it should
mention the function's arguments.

> +`python-nav-end-of-statement' to inferior Python process. When 
> +optional
                                                           ^^ Our convention
is to leave 2 spaces between sentences in documentation and comments, per US
English rules.

> +                                                         When 
> +optional argument MSG is non-nil, forces display of a user-friendly 
> +message if
> there's
> +no process running; default to t when called interactively. If there 
> +is
> region
> +be activated, it present as `python-shell-send-region'."

These lines are too long, please wrap them to make them shorter, preferably
no more than 75 characters.

Please also provide a ChangeLog style commit log message, as described in
CONTRIBUTE, and please mention the bug number there.

And finally, this new command needs to be mentioned in NEWS, under "Python
mode".

Thanks.