emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 969d71d11c: Add the parameter :noquery to open-network-stream (bu


From: Juri Linkov
Subject: master 969d71d11c: Add the parameter :noquery to open-network-stream (bug#58948)
Date: Wed, 2 Nov 2022 14:22:47 -0400 (EDT)

branch: master
commit 969d71d11c62ae085f094a96ecea2fb504bb4602
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>

    Add the parameter :noquery to open-network-stream (bug#58948)
    
    * doc/lispref/processes.texi (Network): Add :noquery for 
open-network-stream.
    
    * lisp/net/network-stream.el (open-network-stream): Pass the
    parameter :noquery to make-network-process.  Doc fix.
    
    * lisp/progmodes/eglot.el (eglot--connect): Pass `:noquery t' to
    eglot--inferior-bootstrap to use in open-network-stream call, like
    `:noquery t' is passed to make-process in other places.
---
 doc/lispref/processes.texi | 4 ++++
 lisp/net/network-stream.el | 4 ++++
 lisp/progmodes/eglot.el    | 3 ++-
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index da8df96854..adc6909aca 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -2585,6 +2585,10 @@ that are mainly relevant to encrypted connections:
 @item :nowait @var{boolean}
 If non-@code{nil}, try to make an asynchronous connection.
 
+@item :noquery @var{query-flag}
+Initialize the process query flag to @var{query-flag}.
+@xref{Query Before Exit}.
+
 @item :coding @var{coding}
 Use this to set the coding systems used by the network process, in
 preference to binding @code{coding-system-for-read} or
diff --git a/lisp/net/network-stream.el b/lisp/net/network-stream.el
index 38a5e14c94..2b7e539392 100644
--- a/lisp/net/network-stream.el
+++ b/lisp/net/network-stream.el
@@ -173,6 +173,9 @@ a greeting from the server.
 :nowait, if non-nil, says the connection should be made
 asynchronously, if possible.
 
+:noquery - when exiting Emacs and the network process is running,
+don't query the user if it's non-nil.
+
 :shell-command is a `format-spec' string that can be used if
 :type is `shell'.  It has two specs, %s for host and %p for port
 number.  Example: \"ssh gateway nc %s %p\".
@@ -195,6 +198,7 @@ gnutls-boot (as returned by `gnutls-boot-parameters')."
        (make-network-process :name name :buffer buffer
                              :host (puny-encode-domain host) :service service
                              :nowait (plist-get parameters :nowait)
+                             :noquery (plist-get parameters :noquery)
                               :tls-parameters
                               (plist-get parameters :tls-parameters)
                               :coding (plist-get parameters :coding))
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 0a0d73eb6d..204121045a 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -1200,7 +1200,8 @@ This docstring appeases checkdoc, that's all."
                                (pcase-let ((`(,connection . ,inferior)
                                             (eglot--inferior-bootstrap
                                              readable-name
-                                             contact)))
+                                             contact
+                                             '(:noquery t))))
                                  (setq autostart-inferior-process inferior)
                                  connection))))
                 ((stringp (car contact))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]