/[emacs]/emacs/lisp/gnus/mm-partial.el
ViewVC logotype

Diff of /emacs/lisp/gnus/mm-partial.el

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

revision 1.3.8.2 by miles, Tue Oct 14 23:34:51 2003 UTC revision 1.3.8.3 by miles, Thu Sep 16 00:12:16 2004 UTC
# Line 1  Line 1 
1  ;;; mm-partial.el --- showing message/partial  ;;; mm-partial.el --- showing message/partial
2  ;; Copyright (C) 2000 Free Software Foundation, Inc.  ;; Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
3    
4  ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>  ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
5  ;; Keywords: message partial  ;; Keywords: message partial
# Line 25  Line 25 
25    
26  ;;; Code:  ;;; Code:
27    
28  (eval-when-compile  (eval-when-compile (require 'cl))
   (require 'cl))  
29    
30  (require 'gnus-sum)  (require 'gnus-sum)
31  (require 'mm-util)  (require 'mm-util)
# Line 43  Line 42 
42            (gnus-request-article-this-buffer (aref header 0)            (gnus-request-article-this-buffer (aref header 0)
43                                              gnus-newsgroup-name)                                              gnus-newsgroup-name)
44            (when (search-forward id nil t)            (when (search-forward id nil t)
45              (let ((nhandles (mm-dissect-buffer)) nid)              (let ((nhandles (mm-dissect-buffer
46                                 nil gnus-article-loose-mime)) nid)
47                (if (consp (car nhandles))                (if (consp (car nhandles))
48                    (mm-destroy-parts nhandles)                    (mm-destroy-parts nhandles)
49                  (setq nid (cdr (assq 'id                  (setq nid (cdr (assq 'id
# Line 83  If NO-DISPLAY is nil, display it. Otherw Line 83  If NO-DISPLAY is nil, display it. Otherw
83                                                   (cdr (mm-handle-type b)))))))                                                   (cdr (mm-handle-type b)))))))
84                          (< anumber bnumber)))))                          (< anumber bnumber)))))
85        (setq gnus-article-mime-handles        (setq gnus-article-mime-handles
86              (append (if (listp (car gnus-article-mime-handles))              (mm-merge-handles gnus-article-mime-handles phandles))
                         gnus-article-mime-handles  
                       (list gnus-article-mime-handles))  
                     phandles))  
87        (save-excursion        (save-excursion
88          (set-buffer (generate-new-buffer " *mm*"))          (set-buffer (generate-new-buffer " *mm*"))
89          (while (setq phandle (pop phandles))          (while (setq phandle (pop phandles))
# Line 117  If NO-DISPLAY is nil, display it. Otherw Line 114  If NO-DISPLAY is nil, display it. Otherw
114          (if (<= n total)          (if (<= n total)
115              (error "Missing part %d" n))              (error "Missing part %d" n))
116          (kill-buffer (mm-handle-buffer handle))          (kill-buffer (mm-handle-buffer handle))
117            (goto-char (point-min))
118            (let ((point (if (search-forward "\n\n" nil t)
119                             (1- (point))
120                           (point-max))))
121              (goto-char (point-min))
122              (unless (re-search-forward "^mime-version:" point t)
123                (insert "MIME-Version: 1.0\n")))
124          (setcar handle (current-buffer))          (setcar handle (current-buffer))
125          (mm-handle-set-cache handle t)))          (mm-handle-set-cache handle t)))
126      (unless no-display      (unless no-display
# Line 131  If NO-DISPLAY is nil, display it. Otherw Line 135  If NO-DISPLAY is nil, display it. Otherw
135            (when handles            (when handles
136              ;; It is in article buffer.              ;; It is in article buffer.
137              (setq gnus-article-mime-handles              (setq gnus-article-mime-handles
138                    (nconc (if (listp (car gnus-article-mime-handles))                    (mm-merge-handles gnus-article-mime-handles handles)))
                            gnus-article-mime-handles  
                            (list gnus-article-mime-handles))  
                          (if (listp (car handles))  
                              handles (list handles)))))  
139            (mm-handle-set-undisplayer            (mm-handle-set-undisplayer
140             handle             handle
141             `(lambda ()             `(lambda ()
# Line 149  If NO-DISPLAY is nil, display it. Otherw Line 149  If NO-DISPLAY is nil, display it. Otherw
149                    (error nil))                    (error nil))
150                  (delete-region ,(point-min-marker) ,(point-max-marker))))))))))                  (delete-region ,(point-min-marker) ,(point-max-marker))))))))))
151    
152    (provide 'mm-partial)
153    
154  ;;; arch-tag: 460e7424-05f2-4a1d-a0f2-70ec081eff7d  ;;; arch-tag: 460e7424-05f2-4a1d-a0f2-70ec081eff7d
155  ;;; mm-partial.el ends here  ;;; mm-partial.el ends here

Legend:
Removed from v.1.3.8.2  
changed lines
  Added in v.1.3.8.3

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