Index: texi/gnus.texi =================================================================== RCS file: /usr/local/cvsroot/gnus/texi/gnus.texi,v retrieving revision 6.427 diff -u -r6.427 gnus.texi --- texi/gnus.texi 24 Feb 2003 02:01:01 -0000 6.427 +++ texi/gnus.texi 24 Feb 2003 16:58:03 -0000 @@ -11183,13 +11183,17 @@ lists will work most of the time. Posting to these groups (@kbd{a}) is still a pain, though. -@item gnus-version-expose-system -@vindex gnus-version-expose-system +@item gnus-user-agent +@vindex gnus-user-agent +@cindex User-Agent -Your system type (@code{system-configuration} variable, such as -@samp{i686-pc-linux}) is exposed in the auto-generated by default -User-Agent header. Sometimes, it may be desireable (mostly because of -aesthetic reasons) to turn it off. In this case, set it to @code{nil}. +This variable controls which information should be exposed in the +User-Agent header. It can be one of the symbols @code{full} (show full +information, i.e. Emacs and Gnus version and system configuration), +@code{emacs-gnus} (show only Emacs and Gnus version), +@code{emacs-gnus-type} (same as @code{emacs-gnus} plus system type), +@code{gnus} (show only Gnus version) or a custom string. If you set it +to a string, be sure to use a valid format, see RFC 2616. @end table Index: texi/ChangeLog =================================================================== RCS file: /usr/local/cvsroot/gnus/texi/ChangeLog,v retrieving revision 6.464 diff -u -r6.464 ChangeLog --- texi/ChangeLog 24 Feb 2003 03:16:20 -0000 6.464 +++ texi/ChangeLog 24 Feb 2003 16:58:03 -0000 @@ -1,3 +1,8 @@ +2003-02-24 Reiner Steib + + * gnus.texi (Mail and Post): Added `gnus-user-agent', removed + `gnus-version-expose-system'. + 2003-02-24 Jesper Harder * gnus.texi: Markup fixes. Index: lisp/gnus-msg.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/gnus-msg.el,v retrieving revision 6.121 diff -u -r6.121 gnus-msg.el --- lisp/gnus-msg.el 23 Feb 2003 12:32:18 -0000 6.121 +++ lisp/gnus-msg.el 24 Feb 2003 16:58:03 -0000 @@ -283,10 +283,21 @@ :group 'gnus-message :type 'boolean) -(defcustom gnus-version-expose-system nil - "If non-nil, `system-configuration' is exposed in `gnus-extended-version'." +(defcustom gnus-user-agent 'full + "Which information should be exposed in the User-Agent header. + +It can be one of the symbols `full' \(show full information, i.e. Emacs and +Gnus version and system configuration\), `emacs-gnus' \(show only Emacs and +Gnus version\), `emacs-gnus-type' \(same as `emacs-gnus' plus system type\), +`gnus' \(show only Gnus version\) or a custom string. If you set it to a +string, be sure to use a valid format, see RFC 2616." :group 'gnus-message - :type 'boolean) + :type '(choice (item :tag "Show full info" full) + (item :tag "Show Gnus and Emacs versions and system type" + emacs-gnus-type) + (item :tag "Show Gnus and Emacs versions" emacs-gnus) + (item :tag "Show only Gnus version" gnus) + (string :tag "Other"))) ;;; Internal variables. @@ -1026,31 +1037,51 @@ (defvar xemacs-codename)) (defun gnus-extended-version () - "Stringified Gnus version and Emacs version." + "Stringified Gnus version and Emacs version. +See the variable `gnus-user-agent'." (interactive) - (concat - "Gnus/" (gnus-prin1-to-string (gnus-continuum-version gnus-version)) - " (" gnus-version ")" - " " - (cond - ((string-match "^\\(\\([.0-9]+\\)*\\)\\.[0-9]+$" emacs-version) - (concat "Emacs/" (match-string 1 emacs-version) - (if gnus-version-expose-system - " (" system-configuration ")" - ""))) - ((string-match "\\([A-Z]*[Mm][Aa][Cc][Ss]\\)[^(]*\\(\\((beta.*)\\|'\\)\\)?" - emacs-version) - (concat (match-string 1 emacs-version) + (let* ((gnus-v + (concat "Gnus/" + (prin1-to-string (gnus-continuum-version gnus-version) t) + " (" gnus-version ")")) + (system-v + (cond + ((eq gnus-user-agent 'full) + 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 "Emacs/" (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) - (if gnus-version-expose-system - (concat " (" xemacs-codename ", " system-configuration ")") - (concat " (" xemacs-codename ")")) - ""))) - (t emacs-version)))) + (concat + " (" xemacs-codename + (if system-v + (concat ", " system-v ")") + ")")) + ""))) + (t emacs-version)))) + (if (stringp gnus-user-agent) + gnus-user-agent + (concat gnus-v + (when emacs-v + (concat " " emacs-v)))))) ;;; Index: lisp/ChangeLog =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/ChangeLog,v retrieving revision 6.2043 diff -u -r6.2043 ChangeLog --- lisp/ChangeLog 24 Feb 2003 16:20:06 -0000 6.2043 +++ lisp/ChangeLog 24 Feb 2003 16:58:03 -0000 @@ -1,3 +1,10 @@ +2003-02-24 Reiner Steib + + * gnus-msg.el (gnus-user-agent): New variable. + (gnus-version-expose-system): Removed. Obsoleted by + `gnus-user-agent'. + (gnus-extended-version): Use `gnus-user-agent'. + 2003-02-24 Ted Zlatanov From Michael Shields