]> git.eshelyaron.com Git - emacs.git/commitdiff
Add the parameter :noquery to open-network-stream (bug#58948)
authorJuri Linkov <juri@linkov.net>
Wed, 2 Nov 2022 18:22:10 +0000 (20:22 +0200)
committerJuri Linkov <juri@linkov.net>
Wed, 2 Nov 2022 18:22:10 +0000 (20:22 +0200)
* 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
lisp/net/network-stream.el
lisp/progmodes/eglot.el

index da8df968541b8634c4d24723e3b2f75d570187a7..adc6909aca63493dd39d1f771275587b976f106b 100644 (file)
@@ -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
index 38a5e14c9467c1cd098b1dbdd9793d255f1ff292..2b7e53939239ff51217c9cd03daeec03b1a165eb 100644 (file)
@@ -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))
index 0a0d73eb6d2e47fb1a6467c49c9dd5a6a8e7c5a0..204121045a0ee0d1124d1870abab473a6909a97e 100644 (file)
@@ -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))