Synch to Gnus 200310202303.
authoryamaoka <yamaoka>
Mon, 20 Oct 2003 23:39:15 +0000 (23:39 +0000)
committeryamaoka <yamaoka>
Mon, 20 Oct 2003 23:39:15 +0000 (23:39 +0000)
lisp/ChangeLog
lisp/gnus-msg.el
lisp/gnus-util.el
lisp/spam-report.el

index 04a6a81..586dc2f 100644 (file)
@@ -1,3 +1,20 @@
+2003-10-20  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-msg.el (nnspool-rejected-article-hook): Remove defvar.
+       (xemacs-codename): Move defvar to gnus-util.el.
+
+       * gnus-util.el (xemacs-codename): Defvar when compiling.
+
+2003-10-20  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * spam-report.el (spam-report-url-ping-plain): Include a
+       User-Agent. 
+
+       * gnus-msg.el (gnus-extended-version): Use it.
+
+       * gnus-util.el (gnus-emacs-version): Separated out into own
+       function. 
+
 2003-10-19  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * message.el (message-mode-field-menu): Added
@@ -7,6 +24,8 @@
 
 2003-10-19  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-sum.el (gnus-nov-parse-line): Remove condition-cases.
+
        * mml.el (mml-insert-mime): Quote mml.
 
 2003-10-19  Katsumi Yamaoka  <yamaoka@jpl.org>
index 7ee3e30..f50a1f0 100644 (file)
@@ -1165,46 +1165,10 @@ begin to compose a message:
                     (concat gnus-v " " mime-edit-user-agent-value)
                   gnus-v)))
          (t
-          (let* ((system-v
-                  (cond
-                   ((eq gnus-user-agent 'emacs-gnus-config)
-                    system-configuration)
-                   ((eq gnus-user-agent 'emacs-gnus-type)
-                    (symbol-name system-type))
-                   (t nil)))
-                 (emacs-v
-                  (cond
-                   ((eq gnus-user-agent 'gnus)
-                    nil)
-                   ((string-match "^\\(\\([.0-9]+\\)*\\)\\.[0-9]+$"
-                                  emacs-version)
-                    (concat (format (if (boundp 'MULE)
-                                        "Mule/2.3 (based on Emacs %s)"
-                                      "Emacs/%s")
-                                    (match-string 1 emacs-version))
-                            (if system-v
-                                (concat " (" system-v ")")
-                              "")))
-                   ((string-match
-                     "\\([A-Z]*[Mm][Aa][Cc][Ss]\\)[^(]*\\(\\((beta.*)\\|'\\)\\)?"
-                     emacs-version)
-                    (concat
-                     (match-string 1 emacs-version)
-                     (format "/%d.%d" emacs-major-version emacs-minor-version)
-                     (if (match-beginning 3)
-                         (match-string 3 emacs-version)
-                       "")
-                     (if (boundp 'xemacs-codename)
-                         (concat
-                          " (" xemacs-codename
-                          (if system-v
-                              (concat ", " system-v ")")
-                            ")"))
-                       "")))
-                   (t emacs-version))))
-            (setq user-agent (if (stringp gnus-user-agent)
-                                 gnus-user-agent
-                               (concat gnus-v
+          (setq user-agent (if (stringp gnus-user-agent)
+                               gnus-user-agent
+                             (concat gnus-v
+                                     (let ((emacs-v (gnus-emacs-version)))
                                        (when emacs-v
                                          (concat " " emacs-v))))))))
     (when max-column
index bd64337..f111e0c 100644 (file)
@@ -1493,6 +1493,46 @@ predicate on the elements."
          (push (pop list1) res)))
       (nconc (nreverse res) list1 list2))))
 
+(eval-when-compile
+  (defvar xemacs-codename))
+
+(defun gnus-emacs-version ()
+  (let ((system-v
+        (cond
+         ((eq gnus-user-agent 'emacs-gnus-config)
+          system-configuration)
+         ((eq gnus-user-agent 'emacs-gnus-type)
+          (symbol-name system-type))
+         (t nil))))
+    (cond
+     ((eq gnus-user-agent 'gnus)
+      nil)
+     ((string-match "^\\(\\([.0-9]+\\)*\\)\\.[0-9]+$" emacs-version)
+      (concat (format (if (boundp 'MULE)
+                         "Mule/2.3 (based on Emacs %s)"
+                       "Emacs/%s")
+                     (match-string 1 emacs-version))
+             (if system-v
+                 (concat " (" system-v ")")
+               "")))
+     ((string-match
+       "\\([A-Z]*[Mm][Aa][Cc][Ss]\\)[^(]*\\(\\((beta.*)\\|'\\)\\)?"
+       emacs-version)
+      (concat
+       (match-string 1 emacs-version)
+       (format "/%d.%d" emacs-major-version emacs-minor-version)
+       (if (match-beginning 3)
+          (match-string 3 emacs-version)
+        "")
+       (if (boundp 'xemacs-codename)
+          (concat
+           " (" xemacs-codename
+           (if system-v
+               (concat ", " system-v ")")
+             ")"))
+        "")))
+     (t emacs-version))))
+
 (provide 'gnus-util)
 
 ;;; gnus-util.el ends here
index 0f546aa..cde38f8 100644 (file)
@@ -108,9 +108,10 @@ the function specified by `spam-report-url-ping-function'."
                 80))
          (error "Could not open connection to %s" host))
       (set-marker (process-mark tcp-connection) (point-min))
-      (process-send-string tcp-connection
-                          (format "GET %s HTTP/1.1\nHost: %s\n\n"
-                                  report host)))))
+      (process-send-string
+       tcp-connection
+       (format "GET %s HTTP/1.1\nUser-Agent: %s (spam-report.el)\nHost: %s\n\n"
+              report (gnus-emacs-version) host)))))
 
 (defun spam-report-url-ping-mm-url (host report)
   "Ping a host through HTTP, addressing a specific GET resource. Use