(Out of Rmail): Mention b2m.pl.
[bpt/emacs.git] / lisp / mail / undigest.el
index b19c9a1..d351373 100644 (file)
@@ -1,17 +1,17 @@
 ;;; undigest.el --- digest-cracking support for the RMAIL mail reader
 
-;; Copyright (C) 1985, 1986, 1994, 1996, 2002
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1986, 1994, 1996, 2001, 2002, 2003, 2004,
+;;   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: mail
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,9 +19,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
@@ -93,7 +91,15 @@ See rmail-digest-methods."
  (rmail-digest-rfc1153
   "^-\\{55,\\}\n\n"
   "^\n-\\{27,\\}\n\n"
-  "^\n-\\{27,\\}\n\nEnd of"))
+  ;; GNU Mailman knowingly (see comment at line 353 of ToDigest.py in
+  ;; Mailman source) produces non-conformant rfc 1153 digests, in that
+  ;; the trailer contains a "digest footer" like this:
+  ;; _______________________________________________
+  ;; <one or more lines of list blurb>
+  ;;
+  ;; End of Foo Digest...
+  ;; **************************************
+  "^\nEnd of"))
 
 (defun rmail-digest-rfc1153 (prolog-sep message-sep trailer-sep)
   (goto-char (point-min))
@@ -104,7 +110,7 @@ See rmail-digest-methods."
          separator result)
       (move-marker start (match-beginning 0))
       (move-marker end (match-end 0))
-      (setq result (cons (copy-marker start) (copy-marker end t)))
+      (setq result (list (cons (copy-marker start) (copy-marker end t))))
       (when (re-search-forward message-sep nil t)
        ;; Ok, at least one message separator found
        (setq separator (match-string 0))
@@ -145,6 +151,8 @@ See rmail-digest-methods."
       ;; Return the list of marker pairs
       (nreverse result))))
 
+(declare-function rmail-update-summary "rmailsum" (&rest ignore))
+
 ;;;###autoload
 (defun undigestify-rmail-message ()
   "Break up a digest message into its constituent messages.
@@ -307,5 +315,5 @@ following the containing message."
 
 (provide 'undigest)
 
-;;; arch-tag: 3a28b9fb-c1f5-43ef-9278-285f3e4b874d
+;; arch-tag: 3a28b9fb-c1f5-43ef-9278-285f3e4b874d
 ;;; undigest.el ends here