From: steve@miranova.com (Steven L. Baur)
Subject: [sgnus 0.16] Enhancement for mail/post
Date: 01 Dec 1995 22:23:21 -0800 [thread overview]
Message-ID: <m2hgzkvvae.fsf@diana.miranova.com> (raw)
Why don't the X-Mailer: and X-Newsreader: headers include the Emacs
version as well? Inquiring minds want to know!
--- ChangeLog~ Tue Nov 28 23:23:14 1995
+++ ChangeLog Fri Dec 1 21:23:00 1995
@@ -1,3 +1,10 @@
+Fri Dec 1 21:21:18 1995 Steven L. Baur <steve@miranova.com>
+
+ * gnus-msg.el (gnus-inews-insert-headers): Call new function for
+ value of X-Newsreader:, and X-Mailer: headers
+ (gnus-extended-version): New function returning a string with Gnus
+ version + Emacs version
+
Sun Nov 26 14:46:55 1995 Steven L. Baur <steve@diana.miranova.com>
* gnus.el (gnus-summary-edit-article): force read of articles
--- 1.2 1995/11/26 04:08:52
+++ gnus-msg.el 1995/12/02 05:18:00
@@ -1030,7 +1030,27 @@
(delete-region (progn (beginning-of-line) (point))
(progn (forward-line 1) (point))))
(setq headers (cdr headers)))))
-
+
+;;; Since the X-Newsreader/X-Mailer are ``vanity'' headers, they might
+;;; as well include the Emacs version as well.
+;;; The following function works with later GNU Emacs, and XEmacs.
+(defun gnus-extended-version ()
+ "Stringified Gnus version and Emacs version"
+ (interactive)
+ (concat gnus-version
+ "/"
+ (cond
+ ((string-match "^\\([0-9]+\\.[0-9]+\\)\\.[0-9]+$" emacs-version)
+ (concat "Emacs " (substring emacs-version
+ (match-beginning 1)
+ (match-end 1))))
+ ((string-match "\\([A-Z]*[Mm][Aa][Cc][Ss]\\)" emacs-version)
+ (concat (substring emacs-version
+ (match-beginning 1)
+ (match-end 1))
+ (format " %d.%d" emacs-major-version emacs-minor-version)))
+ (t emacs-version))))
+
(defun gnus-inews-insert-headers (&optional headers)
"Prepare article headers.
Headers already prepared in the buffer are not modified.
@@ -1046,8 +1066,8 @@
(To nil)
(Distribution nil)
(Lines (gnus-inews-lines))
- (X-Newsreader gnus-version)
- (X-Mailer gnus-version)
+ (X-Newsreader (gnus-extended-version))
+ (X-Mailer (gnus-extended-version))
(headers (or headers gnus-required-headers))
(case-fold-search t)
header value elem)
--
steve@miranova.com baur
reply other threads:[~1995-12-02 6:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2hgzkvvae.fsf@diana.miranova.com \
--to=steve@miranova.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).