Gnus development mailing list
 help / color / mirror / Atom feed
* Better NOV extra handling in p0.40 [patch]
@ 1998-10-30 19:10 Karl Kleinpaste
  0 siblings, 0 replies; only message in thread
From: Karl Kleinpaste @ 1998-10-30 19:10 UTC (permalink / 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)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-10-30 19:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-30 19:10 Better NOV extra handling in p0.40 [patch] Karl Kleinpaste

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).