# HG changeset patch # User Glenn Morris # Date 1233975719 0 # Node ID 1eedc742bd61e46ba80b6429d2c7feda75fe30cb # Parent a4a5037b3040bee3cb74dc1d87dfa36a87240b1e Sync final change from rmail-mox-branch, rev 1.13.2.4, 2006-01-16. Alex Schroeder (unrmail): Use regexps to find message separators so as not to match any fake rmime.el separators. Remove any sections added by rmime.el. diff -r a4a5037b3040 -r 1eedc742bd61 lisp/mail/unrmail.el --- a/lisp/mail/unrmail.el Fri Feb 06 17:19:10 2009 +0000 +++ b/lisp/mail/unrmail.el Sat Feb 07 03:01:59 2009 +0000 @@ -107,11 +107,12 @@ (from-buffer (current-buffer))) ;; Process the messages one by one. - (while (search-forward "\^_\^l" nil t) + (while (re-search-forward "^\^_\^l" nil t) (let ((beg (point)) (end (save-excursion - (if (search-forward "\^_" nil t) - (1- (point)) (point-max)))) + (if (re-search-forward "^\^_\\(\^l\\|\\'\\)" nil t) + (match-beginning 0) + (point-max)))) (coding 'raw-text) label-line attrs keywords mail-from reformatted) @@ -173,6 +174,12 @@ (re-search-forward "^[*][*][*] EOOH [*][*][*]\n") (delete-region (point-min) (point))) + ;; Handle rmime formatting. + (when (require 'rmime nil t) + (let ((start (point))) + (while (search-forward rmime-magic-string nil t)) + (delete-region start (point)))) + ;; Some operations on the message header itself. (goto-char (point-min)) (save-restriction