~ubuntu-branches/ubuntu/hardy/vm/hardy

« back to all changes in this revision

Viewing changes to vm-digest.el

  • Committer: Bazaar Package Importer
  • Author(s): Manoj Srivastava
  • Date: 2005-05-02 23:57:59 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050502235759-lsq60hinwkchrbxp
Tags: 7.19-4
* Bug fix: "vm: Please do not discriminate against XEmacs", thanks to
  Dirk Eddelbuettel. Well, back in the mists of time, VM was packaged to
  be byte-compiled for XEmacs, but the XEmacs maintainer at that time
  asked me to cease and desist. Times change, so that is reverted. 
                                                        (Closes: #306876).
* Bug fix: "vm: purge doesn't", thanks to Ian Zimmerman. This should be
  better.                                               (Closes: #303519).

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
;;; along with this program; if not, write to the Free Software
16
16
;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
17
 
18
 
(provide 'vm-digest)
 
18
;;(provide 'vm-digest)
19
19
 
20
20
(defun vm-no-frills-encapsulate-message (m keep-list discard-regexp)
21
21
  "Encapsulate a message M for forwarding, simply.
49
49
              (insert-buffer-substring source-buffer (vm-headers-of m)
50
50
                                       (vm-text-end-of m))
51
51
              (goto-char beg)
52
 
              (vm-reorder-message-headers nil nil "\\(X-VM-\\|Status:\\)")
 
52
              (vm-reorder-message-headers nil nil vm-internal-unforwarded-header-regexp)
53
53
              (vm-reorder-message-headers nil keep-list discard-regexp)))))
54
54
      (goto-char (point-max))
55
55
      (insert "------- end of forwarded message -------\n"))))
99
99
            ;; remove the Berkeley and VM status headers and sort
100
100
            ;; the MIME headers to the top of the message.
101
101
            (vm-reorder-message-headers nil vm-mime-header-list
102
 
                                        "\\(X-VM-\\|Status:\\)")
 
102
                                        vm-internal-unforwarded-header-regexp)
103
103
            ;; skip past the MIME headers so that when the
104
104
            ;; user's header filters are applied they won't
105
105
            ;; remove the MIME headers.
172
172
                  (setq start (point))
173
173
                  (vm-mime-insert-mime-body layout)
174
174
                  (vm-munge-message-separators folder-type start (point))
 
175
                  ;; remove any leading newlines as they will
 
176
                  ;; make vm-reorder-message-headers think the
 
177
                  ;; header section has ended.
 
178
                  (save-excursion
 
179
                    (goto-char start)
 
180
                    (while (= (following-char) ?\n)
 
181
                      (delete-char 1)))
175
182
                  (insert (vm-trailing-message-separator folder-type)))
176
183
                 ((vm-mime-types-match "multipart/digest"
177
184
                                       (car (vm-mm-layout-type layout)))
188
195
                    (setq start (point))
189
196
                    (vm-mime-insert-mime-body (car part-list))
190
197
                    (vm-munge-message-separators folder-type start (point))
 
198
                    ;; remove any leading newlines as they will
 
199
                    ;; make vm-reorder-message-headers think the
 
200
                    ;; header section has ended.
 
201
                    (save-excursion
 
202
                      (goto-char start)
 
203
                      (while (= (following-char) ?\n)
 
204
                        (delete-char 1)))
191
205
                    (insert (vm-trailing-message-separator folder-type))
192
206
                    (setq part-list (cdr part-list))))
193
207
                 (t (error
278
292
                    ;; remove the Berkeley and VM status headers and sort
279
293
                    ;; the MIME headers to the top of the message.
280
294
                    (vm-reorder-message-headers nil vm-mime-header-list
281
 
                                                "\\(X-VM-\\|Status:\\)")
 
295
                                                vm-internal-unforwarded-header-regexp)
282
296
                    ;; skip past the MIME headers so that when the
283
297
                    ;; user's header filters are applied they won't
284
298
                    ;; remove the MIME headers.
370
384
                    ;; remove the Berkeley and VM status headers and sort
371
385
                    ;; the MIME headers to the top of the message.
372
386
                    (vm-reorder-message-headers nil vm-mime-header-list
373
 
                                                "\\(X-VM-\\|Status:\\)")
 
387
                                                vm-internal-unforwarded-header-regexp)
374
388
                    ;; skip past the MIME headers so that when the
375
389
                    ;; user's header filters are applied they won't
376
390
                    ;; remove the MIME headers.
462
476
                      (save-match-data
463
477
                        ;; People who roll digests often think
464
478
                        ;; any old format will do.  Adding blank
465
 
                        ;; lines after teh message separator is
466
 
                        ;; common.  Spaces on such lines are an
 
479
                        ;; lines after the message separator is
 
480
                        ;; common.  Spaces in such lines are an
467
481
                        ;; added delight.
468
482
                        (skip-chars-forward " \n")
469
483
                        (or (and (vm-match-header)
750
764
                        (vm-match-header)))
751
765
            (vm-matched-header-contents)
752
766
          nil )))))
 
767
 
 
768
(provide 'vm-digest)