diff options
| author | Richard M. Stallman | 2002-05-30 17:12:15 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-05-30 17:12:15 +0000 |
| commit | 9cd450a4f09c0b59656dd0ef846265dae53ce511 (patch) | |
| tree | c4101ea4aa7dd474df6b139b56ac6ec7b0de5739 /lisp/simple.el | |
| parent | a60f1fcdb5876831ae376821e31a3eb14e33d7b8 (diff) | |
| download | emacs-9cd450a4f09c0b59656dd0ef846265dae53ce511.tar.gz emacs-9cd450a4f09c0b59656dd0ef846265dae53ce511.zip | |
(open-network-stream, open-network-stream-nowait)
(open-network-stream-server, process-kill-without-query):
Moved to subr.el.
(byte-compiling-files-p): Function deleted.
Diffstat (limited to 'lisp/simple.el')
| -rw-r--r-- | lisp/simple.el | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 95b89eab04d..305dc3e9817 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -4263,97 +4263,6 @@ See also `normal-erase-is-backspace'." | |||
| 4263 | (if normal-erase-is-backspace "forward" "backward")))) | 4263 | (if normal-erase-is-backspace "forward" "backward")))) |
| 4264 | 4264 | ||
| 4265 | 4265 | ||
| 4266 | ;;; make-network-process wrappers | ||
| 4267 | |||
| 4268 | (if (featurep 'make-network-process) | ||
| 4269 | (progn | ||
| 4270 | |||
| 4271 | (defun open-network-stream (name buffer host service) | ||
| 4272 | "Open a TCP connection for a service to a host. | ||
| 4273 | Returns a subprocess-object to represent the connection. | ||
| 4274 | Input and output work as for subprocesses; `delete-process' closes it. | ||
| 4275 | Args are NAME BUFFER HOST SERVICE. | ||
| 4276 | NAME is name for process. It is modified if necessary to make it unique. | ||
| 4277 | BUFFER is the buffer (or buffer-name) to associate with the process. | ||
| 4278 | Process output goes at end of that buffer, unless you specify | ||
| 4279 | an output stream or filter function to handle the output. | ||
| 4280 | BUFFER may be also nil, meaning that this process is not associated | ||
| 4281 | with any buffer | ||
| 4282 | Third arg is name of the host to connect to, or its IP address. | ||
| 4283 | Fourth arg SERVICE is name of the service desired, or an integer | ||
| 4284 | specifying a port number to connect to." | ||
| 4285 | (make-network-process :name name :buffer buffer | ||
| 4286 | :host host :service service)) | ||
| 4287 | |||
| 4288 | (defun open-network-stream-nowait (name buffer host service &optional sentinel filter) | ||
| 4289 | "Initiate connection to a TCP connection for a service to a host. | ||
| 4290 | It returns nil if non-blocking connects are not supported; otherwise, | ||
| 4291 | it returns a subprocess-object to represent the connection. | ||
| 4292 | |||
| 4293 | This function is similar to `open-network-stream', except that this | ||
| 4294 | function returns before the connection is established. When the | ||
| 4295 | connection is completed, the sentinel function will be called with | ||
| 4296 | second arg matching `open' (if successful) or `failed' (on error). | ||
| 4297 | |||
| 4298 | Args are NAME BUFFER HOST SERVICE SENTINEL FILTER. | ||
| 4299 | NAME, BUFFER, HOST, and SERVICE are as for `open-network-stream'. | ||
| 4300 | Optional args, SENTINEL and FILTER specifies the sentinel and filter | ||
| 4301 | functions to be used for this network stream." | ||
| 4302 | (if (featurep 'make-network-process '(:nowait t)) | ||
| 4303 | (make-network-process :name name :buffer buffer :nowait t | ||
| 4304 | :host host :service service | ||
| 4305 | :filter filter :sentinel sentinel))) | ||
| 4306 | |||
| 4307 | (defun open-network-stream-server (name buffer service &optional sentinel filter) | ||
| 4308 | "Create a network server process for a TCP service. | ||
| 4309 | It returns nil if server processes are not supported; otherwise, | ||
| 4310 | it returns a subprocess-object to represent the server. | ||
| 4311 | |||
| 4312 | When a client connects to the specified service, a new subprocess | ||
| 4313 | is created to handle the new connection, and the sentinel function | ||
| 4314 | is called for the new process. | ||
| 4315 | |||
| 4316 | Args are NAME BUFFER SERVICE SENTINEL FILTER. | ||
| 4317 | NAME is name for the server process. Client processes are named by | ||
| 4318 | appending the ip-address and port number of the client to NAME. | ||
| 4319 | BUFFER is the buffer (or buffer-name) to associate with the server | ||
| 4320 | process. Client processes will not get a buffer if a process filter | ||
| 4321 | is specified or BUFFER is nil; otherwise, a new buffer is created for | ||
| 4322 | the client process. The name is similar to the process name. | ||
| 4323 | Third arg SERVICE is name of the service desired, or an integer | ||
| 4324 | specifying a port number to connect to. It may also be t to selected | ||
| 4325 | an unused port number for the server. | ||
| 4326 | Optional args, SENTINEL and FILTER specifies the sentinel and filter | ||
| 4327 | functions to be used for the client processes; the server process | ||
| 4328 | does not use these function." | ||
| 4329 | (if (featurep 'make-network-process '(:server t)) | ||
| 4330 | (make-network-process :name name :buffer buffer | ||
| 4331 | :service service :server t :noquery t | ||
| 4332 | :sentinel sentinel :filter filter))) | ||
| 4333 | |||
| 4334 | )) ;; (featurep 'make-network-process) | ||
| 4335 | |||
| 4336 | |||
| 4337 | ;; compatibility | ||
| 4338 | |||
| 4339 | (defun process-kill-without-query (process &optional flag) | ||
| 4340 | "Say no query needed if PROCESS is running when Emacs is exited. | ||
| 4341 | Optional second argument if non-nil says to require a query. | ||
| 4342 | Value is t if a query was formerly required. | ||
| 4343 | New code should not use this function; use `process-query-on-exit-flag' | ||
| 4344 | or `set-process-query-on-exit-flag' instead." | ||
| 4345 | (let ((old (process-query-on-exit-flag process))) | ||
| 4346 | (set-process-query-on-exit-flag process nil) | ||
| 4347 | old)) | ||
| 4348 | |||
| 4349 | ;;; Misc | ||
| 4350 | |||
| 4351 | (defun byte-compiling-files-p () | ||
| 4352 | "Return t if currently byte-compiling files." | ||
| 4353 | (and (boundp 'byte-compile-current-file) | ||
| 4354 | (stringp byte-compile-current-file))) | ||
| 4355 | |||
| 4356 | |||
| 4357 | ;; Minibuffer prompt stuff. | 4266 | ;; Minibuffer prompt stuff. |
| 4358 | 4267 | ||
| 4359 | ;(defun minibuffer-prompt-modification (start end) | 4268 | ;(defun minibuffer-prompt-modification (start end) |