From: kaoru Date: Wed, 18 Oct 2000 03:07:49 +0000 (+0000) Subject: * wl-version.el (wl-generate-user-agent-string-1): New function. X-Git-Tag: wl-2_4-root~131 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=9c1cf89e641be8eb9d69789f13cf643bdc5b0eb5;p=elisp%2Fwanderlust.git * wl-version.el (wl-generate-user-agent-string-1): New function. (wl-generate-user-agent-string): Use it. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 31dba8c..70876fc 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -5,6 +5,9 @@ wl-extended-emacs-version3): Remove `interactive'. Fixed docstring. + * wl-version.el (wl-generate-user-agent-string-1): New function. + (wl-generate-user-agent-string): Use it. + 2000-10-18 Kenichi OKADA * wl-expire.el (wl-summary-expire): Fix. diff --git a/wl/wl-version.el b/wl/wl-version.el index 752c06a..eff1203 100644 --- a/wl/wl-version.el +++ b/wl/wl-version.el @@ -73,17 +73,20 @@ If ARG insert string at point." (defun wl-generate-user-agent-string () "A candidate of `wl-generate-mailer-string-func'. Insert User-Agent field instead of X-Mailer field." + (concat "User-Agent: " (wl-generate-user-agent-string-1 t))) + +(defun wl-generate-user-agent-string-1 (&optional verbose) + "Return User-Agent field value." (let ((mime-user-agent (and (boundp 'mime-edit-insert-user-agent-field) mime-edit-insert-user-agent-field mime-edit-user-agent-value))) - (if mime-user-agent - (concat "User-Agent: " - (product-string-verbose 'wl-version) " " + (if (and verbose mime-user-agent) + (concat (product-string-verbose 'wl-version) " " mime-user-agent) - (if (and (boundp 'mime-editor/version) + (if (and verbose + (boundp 'mime-editor/version) mime-editor/version) - (concat "User-Agent: " - (product-string-verbose 'wl-version) " " + (concat (product-string-verbose 'wl-version) " " "tm/" mime-editor/version (if (and (boundp 'mime-editor/codename) mime-editor/codename) @@ -103,7 +106,7 @@ Insert User-Agent field instead of X-Mailer field." (file-error nil)) " " (wl-extended-emacs-version3 "/" t)) ;; Don't use product-string-verbose for short User-Agent field. - (concat "User-Agent: " (product-string-1 'wl-version t) " " + (concat (product-string-1 'wl-version t) " " (wl-extended-emacs-version3 "/" t)))))) ;; from gnus