comparison lisp/vm/vm-digest.el @ 146:2af401a6ecca r20-2p1

Import from CVS: tag r20-2p1
author cvs
date Mon, 13 Aug 2007 09:34:46 +0200
parents 585fb297b004
children
comparison
equal deleted inserted replaced
145:e13feca31ba6 146:2af401a6ecca
130 boundary ))) 130 boundary )))
131 131
132 (defun vm-mime-burst-message (m) 132 (defun vm-mime-burst-message (m)
133 "Burst messages from the digest message M. 133 "Burst messages from the digest message M.
134 M should be a message struct for a real message. 134 M should be a message struct for a real message.
135 MIME encoding is expected. The message content type 135 MIME encoding is expected. Somewhere within the MIME layout
136 must be either message/* or multipart/digest." 136 there must be at least one part of type message/news, message/rfc822 or
137 multipart/digest. If there are multiple parts matching those types,
138 all of them will be burst."
137 (let ((ident-header nil) 139 (let ((ident-header nil)
138 (layout (vm-mm-layout m))) 140 (did-burst nil)
141 (list (vm-mime-find-digests-in-layout (vm-mm-layout m))))
139 (if vm-digest-identifier-header-format 142 (if vm-digest-identifier-header-format
140 (setq ident-header (vm-sprintf 'vm-digest-identifier-header-format m))) 143 (setq ident-header (vm-sprintf 'vm-digest-identifier-header-format m)))
141 (vm-mime-burst-layout layout ident-header))) 144 (while list
145 (setq did-burst (or did-burst
146 (vm-mime-burst-layout (car list) ident-header)))
147 (setq list (cdr list)))
148 did-burst))
142 149
143 (defun vm-mime-burst-layout (layout ident-header) 150 (defun vm-mime-burst-layout (layout ident-header)
144 (let ((work-buffer nil) 151 (let ((work-buffer nil)
145 (folder-buffer (current-buffer)) 152 (folder-buffer (current-buffer))
146 start part-list 153 start part-list
606 (catch 'return-value 613 (catch 'return-value
607 (save-excursion 614 (save-excursion
608 (set-buffer (vm-buffer-of m)) 615 (set-buffer (vm-buffer-of m))
609 (let ((layout (vm-mm-layout m))) 616 (let ((layout (vm-mm-layout m)))
610 (if (and (vectorp layout) 617 (if (and (vectorp layout)
611 (or (vm-mime-types-match "multipart/digest" 618 (or (vm-mime-layout-contains-type
612 (car (vm-mm-layout-type layout))) 619 layout
613 (vm-mime-types-match "message/rfc822" 620 "multipart/digest")
614 (car (vm-mm-layout-type layout))) 621 (vm-mime-layout-contains-type
615 (vm-mime-types-match "message/news" 622 layout
616 (car (vm-mm-layout-type layout))))) 623 "message/rfc822")
624 (vm-mime-layout-contains-type
625 layout
626 "message/news")))
617 (throw 'return-value "mime")))) 627 (throw 'return-value "mime"))))
618 (save-excursion 628 (save-excursion
619 (save-restriction 629 (save-restriction
620 (widen) 630 (widen)
621 (goto-char (vm-text-of m)) 631 (goto-char (vm-text-of m))