From: Karl Kleinpaste <karl@jprc.com>
Subject: Better NOV extra handling in p0.40 [patch]
Date: 30 Oct 1998 14:10:20 -500 [thread overview]
Message-ID: <vxkemrpyig3.fsf@pocari-sweat.jprc.com> (raw)
This updates the previous trivial bugfix patch in nnheader-parse-nov
to do Something Real, to use a "-nov-field"-like macro to get it, and
to be prepared to use that result in -insert-nov.
--- ChangeLog~ Sun Oct 25 17:13:15 1998
+++ ChangeLog Fri Oct 30 14:05:05 1998
@@ -0,0 +1,6 @@
+1998-10-30 Karl Kleinpaste <karl@jprc.com>
+
+ * nnheader.el (nnheader-nov-remainder): New macro.
+ (nnheader-parse-nov): Use it.
+ (nnheader-insert-nov): Handle new string case of extra.
+
--- nnheader.el.orig Fri Oct 30 13:54:31 1998
+++ nnheader.el Fri Oct 30 14:03:05 1998
@@ -290,6 +290,9 @@
(defmacro nnheader-nov-field ()
'(buffer-substring (point) (if (nnheader-nov-skip-field) (1- (point)) eol)))
+(defmacro nnheader-nov-remainder ()
+ '(buffer-substring (point) (if (search-forward "\n" eol 'move) (1- (point)) eol)))
+
(defmacro nnheader-nov-read-integer ()
'(prog1
(if (eq (char-after) ?\t)
@@ -313,7 +316,9 @@
(if (eq (char-after) ?\n)
nil
(nnheader-nov-field)) ; misc
- nil
+ (if (eq (char-after) ?\n)
+ nil
+ (nnheader-nov-remainder)) ; extra
)))
(defun nnheader-insert-nov (header)
@@ -336,10 +341,12 @@
(insert "Xref: " (or (mail-header-xref header) "") "\t"))
(when (mail-header-extra header)
(let ((extra (mail-header-extra header)))
- (while extra
- (insert (symbol-name (caar extra))
- ": " (cdar extra) "\t")
- (pop extra))))
+ (if (listp extra) ; extra is a prev'ly parsed list
+ (while extra
+ (insert (symbol-name (caar extra))
+ ": " (cdar extra) "\t")
+ (pop extra))
+ (insert extra)))) ; extra is a native string
(insert "\n"))
(defun nnheader-insert-article-line (article)
reply other threads:[~1998-10-30 19:10 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=vxkemrpyig3.fsf@pocari-sweat.jprc.com \
--to=karl@jprc.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).