Function: mh-insert-x-mailer
mh-insert-x-mailer is a byte-compiled function defined in
mh-comp.el.gz.
Signature
(mh-insert-x-mailer)
Documentation
Append an X-Mailer field to the header.
The versions of MH-E, Emacs, and MH are shown.
Source Code
;; Defined in /usr/src/emacs/lisp/mh-e/mh-comp.el.gz
(defun mh-insert-x-mailer ()
"Append an X-Mailer field to the header.
The versions of MH-E, Emacs, and MH are shown."
(or mh-variant-in-use (mh-variant-set mh-variant))
;; Lazily initialize mh-x-mailer-string.
(when (and mh-insert-x-mailer-flag (null mh-x-mailer-string))
(setq mh-x-mailer-string
(format "MH-E %s; %s; %sEmacs %s"
mh-version mh-variant-in-use
(if (featurep 'xemacs) "X" "GNU ")
(cond ((not (featurep 'xemacs))
(string-match "[0-9]+\\.[0-9]+\\(\\.[0-9]+\\)?"
emacs-version)
(match-string 0 emacs-version))
((string-match "[0-9.]*\\( +([ a-z]+[0-9]+)\\)?"
emacs-version)
(match-string 0 emacs-version))
(t (format "%s.%s" emacs-major-version
emacs-minor-version))))))
;; Insert X-Mailer, but only if it doesn't already exist.
(save-excursion
(when (and mh-insert-x-mailer-flag
(null (mh-goto-header-field "X-Mailer")))
(mh-insert-fields "X-Mailer:" mh-x-mailer-string))))