Synch to No Gnus 200501120840.
[elisp/gnus.git-] / lisp / gnus-msg.el
index 50c625c..7a5558e 100644 (file)
@@ -1119,52 +1119,14 @@ If SILENT, don't prompt the user."
      (t gnus-select-method))))
 
 \f
-;; Dummies to avoid byte-compile warning.
-(eval-when-compile
-  (defvar xemacs-codename))
-
-(defun gnus-message-make-user-agent (&optional include-mime-info max-column
-                                                newline-product)
-  "Return a user-agent info.  If INCLUDE-MIME-INFO is non-nil and the
-variable `mime-edit-user-agent-value' is bound, the value will be
-included in the return value, and `gnus-user-agent' is ignored.  If
-MAX-COLUMN is specified, the return value will be folded up as it were
-filled.  NEWLINE-PRODUCT specifies whether a newline should be
-inserted in front of each product-token.  If the value is t or `hard',
-it works strictly.  Otherwise, if it is non-nil (e.g. `soft'), it
-works semi-strictly.
-
-Here is an odd example, which inserts a User-Agent: header when you
-begin to compose a message:
-
-\(add-hook 'gnus-message-setup-hook
-         (lambda nil
-           (setq message-user-agent nil)
-           (save-excursion
-             (save-restriction
-               (message-narrow-to-headers)
-               (goto-char (point-max))
-               (insert \"User-Agent: \"
-                       (gnus-message-make-user-agent t 76 'soft)
-                       \"\\n\")))))
-"
-  (let ((gnus-v (gnus-extended-version))
-       user-agent)
-    (cond ((and include-mime-info
-               (boundp 'mime-edit-user-agent-value))
-          (setq user-agent (concat gnus-v " " mime-edit-user-agent-value)))
-         ((eq gnus-user-agent 'gnus-mime-edit)
-          (setq user-agent
-                (if (boundp 'mime-edit-user-agent-value)
-                    (concat gnus-v " " mime-edit-user-agent-value)
-                  gnus-v)))
-         (t
-          (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))))))))
+(defun gnus-message-make-user-agent (&optional dummy max-column
+                                              newline-product)
+  "Return a user-agent info.  If MAX-COLUMN is specified, the return
+value will be folded up as it were filled.  NEWLINE-PRODUCT specifies
+whether a newline should be inserted in front of each product-token;
+if the value is t or `hard', it works strictly.  Otherwise, if it is
+non-nil (e.g. `soft'), it works semi-strictly."
+  (let ((user-agent (gnus-extended-version)))
     (when max-column
       (unless (natnump max-column)
        (setq max-column 76))