(g2-UU+5B73): Add `=decomposition@hanyo-denshi'.
[chise/xemacs-chise.git.1] / lisp / code-process.el
index 1b248dc..1d9208a 100644 (file)
@@ -1,6 +1,7 @@
 ;;; code-process.el --- Process coding functions for XEmacs.
 
 ;;; code-process.el --- Process coding functions for XEmacs.
 
-;; Copyright (C) 1985-1987, 1993, 1994, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1987, 1993, 1994, 1997, 2003
+;;               Free Software Foundation, Inc.
 ;; Copyright (C) 1995 Ben Wing
 ;; Copyright (C) 1997 MORIOKA Tomohiko
 
 ;; Copyright (C) 1995 Ben Wing
 ;; Copyright (C) 1997 MORIOKA Tomohiko
 
@@ -11,8 +12,6 @@
 
 ;; This file is part of XEmacs.
 
 
 ;; This file is part of XEmacs.
 
-;; This file is very similar to code-process.el
-
 ;; XEmacs is free software; you can redistribute it and/or modify it
 ;; under the terms of the GNU General Public License as published by
 ;; the Free Software Foundation; either version 2, or (at your option)
 ;; XEmacs is free software; you can redistribute it and/or modify it
 ;; under the terms of the GNU General Public License as published by
 ;; the Free Software Foundation; either version 2, or (at your option)
 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ;; 02111-1307, USA.
 
 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ;; 02111-1307, USA.
 
+;;; Commentary:
+
+;; This file has some similarities to code-files.el.
+
 ;;; Code:
 
 (defvar process-coding-system-alist nil
 ;;; Code:
 
 (defvar process-coding-system-alist nil
@@ -47,6 +50,8 @@ or a cons of coding systems which are used as above.")
 The program's input comes from file INFILE (nil means `/dev/null').
 Insert output in BUFFER before point; t means current buffer;
  nil for BUFFER means discard it; 0 means discard and don't wait.
 The program's input comes from file INFILE (nil means `/dev/null').
 Insert output in BUFFER before point; t means current buffer;
  nil for BUFFER means discard it; 0 means discard and don't wait.
+If BUFFER is a string, then find or create a buffer with that name,
+then insert the output in that buffer, before point.
 BUFFER can also have the form (REAL-BUFFER STDERR-FILE); in that case,
 REAL-BUFFER says what to do with standard output, as above,
 while STDERR-FILE says what to do with standard error in the child.
 BUFFER can also have the form (REAL-BUFFER STDERR-FILE); in that case,
 REAL-BUFFER says what to do with standard output, as above,
 while STDERR-FILE says what to do with standard error in the child.
@@ -60,7 +65,12 @@ If BUFFER is 0, `call-process' returns immediately with value nil.
 Otherwise it waits for PROGRAM to terminate and returns a numeric exit status
  or a signal description string.
 If you quit, the process is killed with SIGINT, or SIGKILL if you
 Otherwise it waits for PROGRAM to terminate and returns a numeric exit status
  or a signal description string.
 If you quit, the process is killed with SIGINT, or SIGKILL if you
- quit again."
+ quit again.
+
+Coding systems are taken from `coding-system-for-read' for input and
+`coding-system-for-write' for output if those variables are bound.
+Otherwise they are looked up in `process-coding-system-alist'.  If not
+found, they default to `nil' for both input and output."
   (let* ((coding-system-for-read
          (or coding-system-for-read
              (let (ret)
   (let* ((coding-system-for-read
          (or coding-system-for-read
              (let (ret)
@@ -92,6 +102,8 @@ Delete the text if fourth arg DELETEP is non-nil.
 
 Insert output in BUFFER before point; t means current buffer;
  nil for BUFFER means discard it; 0 means discard and don't wait.
 
 Insert output in BUFFER before point; t means current buffer;
  nil for BUFFER means discard it; 0 means discard and don't wait.
+If BUFFER is a string, then find or create a buffer with that name,
+then insert the output in that buffer, before point.
 BUFFER can also have the form (REAL-BUFFER STDERR-FILE); in that case,
 REAL-BUFFER says what to do with standard output, as above,
 while STDERR-FILE says what to do with standard error in the child.
 BUFFER can also have the form (REAL-BUFFER STDERR-FILE); in that case,
 REAL-BUFFER says what to do with standard output, as above,
 while STDERR-FILE says what to do with standard error in the child.
@@ -105,7 +117,12 @@ If BUFFER is 0, returns immediately with value nil.
 Otherwise waits for PROGRAM to terminate
 and returns a numeric exit status or a signal description string.
 If you quit, the process is first killed with SIGINT, then with SIGKILL if
 Otherwise waits for PROGRAM to terminate
 and returns a numeric exit status or a signal description string.
 If you quit, the process is first killed with SIGINT, then with SIGKILL if
-you quit again before the process exits."
+you quit again before the process exits.
+
+Coding systems are taken from `coding-system-for-read' for input and
+`coding-system-for-write' for output if those variables are bound.
+Otherwise they are looked up in `process-coding-system-alist'.  If not
+found, they default to `nil' for both input and output."
   (let ((temp
         (make-temp-name
          (concat (file-name-as-directory (temp-directory)) "emacs"))))
   (let ((temp
         (make-temp-name
          (concat (file-name-as-directory (temp-directory)) "emacs"))))
@@ -145,14 +162,18 @@ you quit again before the process exits."
 Args are NAME BUFFER PROGRAM &rest PROGRAM-ARGS
 NAME is name for process.  It is modified if necessary to make it unique.
 BUFFER is the buffer or (buffer-name) to associate with the process.
 Args are NAME BUFFER PROGRAM &rest PROGRAM-ARGS
 NAME is name for process.  It is modified if necessary to make it unique.
 BUFFER is the buffer or (buffer-name) to associate with the process.
- Process output goes at end of that buffer, unless you specify
- an output stream or filter function to handle the output.
- BUFFER may be also nil, meaning that this process is not associated
- with any buffer
+Process output goes at end of that buffer, unless you specify
+an output stream or filter function to handle the output.
+BUFFER may also be nil, meaning that this process is not associated
+with any buffer.
 Third arg is program file name.  It is searched for as in the shell.
 Remaining arguments are strings to give program as arguments.
 Third arg is program file name.  It is searched for as in the shell.
 Remaining arguments are strings to give program as arguments.
-INCODE and OUTCODE specify the coding-system objects used in input/output
- from/to the process."
+
+Coding systems are taken from `coding-system-for-read' for input and
+`coding-system-for-write' for output if those variables are bound.
+Otherwise they are looked up in `process-coding-system-alist'.  If not
+found, they default to `undecided' for input and `nil' (binary) for
+output."
   (let (cs-r cs-w)
     (let (ret)
       (catch 'found
   (let (cs-r cs-w)
     (let (ret)
       (catch 'found
@@ -195,7 +216,7 @@ See also the function `find-operation-coding-system'.")
 
 (defun open-network-stream (name buffer host service &optional protocol)
   "Open a TCP connection for a service to a host.
 
 (defun open-network-stream (name buffer host service &optional protocol)
   "Open a TCP connection for a service to a host.
-Return a subprocess-object to represent the connection.
+Return a process object to represent the connection.
 Input and output work as for subprocesses; `delete-process' closes it.
 Args are NAME BUFFER HOST SERVICE.
 NAME is name for process.  It is modified if necessary to make it unique.
 Input and output work as for subprocesses; `delete-process' closes it.
 Args are NAME BUFFER HOST SERVICE.
 NAME is name for process.  It is modified if necessary to make it unique.