(gnus-copy-article-buffer): Don't assume `format' removes text
[gnus] / lisp / nnsoup.el
index 22c22da..efe5baa 100644 (file)
@@ -47,7 +47,7 @@
 (defvoo nnsoup-replies-directory (concat nnsoup-directory "replies/")
   "*Directory where outgoing packets will be composed.")
 
-(defvoo nnsoup-replies-format-type ?n
+(defvoo nnsoup-replies-format-type ?u  ;; u is USENET news format.
   "*Format of the replies packages.")
 
 (defvoo nnsoup-replies-index-type ?n
@@ -255,7 +255,7 @@ backend for the messages.")
                  (nth 1 (nnsoup-article-to-area
                          article nnsoup-current-group))))))
       (cond ((= kind ?m) 'mail)
-           ((= kind ?n) 'news)
+           ((= kind ?n) 'news) 
            (t 'unknown)))))
 
 (deffoo nnsoup-close-group (group &optional server)
@@ -313,7 +313,7 @@ backend for the messages.")
       (setq info (pop infolist)
            range-list (gnus-uncompress-range (car info))
            prefix (gnus-soup-area-prefix (nth 1 info)))
-      (when ;; All the articles in this file are marked for expiry.
+      (when;; All the articles in this file are marked for expiry.
          (and (or (setq mod-time (nth 5 (file-attributes
                                          (nnsoup-file prefix))))
                   (setq mod-time (nth 5 (file-attributes
@@ -476,7 +476,8 @@ backend for the messages.")
     (goto-char (point-min))
     (cond
      ;; rnews batch format
-     ((= format ?n)
+     ((or (= format ?u)
+         (= format ?n)) ;; Gnus back compatibility.
       (while (looking-at "^#! *rnews \\(+[0-9]+\\) *$")
        (forward-line 1)
        (push (list
@@ -535,7 +536,7 @@ backend for the messages.")
            (set-buffer (get-buffer-create buffer-name))
            (buffer-disable-undo)
            (push (cons nnsoup-current-group (current-buffer)) nnsoup-buffers)
-           (mm-insert-file-contents (concat nnsoup-directory file))
+           (nnheader-insert-file-contents (concat nnsoup-directory file))
            (current-buffer))))))
 
 (defun nnsoup-file (prefix &optional message)
@@ -590,7 +591,7 @@ backend for the messages.")
                (let ((format (gnus-soup-encoding-format
                               (gnus-soup-area-encoding (nth 1 area)))))
                  (goto-char end)
-                 (when (or (= format ?n) (= format ?m))
+                 (when (or (= format ?u) (= format ?n) (= format ?m))
                    (setq end (progn (forward-line -1) (point))))))
            (set-buffer msg-buf))
          (widen)
@@ -752,7 +753,7 @@ backend for the messages.")
     (while files
       (nnheader-message 5 "Doing %s..." (car files))
       (erase-buffer)
-      (mm-insert-file-contents (car files))
+      (nnheader-insert-file-contents (car files))
       (goto-char (point-min))
       (if (not (re-search-forward "^[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t *\\(Xref: \\)? *[^ ]* \\([^ ]+\\):[0-9]" nil t))
          (setq group "unknown")
@@ -766,13 +767,13 @@ backend for the messages.")
       (if (not (setq elem (assoc group active)))
          (push (list group (cons 1 lines)
                      (list (cons 1 lines)
-                           (vector ident group "ncm" "" lines)))
+                           (vector ident group "ucm" "" lines)))
                active)
        (nconc elem
               (list
                (list (cons (1+ (setq min (cdadr elem)))
                            (+ min lines))
-                     (vector ident group "ncm" "" lines))))
+                     (vector ident group "ucm" "" lines))))
        (setcdr (cadr elem) (+ min lines)))
       (setq files (cdr files)))
     (nnheader-message 5 "")