From: Philipp Stephani <p.stephani2@gmail.com>
To: eliz@gnu.org
Cc: Philipp Stephani <phst@google.com>, 30460@debbugs.gnu.org
Subject: bug#30460: [PATCH] Remove :stop key from make-process.
Date: Fri, 19 Apr 2019 13:06:43 +0200 [thread overview]
Message-ID: <20190419110643.33444-1-phst@google.com> (raw)
In-Reply-To: <CAArVCkTmu8Q69EhkfMxx51VHx-UAzGhxB1XxXj184cqxnbBjWg@mail.gmail.com>
This has never worked and caused issues such as Bug#30460.
* src/process.c (Fmake_process): Don't accept :stop key any more.
(syms_of_process): Define needed symbol 'null'.
* test/src/process-tests.el (make-process/stop): New unit test.
* doc/lispref/processes.texi (Asynchronous Processes): Remove :stop
key from manual.
---
doc/lispref/processes.texi | 4 ----
etc/NEWS | 3 +++
src/process.c | 13 ++++++-------
test/src/process-tests.el | 9 +++++++++
4 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index 6be311b563..e9f9d64cc3 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -677,10 +677,6 @@ Asynchronous Processes
Initialize the process query flag to @var{query-flag}.
@xref{Query Before Exit}.
-@item :stop @var{stopped}
-If @var{stopped} is non-@code{nil}, start the process in the
-stopped state.
-
@item :filter @var{filter}
Initialize the process filter to @var{filter}. If not specified, a
default filter will be provided, which can be overridden later.
diff --git a/etc/NEWS b/etc/NEWS
index 3e3454bd93..4d76143b13 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1515,6 +1515,9 @@ The global value of 'indent-line-function', which defaults to
To get back the old behavior, add a function to 'text-mode-hook' which
performs (setq-local indent-line-function #'indent-relative).
+** 'make-process' no longer accepts a non-nil ':stop' key. This has
+never worked reliably, and now causes an error.
+
\f
* Lisp Changes in Emacs 27.1
diff --git a/src/process.c b/src/process.c
index 0c44037162..412ced58de 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1643,11 +1643,6 @@ ENCODING is used for writing.
:noquery BOOL -- When exiting Emacs, query the user if BOOL is nil and
the process is running. If BOOL is not given, query before exiting.
-:stop BOOL -- Start process in the `stopped' state if BOOL non-nil.
-In the stopped state, a process does not accept incoming data, but you
-can send outgoing data. The stopped state is cleared by
-`continue-process' and set by `stop-process'.
-
:connection-type TYPE -- TYPE is control type of device used to
communicate with subprocesses. Values are `pipe' to use a pipe, `pty'
to use a pty, or nil to use the default specified through
@@ -1746,8 +1741,10 @@ usage: (make-process &rest ARGS) */)
if (!query_on_exit)
XPROCESS (proc)->kill_without_query = 1;
- if (tem = Fplist_get (contact, QCstop), !NILP (tem))
- pset_command (XPROCESS (proc), Qt);
+ tem = Fplist_get (contact, QCstop);
+ /* Normal processes can't be started in a stopped state, see
+ Bug#30460. */
+ CHECK_TYPE (NILP (tem), Qnull, tem);
tem = Fplist_get (contact, QCconnection_type);
if (EQ (tem, Qpty))
@@ -8300,6 +8297,8 @@ returns non-`nil'. */);
"internal-default-interrupt-process");
DEFSYM (Qinterrupt_process_functions, "interrupt-process-functions");
+ DEFSYM (Qnull, "null");
+
defsubr (&Sprocessp);
defsubr (&Sget_process);
defsubr (&Sdelete_process);
diff --git a/test/src/process-tests.el b/test/src/process-tests.el
index 0bb7ebe50a..b853f77946 100644
--- a/test/src/process-tests.el
+++ b/test/src/process-tests.el
@@ -284,5 +284,14 @@ process-tests--file-handler
(put #'process-tests--file-handler 'operations
'(unhandled-file-name-directory make-process))
+(ert-deftest make-process/stop ()
+ "Check that `make-process' doesn't accept a `:stop' key.
+See Bug#30460."
+ (should-error
+ (make-process :name "test"
+ :command (list (expand-file-name invocation-name
+ invocation-directory))
+ :stop t)))
+
(provide 'process-tests)
;; process-tests.el ends here.
--
2.20.1 (Apple Git-117)
next prev parent reply other threads:[~2019-04-19 11:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-14 22:00 bug#30460: 27.0.50; `process-command' of a stopped process is t p.stephani2
2018-02-17 13:25 ` Eli Zaretskii
2019-04-19 11:05 ` Philipp Stephani
2019-04-19 11:06 ` Philipp Stephani [this message]
2019-04-19 11:26 ` bug#30460: [PATCH] Remove :stop key from make-process Eli Zaretskii
2019-04-19 12:15 ` Philipp Stephani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190419110643.33444-1-phst@google.com \
--to=p.stephani2@gmail.com \
--cc=30460@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=phst@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.