]> code.delx.au - gnu-emacs/blobdiff - lisp/gnus/nntp.el
Comment fix.
[gnu-emacs] / lisp / gnus / nntp.el
index 0cca4cc32e6ae64f6ceaf148943b3bb92200180c..4067d566eb65cd6400ebb5be8cf7885479ceda1d 100644 (file)
@@ -150,8 +150,11 @@ server there that you can connect to.  See also `nntp-open-connection-function'"
   "*If non-nil, beep when a server closes connection.")
 
 ;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
-(defvoo nntp-coding-system-for-read nil
-  "*coding-system for read from NNTP.")
+(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.")
 
 \f
 
@@ -750,7 +753,8 @@ This function is supposed to be called from `nntp-server-opened-hook'."
         (process
          (condition-case ()
              ;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
-             (let ((coding-system-for-read nntp-coding-system-for-read))
+             (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))
            (error nil)
            (quit nil))))
@@ -902,7 +906,12 @@ This function is supposed to be called from `nntp-server-opened-hook'."
       (insert "\n"))
     ;; Insert `.' at end of buffer (end of text mark).
     (goto-char (point-max))
-    (insert "." nntp-end-of-line)))
+    (insert ".\n")
+    (goto-char (point-min))
+    (while (not (eobp))
+      (end-of-line)
+      (delete-char 1)
+      (insert nntp-end-of-line))))
 
 (defun nntp-retrieve-headers-with-xover (articles &optional fetch-old)
   (set-buffer nntp-server-buffer)