/[emacs]/emacs/lisp/gnus/nndoc.el
ViewVC logotype

Diff of /emacs/lisp/gnus/nndoc.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by miles, Mon Sep 1 15:45:24 2003 UTC revision 1.7.2.1 by schwab, Thu Jul 22 16:45:51 2004 UTC
# Line 1  Line 1 
1  ;;; nndoc.el --- single file access for Gnus  ;;; nndoc.el --- single file access for Gnus
2  ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002  ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
3  ;;        Free Software Foundation, Inc.  ;;        Free Software Foundation, Inc.
4    
5  ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>  ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
# Line 58  from the document.") Line 58  from the document.")
58    `((mmdf    `((mmdf
59       (article-begin .  "^\^A\^A\^A\^A\n")       (article-begin .  "^\^A\^A\^A\^A\n")
60       (body-end .  "^\^A\^A\^A\^A\n"))       (body-end .  "^\^A\^A\^A\^A\n"))
61      (exim-bounce      (mime-digest
62       (article-begin . "^------ This is a copy of the message, including all the headers. ------\n\n")       (article-begin . "")
63       (body-end-function . nndoc-exim-bounce-body-end-function))       (head-begin . "^ ?\n")
64         (head-end . "^ ?$")
65         (body-end . "")
66         (file-end . "")
67         (subtype digest guess))
68        (mime-parts
69         (generate-head-function . nndoc-generate-mime-parts-head)
70         (article-transform-function . nndoc-transform-mime-parts))
71      (nsmail      (nsmail
72       (article-begin .  "^From - "))       (article-begin .  "^From - "))
73      (news      (news
# Line 76  from the document.") Line 83  from the document.")
83       (body-end . "\^_")       (body-end . "\^_")
84       (body-begin-function . nndoc-babyl-body-begin)       (body-begin-function . nndoc-babyl-body-begin)
85       (head-begin-function . nndoc-babyl-head-begin))       (head-begin-function . nndoc-babyl-head-begin))
86        (exim-bounce
87         (article-begin . "^------ This is a copy of the message, including all the headers. ------\n\n")
88         (body-end-function . nndoc-exim-bounce-body-end-function))
89      (rfc934      (rfc934
90       (article-begin . "^--.*\n+")       (article-begin . "^--.*\n+")
91       (body-end . "^--.*$")       (body-end . "^--.*$")
# Line 91  from the document.") Line 101  from the document.")
101       (head-end . "^\t")       (head-end . "^\t")
102       (generate-head-function . nndoc-generate-clari-briefs-head)       (generate-head-function . nndoc-generate-clari-briefs-head)
103       (article-transform-function . nndoc-transform-clari-briefs))       (article-transform-function . nndoc-transform-clari-briefs))
104      (mime-digest      
      (article-begin . "")  
      (head-begin . "^ ?\n")  
      (head-end . "^ ?$")  
      (body-end . "")  
      (file-end . "")  
      (subtype digest guess))  
     (mime-parts  
      (generate-head-function . nndoc-generate-mime-parts-head)  
      (article-transform-function . nndoc-transform-mime-parts))  
105      (standard-digest      (standard-digest
106       (first-article . ,(concat "^" (make-string 70 ?-) "\n *\n+"))       (first-article . ,(concat "^" (make-string 70 ?-) "\n *\n+"))
107       (article-begin . ,(concat "^\n" (make-string 30 ?-) "\n *\n+"))       (article-begin . ,(concat "^\n" (make-string 30 ?-) "\n *\n+"))
# Line 393  from the document.") Line 394  from the document.")
394        (error "Document is not of any recognized type"))        (error "Document is not of any recognized type"))
395      (if result      (if result
396          (car entry)          (car entry)
397        (cadar (sort results 'car-less-than-car)))))        (cadar (last (sort results 'car-less-than-car))))))
398    
399  ;;;  ;;;
400  ;;; Built-in type predicates and functions  ;;; Built-in type predicates and functions
# Line 771  from the document.") Line 772  from the document.")
772    "Go through the document and partition it into heads/bodies/articles."    "Go through the document and partition it into heads/bodies/articles."
773    (let ((i 0)    (let ((i 0)
774          (first t)          (first t)
775          head-begin head-end body-begin body-end)          art-begin head-begin head-end body-begin body-end)
776      (setq nndoc-dissection-alist nil)      (setq nndoc-dissection-alist nil)
777      (save-excursion      (save-excursion
778        (set-buffer nndoc-current-buffer)        (set-buffer nndoc-current-buffer)
# Line 787  from the document.") Line 788  from the document.")
788          ;; Go through the file.          ;; Go through the file.
789          (while (if (and first nndoc-first-article)          (while (if (and first nndoc-first-article)
790                     (nndoc-search nndoc-first-article)                     (nndoc-search nndoc-first-article)
791                   (nndoc-article-begin))                   (if art-begin
792            (setq first nil)                       (goto-char art-begin)
793                       (nndoc-article-begin)))
794              (setq first nil
795                    art-begin nil)
796            (cond (nndoc-head-begin-function            (cond (nndoc-head-begin-function
797                   (funcall nndoc-head-begin-function))                   (funcall nndoc-head-begin-function))
798                  (nndoc-head-begin                  (nndoc-head-begin
# Line 808  from the document.") Line 812  from the document.")
812                       (funcall nndoc-body-end-function))                       (funcall nndoc-body-end-function))
813                  (and nndoc-body-end                  (and nndoc-body-end
814                       (nndoc-search nndoc-body-end))                       (nndoc-search nndoc-body-end))
815                  (nndoc-article-begin)                  (and (nndoc-article-begin)
816                         (setq art-begin (point)))
817                  (progn                  (progn
818                    (goto-char (point-max))                    (goto-char (point-max))
819                    (when nndoc-file-end                    (when nndoc-file-end
# Line 890  PARENT is the message-ID of the parent s Line 895  PARENT is the message-ID of the parent s
895              subtype "plain"))              subtype "plain"))
896      ;; Prepare the article and summary inserts.      ;; Prepare the article and summary inserts.
897      (unless article-insert      (unless article-insert
898        (setq article-insert (buffer-substring (point-min) (point-max))        (setq article-insert (buffer-string)
899              head-end head-begin))              head-end head-begin))
900      ;; Fix MIME-Version      ;; Fix MIME-Version
901      (unless (string-match "MIME-Version:" article-insert)      (unless (string-match "MIME-Version:" article-insert)

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.7.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26