* gnus-uu.el (gnus-uu-digest-mail-forward): Mark as forwarded.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Fri, 30 Mar 2001 22:41:44 +0000 (22:41 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Fri, 30 Mar 2001 22:41:44 +0000 (22:41 +0000)
* gnus-msg.el (gnus-put-message): Clean up.
(gnus-summary-reply): Mark all replied-to articles as replied to.
(gnus-inews-add-send-actions): Also mark as forwarded.
(gnus-summary-mail-forward): Mark as forwarded.

* gnus-sum.el (gnus-summary-mark-article-as-replied): Take a list
of articles.
(gnus-summary-mark-article-as-forwarded): Ditto.

* gnus-msg.el (gnus-summary-resend-message): Mark article as
forwarded.
(gnus-summary-mail-forward): Clean up.

* gnus.el (gnus-article-mark-lists): Added forward.

* gnus-sum.el (gnus-forwarded-mark): New variable.
(gnus-summary-prepare-threads): Use it.
(gnus-summary-update-secondary-mark): Ditto.
(gnus-newsgroup-forwarded): New variable.

lisp/ChangeLog
lisp/gnus-art.el
lisp/gnus-msg.el
lisp/gnus-score.el
lisp/gnus-start.el
lisp/gnus-sum.el
lisp/gnus-uu.el
lisp/gnus.el

index 3e45345..0b834af 100644 (file)
@@ -1,3 +1,38 @@
+2001-03-31 00:03:42  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-uu.el (gnus-uu-digest-mail-forward): Mark as forwarded.
+
+       * gnus-msg.el (gnus-put-message): Clean up.
+       (gnus-summary-reply): Mark all replied-to articles as replied to.
+       (gnus-inews-add-send-actions): Also mark as forwarded.
+       (gnus-summary-mail-forward): Mark as forwarded.  
+
+       * gnus-sum.el (gnus-summary-mark-article-as-replied): Take a list
+       of articles. 
+       (gnus-summary-mark-article-as-forwarded): Ditto.
+
+       * gnus-msg.el (gnus-summary-resend-message): Mark article as
+       forwarded. 
+       (gnus-summary-mail-forward): Clean up.
+
+       * gnus.el (gnus-article-mark-lists): Added forward.
+
+       * gnus-sum.el (gnus-forwarded-mark): New variable.
+       (gnus-summary-prepare-threads): Use it.
+       (gnus-summary-update-secondary-mark): Ditto.
+       (gnus-newsgroup-forwarded): New variable.
+
+2001-03-30 23:13:37  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-msg.el (gnus-summary-reply): Allow very wide replies.
+       (gnus-summary-very-wide-reply): New command and keystroke.
+       (gnus-summary-very-wide-reply-with-original): Ditto.
+
+       * gnus-score.el (gnus-adaptive-word-length-limit): New variable. 
+       (gnus-score-adaptive): Use it.
+
+       * gnus-start.el (gnus-get-unread-articles): Clean up.
+
 2001-03-21 20:00:43  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * nnultimate.el (nnultimate-retrieve-headers): Work for other
index da967cf..28a5ab9 100644 (file)
@@ -1985,36 +1985,6 @@ always hide."
                    (looking-at "[ \t]*$"))
          (gnus-delete-line))))))
 
-(defun article-replace-with-quoted-text ()
-  "Replace the entire article with the quoted text in the article."
-  (interactive)
-  (unless gnus-cite-prefix-alist
-    (error "No quoted text in the article"))
-  (gnus-summary-show-article t)
-  (save-excursion
-    (set-buffer gnus-article-buffer)
-    (gnus-cite-parse-maybe t)
-    (let ((prefix (concat "^" (caar gnus-cite-prefix-alist)))
-         (buffer-read-only nil)
-         (body nil))
-      (dolist (line (sort (copy-sequence (cdar gnus-cite-prefix-alist)) '<))
-       (save-excursion
-         (set-buffer gnus-original-article-buffer)
-         (goto-char (point-min))
-         (forward-line (1- line))
-         (push (buffer-substring (point) (progn (forward-line 1) (point)))
-               body)))
-      (article-goto-body)
-      (forward-line -1)
-      (delete-region (point) (point-max))
-      (mapcar #'insert (mapcar #'string-as-unibyte (nreverse body)))
-      (goto-char (point-min))
-      (while (re-search-forward prefix nil t)
-       (replace-match "" t t))
-      (gnus-article-prepare-display))))
-    
-    
-
 (defun article-narrow-to-head ()
   "Narrow the buffer to the head of the message.
 Point is left at the beginning of the narrowed-to region."
index 07419ea..4881676 100644 (file)
@@ -191,6 +191,8 @@ Thank you for your help in stamping out bugs.
   "R" gnus-summary-reply-with-original
   "w" gnus-summary-wide-reply
   "W" gnus-summary-wide-reply-with-original
+  "v" gnus-summary-very-wide-reply
+  "W" gnus-summary-very-wide-reply-with-original
   "n" gnus-summary-followup-to-mail
   "N" gnus-summary-followup-to-mail-with-original
   "m" gnus-summary-mail-other-window
@@ -216,7 +218,7 @@ Thank you for your help in stamping out bugs.
        (group (make-symbol "gnus-setup-message-group")))
     `(let ((,winconf (current-window-configuration))
           (,buffer (buffer-name (current-buffer)))
-          (,article (and gnus-article-reply (gnus-summary-article-number)))
+          (,article gnus-article-reply)
           (,group gnus-newsgroup-name)
           (message-header-setup-hook
            (copy-sequence message-header-setup-hook))
@@ -229,7 +231,7 @@ Thank you for your help in stamping out bugs.
        (unwind-protect
           (progn
             ,@forms)
-        (gnus-inews-add-send-actions ,winconf ,buffer ,article)
+        (gnus-inews-add-send-actions ,winconf ,buffer ,article ,config)
         (gnus-inews-insert-draft-meta-information ,group ,article)
         (setq gnus-message-buffer (current-buffer))
         (set (make-local-variable 'gnus-message-group-art)
@@ -254,7 +256,11 @@ Thank you for your help in stamping out bugs.
               (not (message-fetch-field gnus-draft-meta-information-header)))
       (goto-char (point-min))
       (insert gnus-draft-meta-information-header ": (\"" group "\" "
-             (if article (number-to-string article) "\"\"") ")\n"))))
+             (if article (number-to-string
+                          (if (listp article)
+                              (car article)
+                            article)) "\"\"")
+             ")\n"))))
 
 ;;;###autoload
 (defun gnus-msg-mail (&optional to subject other-headers continue
@@ -309,7 +315,7 @@ Gcc: header for archiving purposes."
                         (symbol-value (car elem))))
            (throw 'found (cons (cadr elem) (caddr elem)))))))))
 
-(defun gnus-inews-add-send-actions (winconf buffer article)
+(defun gnus-inews-add-send-actions (winconf buffer article &optional config)
   (make-local-hook 'message-sent-hook)
   (add-hook 'message-sent-hook (if gnus-agent 'gnus-agent-possibly-do-gcc
                                 'gnus-inews-do-gcc) nil t)
@@ -327,7 +333,9 @@ Gcc: header for archiving purposes."
       (save-excursion
        (set-buffer ,buffer)
        ,(when article
-          `(gnus-summary-mark-article-as-replied ,article))))
+          (if (eq config 'forward)
+              `(gnus-summary-mark-article-as-forwarded ',article)
+            `(gnus-summary-mark-article-as-replied ',article)))))
    'send))
 
 (put 'gnus-setup-message 'lisp-indent-function 1)
@@ -529,7 +537,7 @@ header line with the old Message-ID."
                            force-news)
   (when article-buffer
     (gnus-copy-article-buffer))
-  (let ((gnus-article-reply article-buffer)
+  (let ((gnus-article-reply (and article-buffer (gnus-summary-article-number)))
        (add-to-list gnus-add-to-list))
     (gnus-setup-message (cond (yank 'reply-yank)
                              (article-buffer 'reply)
@@ -699,23 +707,38 @@ If SILENT, don't prompt the user."
 
 ;;; Mail reply commands of Gnus summary mode
 
-(defun gnus-summary-reply (&optional yank wide)
-  "Start composing a reply mail to the current message.
+(defun gnus-summary-reply (&optional yank wide very-wide)
+  "Start composing a mail reply to the current message.
 If prefix argument YANK is non-nil, the original article is yanked
-automatically."
+automatically.
+If WIDE, make a wide reply.
+If VERY-WIDE, make a very wide reply."
   (interactive
    (list (and current-prefix-arg
              (gnus-summary-work-articles 1))))
   ;; Stripping headers should be specified with mail-yank-ignored-headers.
   (when yank
     (gnus-summary-goto-subject (car yank)))
-  (let ((gnus-article-reply t))
+  (let ((gnus-article-reply (or yank (gnus-summary-article-number)))
+       (headers ""))
     (gnus-setup-message (if yank 'reply-yank 'reply)
-      (gnus-summary-select-article)
+      (if (not very-wide)
+         (gnus-summary-select-article)
+       (dolist (article very-wide)
+         (gnus-summary-select-article nil nil nil article)
+         (save-excursion
+           (set-buffer (gnus-copy-article-buffer))
+           (gnus-msg-treat-broken-reply-to)
+           (save-restriction
+             (message-narrow-to-head)
+             (setq headers (concat headers (buffer-string)))))))
       (set-buffer (gnus-copy-article-buffer))
       (gnus-msg-treat-broken-reply-to)
       (save-restriction
        (message-narrow-to-head)
+       (when very-wide
+         (erase-buffer)
+         (insert headers))
        (goto-char (point-max)))
       (mml-quote-region (point) (point-max))
       (message-reply nil wide)
@@ -743,6 +766,22 @@ The original article will be yanked."
   (interactive "P")
   (gnus-summary-reply-with-original n t))
 
+(defun gnus-summary-very-wide-reply (&optional yank)
+  "Start composing a very wide reply mail to the current message.
+If prefix argument YANK is non-nil, the original article is yanked
+automatically."
+  (interactive
+   (list (and current-prefix-arg
+             (gnus-summary-work-articles 1))))
+  (gnus-summary-reply yank t (gnus-summary-work-articles yank)))
+
+(defun gnus-summary-very-wide-reply-with-original (n)
+  "Start composing a very wide reply mail to the current message.
+The original article will be yanked."
+  (interactive "P")
+  (gnus-summary-reply
+   (gnus-summary-work-articles n) t (gnus-summary-work-articles n)))
+
 (defun gnus-summary-mail-forward (&optional arg post)
   "Forward the current message to another user.
 If ARG is nil, see `message-forward-as-mime' and `message-forward-show-mml';
@@ -757,21 +796,27 @@ If POST, post instead of mail."
        (message-forward-show-mml message-forward-show-mml))
     (cond
      ((null arg))
-     ((eq arg 1) (setq message-forward-as-mime nil
-                      message-forward-show-mml t))
-     ((eq arg 2) (setq message-forward-as-mime t
-                      message-forward-show-mml nil))
-     ((eq arg 3) (setq message-forward-as-mime t
-                      message-forward-show-mml t))
-     ((eq arg 4) (setq message-forward-as-mime nil
-                      message-forward-show-mml nil))
-     (t (setq message-forward-as-mime (not message-forward-as-mime))))
-    (gnus-setup-message 'forward
-      (gnus-summary-select-article)
-      (let ((mail-parse-charset gnus-newsgroup-charset)
-           (mail-parse-ignored-charsets gnus-newsgroup-ignored-charsets))
-       (set-buffer gnus-original-article-buffer)
-       (message-forward post)))))
+     ((eq arg 1)
+      (setq message-forward-as-mime nil
+           message-forward-show-mml t))
+     ((eq arg 2)
+      (setq message-forward-as-mime t
+           message-forward-show-mml nil))
+     ((eq arg 3)
+      (setq message-forward-as-mime t
+           message-forward-show-mml t))
+     ((eq arg 4)
+      (setq message-forward-as-mime nil
+           message-forward-show-mml nil))
+     (t
+      (setq message-forward-as-mime (not message-forward-as-mime))))
+    (let ((gnus-article-reply (gnus-summary-article-number)))
+      (gnus-setup-message 'forward
+       (gnus-summary-select-article)
+       (let ((mail-parse-charset gnus-newsgroup-charset)
+             (mail-parse-ignored-charsets gnus-newsgroup-ignored-charsets))
+         (set-buffer gnus-original-article-buffer)
+         (message-forward post))))))
 
 (defun gnus-summary-resend-message (address n)
   "Resend the current article to ADDRESS."
@@ -784,7 +829,8 @@ If POST, post instead of mail."
       (gnus-summary-select-article nil nil nil article)
       (save-excursion
        (set-buffer gnus-original-article-buffer)
-       (message-resend address)))))
+       (message-resend address))
+      (gnus-summary-mark-article-as-forwarded article))))
 
 (defun gnus-summary-post-forward (&optional arg)
   "Forward the current article to a newsgroup.
@@ -894,35 +940,32 @@ The current group name will be inserted at \"%s\".")
   (let ((reply gnus-article-reply)
        (winconf gnus-prev-winconf)
        (group gnus-newsgroup-name))
+    (unless (and group
+                (not (gnus-group-read-only-p group)))
+      (setq group (read-string "Put in group: " nil (gnus-writable-groups))))
 
-    (or (and group (not (gnus-group-read-only-p group)))
-       (setq group (read-string "Put in group: " nil
-                                (gnus-writable-groups))))
     (when (gnus-gethash group gnus-newsrc-hashtb)
       (error "No such group: %s" group))
-
     (save-excursion
       (save-restriction
        (widen)
        (message-narrow-to-headers)
-       (let (gnus-deletable-headers)
-         (if (message-news-p)
-             (message-generate-headers message-required-news-headers)
-           (message-generate-headers message-required-mail-headers)))
+       (let ((gnus-deletable-headers nil))
+         (message-generate-headers
+          (if (message-news-p)
+              message-required-news-headers
+            message-required-mail-headers)))
        (goto-char (point-max))
        (insert "Gcc: " group "\n")
        (widen)))
-
     (gnus-inews-do-gcc)
-
-    (when (get-buffer gnus-group-buffer)
-      (when (gnus-buffer-exists-p (car-safe reply))
-       (set-buffer (car reply))
-       (and (cdr reply)
-            (gnus-summary-mark-article-as-replied
-             (cdr reply))))
-      (when winconf
-       (set-window-configuration winconf)))))
+    (when (and (get-buffer gnus-group-buffer)
+              (gnus-buffer-exists-p (car-safe reply))
+              (cdr reply))
+      (set-buffer (car reply))
+      (gnus-summary-mark-article-as-replied (cdr reply)))
+    (when winconf
+      (set-window-configuration winconf))))
 
 (defun gnus-article-mail (yank)
   "Send a reply to the address near point.
index 8c06af0..f0fa495 100644 (file)
@@ -232,6 +232,11 @@ This variable allows the same syntax as `gnus-home-score-file'."
                                             (symbol :tag "other"))
                                     (integer :tag "Score"))))))
 
+(defcustom gnus-adaptive-word-length-limit nil
+  "*Words of a length lesser than this limit will be ignored when doing adaptive scoring."
+  :group 'gnus-score-adapt
+  :type 'integer)
+
 (defcustom gnus-ignored-adaptive-words nil
   "List of words to be ignored when doing adaptive word scoring."
   :group 'gnus-score-adapt
@@ -2275,11 +2280,14 @@ score in GNUS-NEWSGROUP-SCORED by SCORE."
                      ;; Put the word and score into the hashtb.
                      (setq val (gnus-gethash (setq word (match-string 0))
                                              hashtb))
-                     (setq val (+ score (or val 0)))
-                     (if (and gnus-adaptive-word-minimum
-                              (< val gnus-adaptive-word-minimum))
-                         (setq val gnus-adaptive-word-minimum))
-                     (gnus-sethash word val hashtb))
+                     (when (or (not gnus-adaptive-word-length-limit)
+                               (> (length word)
+                                  gnus-adaptive-word-length-limit))
+                       (setq val (+ score (or val 0)))
+                       (if (and gnus-adaptive-word-minimum
+                                (< val gnus-adaptive-word-minimum))
+                           (setq val gnus-adaptive-word-minimum))
+                       (gnus-sethash word val hashtb)))
                    (erase-buffer))))
            (set-syntax-table syntab))
          ;; Make all the ignorable words ignored.
index c5ca5bf..0b86224 100644 (file)
@@ -1536,7 +1536,7 @@ newsgroup."
                  gnus-activate-foreign-newsgroups)
                 (t 0))
           level))
-        scanned-methods info group active method retrievegroups)
+        scanned-methods info group active method retrieve-groups)
     (gnus-message 5 "Checking new news...")
 
     (while newsrc
@@ -1583,10 +1583,10 @@ newsgroup."
          (if (gnus-check-backend-function 'retrieve-groups group)
              ;; if server support gnus-retrieve-groups we push
              ;; the group onto retrievegroups for later checking
-             (if (assoc method retrievegroups)
-                 (setcdr (assoc method retrievegroups)
-                         (cons group (cdr (assoc method retrievegroups))))
-               (push (list method group) retrievegroups))
+             (if (assoc method retrieve-groups)
+                 (setcdr (assoc method retrieve-groups)
+                         (cons group (cdr (assoc method retrieve-groups))))
+               (push (list method group) retrieve-groups))
            ;; hack: `nnmail-get-new-mail' changes the mail-source depending
            ;; on the group, so we must perform a scan for every group
            ;; if the users has any directory mail sources.
@@ -1619,21 +1619,21 @@ newsgroup."
        ;; unread articles and stuff.
        (gnus-set-active group nil)
        (let ((tmp (gnus-gethash group gnus-newsrc-hashtb)))
-         (if tmp (setcar tmp t))))))
+         (when tmp
+           (setcar tmp t))))))
 
     ;; iterate through groups on methods which support gnus-retrieve-groups
     ;; and fetch a partial active file and use it to find new news.
-    (while retrievegroups
-      (let* ((mg (pop retrievegroups))
-            (method (or (car mg) gnus-select-method))
-            (groups (cdr mg)))
+    (dolist (rg retrieve-groups)
+      (let ((method (or (car rg) gnus-select-method))
+           (groups (cdr rg)))
        (when (gnus-check-server method)
           ;; Request that the backend scan its incoming messages.
           (when (gnus-check-backend-function 'request-scan (car method))
             (gnus-request-scan nil method))
-          (gnus-read-active-file-2 (mapcar (lambda (group)
-                                             (gnus-group-real-name group))
-                                           groups) method)
+          (gnus-read-active-file-2
+          (mapcar (lambda (group) (gnus-group-real-name group)) groups)
+          method)
           (dolist (group groups)
             (cond
              ((setq active (gnus-active (gnus-info-group
index 0cfb786..f31aa94 100644 (file)
@@ -396,7 +396,7 @@ this variable specifies group names."
   :type 'character)
 
 (defcustom gnus-souped-mark ?F
-  "*Mark used for killed articles."
+  "*Mark used for souped articles."
   :group 'gnus-summary-marks
   :type 'character)
 
@@ -420,6 +420,11 @@ this variable specifies group names."
   :group 'gnus-summary-marks
   :type 'character)
 
+(defcustom gnus-forwarded-mark ?O
+  "*Mark used for articles that have been forwarded."
+  :group 'gnus-summary-marks
+  :type 'character)
+
 (defcustom gnus-cached-mark ?*
   "*Mark used for articles that are in the cache."
   :group 'gnus-summary-marks
@@ -1104,6 +1109,9 @@ the type of the variable (string, integer, character, etc).")
 (defvar gnus-newsgroup-replied nil
   "List of articles that have been replied to in the current newsgroup.")
 
+(defvar gnus-newsgroup-forwarded nil
+  "List of articles that have been forwarded in the current newsgroup.")
+
 (defvar gnus-newsgroup-expirable nil
   "List of articles in the current newsgroup that can be expired.")
 
@@ -1161,7 +1169,8 @@ the type of the variable (string, integer, character, etc).")
     gnus-newsgroup-auto-expire gnus-newsgroup-unreads
     gnus-newsgroup-unselected gnus-newsgroup-marked
     gnus-newsgroup-reads gnus-newsgroup-saved
-    gnus-newsgroup-replied gnus-newsgroup-expirable
+    gnus-newsgroup-replied gnus-newsgroup-forwarded
+    gnus-newsgroup-expirable
     gnus-newsgroup-processable gnus-newsgroup-killed
     gnus-newsgroup-downloadable gnus-newsgroup-undownloaded
     gnus-newsgroup-unsendable
@@ -4228,6 +4237,8 @@ or a straight list of headers."
                    gnus-cached-mark)
                   ((memq number gnus-newsgroup-replied)
                    gnus-replied-mark)
+                  ((memq number gnus-newsgroup-forwarded)
+                   gnus-forwarded-mark)
                   ((memq number gnus-newsgroup-saved)
                    gnus-saved-mark)
                   (t gnus-no-mark))
@@ -8411,7 +8422,7 @@ the actual number of articles unmarked is returned."
        (error "No such mark type: %s" type)
       (setq var (intern (format "gnus-newsgroup-%s" type)))
       (set var (cons article (symbol-value var)))
-      (if (memq type '(processable cached replied saved))
+      (if (memq type '(processable cached replied forwarded saved))
          (gnus-summary-update-secondary-mark article)
        ;;; !!! This is bobus.  We should find out what primary
        ;;; !!! mark we want to set.
@@ -8425,11 +8436,24 @@ the actual number of articles marked is returned."
   (gnus-summary-mark-forward n gnus-expirable-mark))
 
 (defun gnus-summary-mark-article-as-replied (article)
-  "Mark ARTICLE replied and update the summary line."
-  (push article gnus-newsgroup-replied)
-  (let ((buffer-read-only nil))
-    (when (gnus-summary-goto-subject article nil t)
-      (gnus-summary-update-secondary-mark article))))
+  "Mark ARTICLE as replied to and update the summary line.
+ARTICLE can also be a list of articles."
+  (let ((articles (if (listp article) article (list article))))
+    (dolist (article articles)
+      (push article gnus-newsgroup-replied)
+      (let ((buffer-read-only nil))
+       (when (gnus-summary-goto-subject article nil t)
+         (gnus-summary-update-secondary-mark article))))))
+
+(defun gnus-summary-mark-article-as-forwarded (article)
+  "Mark ARTICLE as forwarded and update the summary line.
+ARTICLE can also be a list of articles."
+  (let ((articles (if (listp article) article (list article))))
+    (dolist (article articles)
+      (push article gnus-newsgroup-forwarded)
+      (let ((buffer-read-only nil))
+       (when (gnus-summary-goto-subject article nil t)
+         (gnus-summary-update-secondary-mark article))))))
 
 (defun gnus-summary-set-bookmark (article)
   "Set a bookmark in current article."
@@ -8653,6 +8677,8 @@ Iff NO-EXPIRE, auto-expiry will be inhibited."
          gnus-cached-mark)
         ((memq article gnus-newsgroup-replied)
          gnus-replied-mark)
+        ((memq article gnus-newsgroup-forwarded)
+         gnus-forwarded-mark)
         ((memq article gnus-newsgroup-saved)
          gnus-saved-mark)
         (t gnus-no-mark))
index 1e249be..c9b9f0e 100644 (file)
@@ -529,43 +529,44 @@ didn't work, and overwrite existing files.  Otherwise, ask each time."
     (if (and n (not (numberp n)))
        (setq message-forward-as-mime (not message-forward-as-mime)
              n nil))
-    (gnus-setup-message 'forward
-      (setq gnus-uu-digest-from-subject nil)
-      (setq gnus-uu-digest-buffer
-           (gnus-get-buffer-create " *gnus-uu-forward*"))
-      (gnus-uu-decode-save n file)
-      (switch-to-buffer gnus-uu-digest-buffer)
-      (let ((fs gnus-uu-digest-from-subject))
-       (when fs
-         (setq from (caar fs)
-               subject (gnus-simplify-subject-fuzzy (cdar fs))
-               fs (cdr fs))
-         (while (and fs (or from subject))
-           (when from
-             (unless (string= from (caar fs))
-               (setq from nil)))
-           (when subject
-             (unless (string= (gnus-simplify-subject-fuzzy (cdar fs))
-                              subject)
-               (setq subject nil)))
-           (setq fs (cdr fs))))
-       (unless subject
-         (setq subject "Digested Articles"))
-       (unless from
-         (setq from
-               (if (gnus-news-group-p gnus-newsgroup-name)
-                   gnus-newsgroup-name
-                 "Various"))))
-      (goto-char (point-min))
-      (when (re-search-forward "^Subject: ")
-       (delete-region (point) (gnus-point-at-eol))
-       (insert subject))
-      (goto-char (point-min))
-      (when (re-search-forward "^From:")
-       (delete-region (point) (gnus-point-at-eol))
-       (insert " " from))
-      (let ((message-forward-decoded-p t))
-       (message-forward post t)))
+    (let ((gnus-article-reply (gnus-summary-work-articles n)))
+      (gnus-setup-message 'forward
+       (setq gnus-uu-digest-from-subject nil)
+       (setq gnus-uu-digest-buffer
+             (gnus-get-buffer-create " *gnus-uu-forward*"))
+       (gnus-uu-decode-save n file)
+       (switch-to-buffer gnus-uu-digest-buffer)
+       (let ((fs gnus-uu-digest-from-subject))
+         (when fs
+           (setq from (caar fs)
+                 subject (gnus-simplify-subject-fuzzy (cdar fs))
+                 fs (cdr fs))
+           (while (and fs (or from subject))
+             (when from
+               (unless (string= from (caar fs))
+                 (setq from nil)))
+             (when subject
+               (unless (string= (gnus-simplify-subject-fuzzy (cdar fs))
+                                subject)
+                 (setq subject nil)))
+             (setq fs (cdr fs))))
+         (unless subject
+           (setq subject "Digested Articles"))
+         (unless from
+           (setq from
+                 (if (gnus-news-group-p gnus-newsgroup-name)
+                     gnus-newsgroup-name
+                   "Various"))))
+       (goto-char (point-min))
+       (when (re-search-forward "^Subject: ")
+         (delete-region (point) (gnus-point-at-eol))
+         (insert subject))
+       (goto-char (point-min))
+       (when (re-search-forward "^From:")
+         (delete-region (point) (gnus-point-at-eol))
+         (insert " " from))
+       (let ((message-forward-decoded-p t))
+         (message-forward post t))))
     (setq gnus-uu-digest-from-subject nil)))
 
 (defun gnus-uu-digest-post-forward (&optional n)
index 9f52d84..ec50da0 100644 (file)
@@ -1755,7 +1755,7 @@ covered by that variable."
     (bookmarks . bookmark) (dormant . dormant)
     (scored . score) (saved . save)
     (cached . cache) (downloadable . download)
-    (unsendable . unsend)))
+    (unsendable . unsend) (forwarded . forward)))
 
 (defvar gnus-headers-retrieved-by nil)
 (defvar gnus-article-reply nil)