From 43ce2e6bfb127be18f09e607e93f4e2b40b44f65 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Mon, 20 Oct 2003 23:39:15 +0000 Subject: [PATCH] Synch to Gnus 200310202303. --- lisp/ChangeLog | 19 +++++++++++++++++++ lisp/gnus-msg.el | 44 ++++---------------------------------------- lisp/gnus-util.el | 40 ++++++++++++++++++++++++++++++++++++++++ lisp/spam-report.el | 7 ++++--- 4 files changed, 67 insertions(+), 43 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 04a6a81..586dc2f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,20 @@ +2003-10-20 Katsumi Yamaoka + + * 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 + + * 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 * message.el (message-mode-field-menu): Added @@ -7,6 +24,8 @@ 2003-10-19 Lars Magne Ingebrigtsen + * gnus-sum.el (gnus-nov-parse-line): Remove condition-cases. + * mml.el (mml-insert-mime): Quote mml. 2003-10-19 Katsumi Yamaoka diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 7ee3e30..f50a1f0 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -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 diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index bd64337..f111e0c 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -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 diff --git a/lisp/spam-report.el b/lisp/spam-report.el index 0f546aa..cde38f8 100644 --- a/lisp/spam-report.el +++ b/lisp/spam-report.el @@ -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 -- 1.7.10.4