(=daikanwa): Renamed from `ideograph-daikanwa'.
[chise/xemacs-chise.git.1] / lisp / code-process.el
index 526639d..09279c8 100644 (file)
 
 ;;; Code:
 
 
 ;;; Code:
 
-(eval-when-compile
-  (defvar buffer-file-type)
-  (defvar binary-process-output))
-
 (defvar process-coding-system-alist nil
   "Alist to decide a coding system to use for a process I/O operation.
 The format is ((PATTERN . VAL) ...),
 (defvar process-coding-system-alist nil
   "Alist to decide a coding system to use for a process I/O operation.
 The format is ((PATTERN . VAL) ...),
@@ -112,8 +108,7 @@ If you quit, the process is first killed with SIGINT, then with SIGKILL if
 you quit again before the process exits."
   (let ((temp
         (make-temp-name
 you quit again before the process exits."
   (let ((temp
         (make-temp-name
-         (concat (file-name-as-directory (temp-directory))
-                 (if (memq system-type '(ms-dos windows-nt)) "em" "emacs")))))
+         (concat (file-name-as-directory (temp-directory)) "emacs"))))
     (unwind-protect
        (let (cs-r cs-w)
          (let (ret)
     (unwind-protect
        (let (cs-r cs-w)
          (let (ret)
@@ -130,6 +125,9 @@ you quit again before the process exits."
            (cond ((consp ret)
                   (setq cs-r (car ret)
                         cs-w (cdr ret)))
            (cond ((consp ret)
                   (setq cs-r (car ret)
                         cs-w (cdr ret)))
+                 ((null ret)
+                  (setq cs-r buffer-file-coding-system
+                        cs-w buffer-file-coding-system))
                  ((find-coding-system ret)
                   (setq cs-r ret
                         cs-w ret))))
                  ((find-coding-system ret)
                   (setq cs-r ret
                         cs-w ret))))
@@ -137,10 +135,7 @@ you quit again before the process exits."
                 (or coding-system-for-read cs-r))
                (coding-system-for-write
                 (or coding-system-for-write cs-w)))
                 (or coding-system-for-read cs-r))
                (coding-system-for-write
                 (or coding-system-for-write cs-w)))
-           (if (memq system-type '(ms-dos windows-nt))
-               (let ((buffer-file-type binary-process-output))
-                 (write-region start end temp nil 'silent))
-             (write-region start end temp nil 'silent))
+           (write-region start end temp nil 'silent)
            (if deletep (delete-region start end))
            (apply #'call-process program temp buffer displayp args)))
       (ignore-file-errors (delete-file temp)))))
            (if deletep (delete-region start end))
            (apply #'call-process program temp buffer displayp args)))
       (ignore-file-errors (delete-file temp)))))
@@ -200,7 +195,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.
@@ -216,7 +211,7 @@ Fifth argument PROTOCOL is a network protocol.  Currently 'tcp
  (Transmission Control Protocol) and 'udp (User Datagram Protocol) are
  supported.  When omitted, 'tcp is assumed.
 
  (Transmission Control Protocol) and 'udp (User Datagram Protocol) are
  supported.  When omitted, 'tcp is assumed.
 
-Ouput via `process-send-string' and input via buffer or filter (see
+Output via `process-send-string' and input via buffer or filter (see
 `set-process-filter') are stream-oriented.  That means UDP datagrams are
 not guaranteed to be sent and received in discrete packets. (But small
 datagrams around 500 bytes that are not truncated by `process-send-string'
 `set-process-filter') are stream-oriented.  That means UDP datagrams are
 not guaranteed to be sent and received in discrete packets. (But small
 datagrams around 500 bytes that are not truncated by `process-send-string'
@@ -257,4 +252,4 @@ lost packets."
           (or coding-system-for-write cs-w)))
       (open-network-stream-internal name buffer host service protocol))))
 
           (or coding-system-for-write cs-w)))
       (open-network-stream-internal name buffer host service protocol))))
 
-;;; mule-process.el ends here
+;;; code-process.el ends here