* bug#31191: 26.1; [PATCH] Improve docstring of start-process-shell-command
@ 2018-04-17 11:39 Damien Cassou
2018-04-17 11:43 ` Noam Postavsky
0 siblings, 1 reply; 6+ messages in thread
From: Damien Cassou @ 2018-04-17 11:39 UTC (permalink / raw)
To: 31191
[-- Attachment #1: Type: text/plain, Size: 416 bytes --]
* lisp/subr.el (start-process-shell-command): Add recommended
signature to docstring. This hides the argument ARGS whose use is
discouraged. This also makes the argument COMMAND visible so the
user understands what the docstring is referring to.
--
Damien Cassou
http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Improve-docstring-of-start-process-shell-command.patch --]
[-- Type: text/x-patch, Size: 1135 bytes --]
From 912261c8dfb337c6f94ca81a495a3690c0628f1e Mon Sep 17 00:00:00 2001
From: Damien Cassou <damien@cassou.me>
Date: Mon, 16 Apr 2018 16:06:36 +0200
Subject: [PATCH] Improve docstring of start-process-shell-command
* lisp/subr.el (start-process-shell-command): Add recommended
signature to docstring. This hides the argument ARGS whose use is
discouraged. This also makes the argument COMMAND visible so the
user understands what the docstring is referring to.
---
lisp/subr.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/subr.el b/lisp/subr.el
index 9cf7d596cd..59bac5a195 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3107,7 +3107,9 @@ start-process-shell-command
An old calling convention accepted any number of arguments after COMMAND,
which were just concatenated to COMMAND. This is still supported but strongly
-discouraged."
+discouraged.
+
+\(fn NAME BUFFER COMMAND)"
(declare (advertised-calling-convention (name buffer command) "23.1"))
;; We used to use `exec' to replace the shell with the command,
;; but that failed to handle (...) and semicolon, etc.
--
2.14.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* bug#31191: 26.1; [PATCH] Improve docstring of start-process-shell-command
2018-04-17 11:39 bug#31191: 26.1; [PATCH] Improve docstring of start-process-shell-command Damien Cassou
@ 2018-04-17 11:43 ` Noam Postavsky
2018-04-17 12:44 ` Damien Cassou
0 siblings, 1 reply; 6+ messages in thread
From: Noam Postavsky @ 2018-04-17 11:43 UTC (permalink / raw)
To: Damien Cassou; +Cc: 31191
Damien Cassou <damien@cassou.me> writes:
> * lisp/subr.el (start-process-shell-command): Add recommended
> signature to docstring. This hides the argument ARGS whose use is
> discouraged. This also makes the argument COMMAND visible so the
> user understands what the docstring is referring to.
> +\(fn NAME BUFFER COMMAND)"
> (declare (advertised-calling-convention (name buffer command) "23.1"))
I think this is redundant since advertised-calling-convention already
does the same.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#31191: 26.1; [PATCH] Improve docstring of start-process-shell-command
2018-04-17 11:43 ` Noam Postavsky
@ 2018-04-17 12:44 ` Damien Cassou
2018-04-17 13:06 ` Noam Postavsky
0 siblings, 1 reply; 6+ messages in thread
From: Damien Cassou @ 2018-04-17 12:44 UTC (permalink / raw)
To: Noam Postavsky; +Cc: 31191
Noam Postavsky <npostavs@gmail.com> writes:
>> +\(fn NAME BUFFER COMMAND)"
>> (declare (advertised-calling-convention (name buffer command) "23.1"))
>
> I think this is redundant since advertised-calling-convention already
> does the same.
you are right, thank you. I didn't know about that and helpful does not
take it into account (I've just reported the issue).
What is the preferred way to advertise a signature, the declare form or
a last line in the docstring? If you answer the question, I can fix the
manual to add links between (info "(elisp) Declare Form") and (info
"(elisp) Function Documentation").
--
Damien Cassou
http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#31191: 26.1; [PATCH] Improve docstring of start-process-shell-command
2018-04-17 12:44 ` Damien Cassou
@ 2018-04-17 13:06 ` Noam Postavsky
2018-04-17 13:45 ` Damien Cassou
0 siblings, 1 reply; 6+ messages in thread
From: Noam Postavsky @ 2018-04-17 13:06 UTC (permalink / raw)
To: Damien Cassou; +Cc: 31191
Damien Cassou <damien@cassou.me> writes:
> Noam Postavsky <npostavs@gmail.com> writes:
>>> +\(fn NAME BUFFER COMMAND)"
>>> (declare (advertised-calling-convention (name buffer command) "23.1"))
>>
>> I think this is redundant since advertised-calling-convention already
>> does the same.
>
> you are right, thank you. I didn't know about that and helpful does not
> take it into account (I've just reported the issue).
>
> What is the preferred way to advertise a signature, the declare form or
> a last line in the docstring? If you answer the question, I can fix the
> manual to add links between (info "(elisp) Declare Form") and (info
> "(elisp) Function Documentation").
The advertised-calling-convention declaration should be used when you
want the old way of calling to trigger a warning during byte
compilation. Otherwise, the docstring method should be used.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#31191: 26.1; [PATCH] Improve docstring of start-process-shell-command
2018-04-17 13:06 ` Noam Postavsky
@ 2018-04-17 13:45 ` Damien Cassou
2018-04-17 22:44 ` Noam Postavsky
0 siblings, 1 reply; 6+ messages in thread
From: Damien Cassou @ 2018-04-17 13:45 UTC (permalink / raw)
To: Noam Postavsky; +Cc: 31191
On April 17, 2018 3:06:23 PM GMT+02:00, Noam Postavsky <npostavs@gmail.com> wrote:
>Damien Cassou <damien@cassou.me> writes:
>> What is the preferred way to advertise a signature, the declare form
>or
>> a last line in the docstring? If you answer the question, I can fix
>the
>> manual to add links between (info "(elisp) Declare Form") and (info
>> "(elisp) Function Documentation").
>
>The advertised-calling-convention declaration should be used when you
>want the old way of calling to trigger a warning during byte
>compilation. Otherwise, the docstring method should be used.
Thank you. Can you please close this issue? I will send a patch within another report.
--
Damien Cassou
http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-04-17 22:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-17 11:39 bug#31191: 26.1; [PATCH] Improve docstring of start-process-shell-command Damien Cassou
2018-04-17 11:43 ` Noam Postavsky
2018-04-17 12:44 ` Damien Cassou
2018-04-17 13:06 ` Noam Postavsky
2018-04-17 13:45 ` Damien Cassou
2018-04-17 22:44 ` Noam Postavsky
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.