* gnus-spec.el (gnus-correct-substring): Take optional END.
[gnus] / lisp / nntp.el
index 39ed314..c82285f 100644 (file)
@@ -394,7 +394,7 @@ noticing asynchronous data.")
          (set-buffer buffer)
          (goto-char pos)
          (if (looking-at (regexp-quote command))
-             (delete-region pos (progn (forward-line 1) (point-at-bol))))
+             (delete-region pos (progn (forward-line 1) (gnus-point-at-bol))))
          )))
     ))
 
@@ -414,7 +414,7 @@ noticing asynchronous data.")
          (set-buffer buffer)
          (goto-char pos)
          (if (looking-at (regexp-quote command))
-             (delete-region pos (progn (forward-line 1) (point-at-bol))))
+             (delete-region pos (progn (forward-line 1) (gnus-point-at-bol))))
          )))
     ))
 
@@ -439,7 +439,7 @@ noticing asynchronous data.")
          (set-buffer buffer)
          (goto-char pos)
          (if (looking-at (regexp-quote command))
-             (delete-region pos (progn (forward-line 1) (point-at-bol))))
+             (delete-region pos (progn (forward-line 1) (gnus-point-at-bol))))
          )))
     ))
 
@@ -492,7 +492,7 @@ noticing asynchronous data.")
             (not nntp-nov-is-evil)
             (nntp-retrieve-headers-with-xover articles fetch-old))
        ;; We successfully retrieved the headers via XOVER.
-        'nov
+       'nov
       ;; XOVER didn't work, so we do it the hard, slow and inefficient
       ;; way.
       (let ((number (length articles))
@@ -817,11 +817,22 @@ noticing asynchronous data.")
   (nntp-possibly-change-group nil server)
   (save-excursion
     (set-buffer nntp-server-buffer)
-    (prog1
-       (nntp-send-command
-        "^\\.\r?\n" "NEWGROUPS"
-        (format-time-string "%y%m%d %H%M%S" (date-to-time date)))
-      (nntp-decode-text))))
+    (let* ((time (date-to-time date))
+          (ls (- (cadr time) (nth 8 (decode-time time)))))
+      (cond ((< ls 0)
+            (setcar time (1- (car time)))
+            (setcar (cdr time) (+ ls 65536)))
+           ((>= ls 65536)
+            (setcar time (1+ (car time)))
+            (setcar (cdr time) (- ls 65536)))
+           (t
+            (setcar (cdr time) ls)))
+      (prog1
+         (nntp-send-command
+          "^\\.\r?\n" "NEWGROUPS"
+          (format-time-string "%y%m%d %H%M%S" time)
+          "GMT")
+       (nntp-decode-text)))))
 
 (deffoo nntp-request-post (&optional server)
   (nntp-possibly-change-group nil server)
@@ -940,7 +951,7 @@ password contained in '~/.nntp-authinfo'."
         (process
          (condition-case ()
              (let ((coding-system-for-read nntp-coding-system-for-read)
-                    (coding-system-for-write nntp-coding-system-for-write))
+                   (coding-system-for-write nntp-coding-system-for-write))
                (funcall nntp-open-connection-function pbuffer))
            (error nil)
            (quit
@@ -975,8 +986,7 @@ password contained in '~/.nntp-authinfo'."
   (open-network-stream "nntpd" buffer nntp-address nntp-port-number))
 
 (defun nntp-open-ssl-stream (buffer)
-  (let* ((ssl-program-arguments '("-connect" (concat host ":" service)))
-        (proc (open-ssl-stream "nntpd" buffer nntp-address nntp-port-number)))
+  (let ((proc (open-ssl-stream "nntpd" buffer nntp-address nntp-port-number)))
     (save-excursion
       (set-buffer buffer)
       (nntp-wait-for-string "^\r*20[01]")