* smtp.el (smtp-via-smtp): Use `open-network-stream-as-binary' instead of
authoryamaoka <yamaoka>
Tue, 8 Dec 1998 10:13:48 +0000 (10:13 +0000)
committeryamaoka <yamaoka>
Tue, 8 Dec 1998 10:13:48 +0000 (10:13 +0000)
`open-network-stream'.
* pop3.el (pop3-open-server): Likewise.
* nntp.el (nntp-open-network-stream): Likewise.
* gnus-gl.el (bbb-connect-to-bbbd): Likewise.

* nntp.el (nntp-open-rlogin): Enclose `start-process' with `as-binary-process'.
(nntp-open-telnet): Likewise.

* smtp.el (smtp-coding-system): Abolished.

* nntp.el (nntp-coding-system-for-write): Abolished.
(nntp-coding-system-for-read): Abolished.

* nntp.el: Don't require `tcp'.
* nndb.el: Likewise.

lisp/gnus-gl.el
lisp/nndb.el
lisp/nntp.el
lisp/pop3.el
lisp/smtp.el

index 93ef915..de68a6d 100644 (file)
@@ -257,7 +257,8 @@ If this times out we give up and assume that something has died..." )
   (catch 'done
     (condition-case error
        (setq grouplens-bbb-process
-             (open-network-stream "BBBD" grouplens-bbb-buffer host port))
+             (open-network-stream-as-binary
+              "BBBD" grouplens-bbb-buffer host port))
       (error (gnus-message 3 "Error: Failed to connect to BBB")
             nil))
     (and (null grouplens-bbb-process)
index 0a0f3ef..007d8e5 100644 (file)
 (eval-when-compile (require 'cl))
 
 (eval-and-compile
-  (unless (fboundp 'open-network-stream)
-    (require 'tcp)))
-
-(eval-when-compile (require 'cl))
-
-(eval-and-compile
   (autoload 'news-setup "rnewspost")
   (autoload 'news-reply-mode "rnewspost")
   (autoload 'cancel-timer "timer")
index 9c5523d..d7665b5 100644 (file)
 
 (nnoo-declare nntp)
 
-(eval-and-compile
-  (unless (fboundp 'open-network-stream)
-    (require 'tcp)))
-
 (eval-when-compile (require 'cl))
 
 (defvoo nntp-address nil
@@ -154,12 +150,6 @@ server there that you can connect to.  See also
 (defvoo nntp-warn-about-losing-connection t
   "*If non-nil, beep when a server closes connection.")
 
-(defvoo nntp-coding-system-for-read 'binary
-  "*Coding system to read from NNTP.")
-
-(defvoo nntp-coding-system-for-write 'binary
-  "*Coding system to write to NNTP.")
-
 (defcustom nntp-authinfo-file "~/.authinfo"
   ".netrc-like file that holds nntp authinfo passwords."
   :type
@@ -847,9 +837,7 @@ password contained in '~/.nntp-authinfo'."
                     (kill-buffer ,pbuffer))))))
         (process
          (condition-case ()
-             (let ((coding-system-for-read nntp-coding-system-for-read)
-                    (coding-system-for-write nntp-coding-system-for-write))
-               (funcall nntp-open-connection-function pbuffer))
+             (funcall nntp-open-connection-function pbuffer)
            (error nil)
            (quit nil))))
     (when timer 
@@ -875,7 +863,8 @@ password contained in '~/.nntp-authinfo'."
        nil))))
 
 (defun nntp-open-network-stream (buffer)
-  (open-network-stream "nntpd" buffer nntp-address nntp-port-number))
+  (open-network-stream-as-binary
+   "nntpd" buffer nntp-address nntp-port-number))
 
 (defun nntp-open-ssl-stream (buffer)
   (let* ((ssl-program-arguments '("-connect" (concat host ":" service)))
@@ -1174,9 +1163,10 @@ password contained in '~/.nntp-authinfo'."
   (save-excursion
     (set-buffer buffer)
     (erase-buffer)
-    (let ((proc (apply
-                'start-process
-                "nntpd" buffer nntp-telnet-command nntp-telnet-switches))
+    (let ((proc (as-binary-process
+                (apply
+                 'start-process
+                 "nntpd" buffer nntp-telnet-command nntp-telnet-switches)))
          (case-fold-search t))
       (when (memq (process-status proc) '(open run))
        (process-send-string proc "set escape \^X\n")
@@ -1221,13 +1211,15 @@ password contained in '~/.nntp-authinfo'."
 (defun nntp-open-rlogin (buffer)
   "Open a connection to SERVER using rsh."
   (let ((proc (if nntp-rlogin-user-name
-                 (apply 'start-process
-                        "nntpd" buffer nntp-rlogin-program
-                        nntp-address "-l" nntp-rlogin-user-name
-                        nntp-rlogin-parameters)
-               (apply 'start-process
-                      "nntpd" buffer nntp-rlogin-program nntp-address
-                      nntp-rlogin-parameters))))
+                 (as-binary-process
+                  (apply 'start-process
+                         "nntpd" buffer nntp-rlogin-program
+                         nntp-address "-l" nntp-rlogin-user-name
+                         nntp-rlogin-parameters))
+               (as-binary-process
+                (apply 'start-process
+                       "nntpd" buffer nntp-rlogin-program nntp-address
+                       nntp-rlogin-parameters)))))
     (save-excursion
       (set-buffer buffer)
       (nntp-wait-for-string "^\r*20[01]")
index 55c2f65..7bfe466 100644 (file)
@@ -115,17 +115,14 @@ Used for APOP authentication.")
 Returns the process associated with the connection."
   (let ((process-buffer
         (get-buffer-create (format "trace of POP session to %s" mailhost)))
-       (process)
-       (coding-system-for-read 'binary)   ;; because 0000n0000 S000l 0a0
-       (coding-system-for-write 'binary)  ;; is st00pid
-       )
+       (process))
     (save-excursion
       (set-buffer process-buffer)
       (erase-buffer)
       (setq pop3-read-point (point-min))
       )
     (setq process
-         (open-network-stream "POP" process-buffer mailhost port))
+         (open-network-stream-as-binary "POP" process-buffer mailhost port))
     (let ((response (pop3-read-response process t)))
       (setq pop3-timestamp
            (substring response (or (string-match "<" response) 0)
index 3d2e113..1954200 100644 (file)
@@ -57,11 +57,6 @@ don't define this value."
   :type 'boolean
   :group 'smtp)
 
-(defcustom smtp-coding-system 'binary
-  "*Coding-system for SMTP output."
-  :type 'coding-system
-  :group 'smtp)
-
 
 (defun smtp-fqdn ()
   (if smtp-local-domain
@@ -75,9 +70,7 @@ don't define this value."
        response-code
        greeting
        process-buffer
-       (supported-extensions '())
-       (coding-system-for-read smtp-coding-system)
-       (coding-system-for-write smtp-coding-system))
+       (supported-extensions '()))
     (unwind-protect
        (catch 'done
          ;; get or create the trace buffer
@@ -91,7 +84,8 @@ don't define this value."
            (erase-buffer))
 
          ;; open the connection to the server
-         (setq process (open-network-stream "SMTP" process-buffer host port))
+         (setq process (open-network-stream-as-binary
+                        "SMTP" process-buffer host port))
          (and (null process) (throw 'done nil))
 
          ;; set the send-filter