# HG changeset patch # User Alex Schroeder # Date 1137433818 0 # Node ID 6e97bfe9f7f05d905c340a523bbc5ccc0b6d02e2 # Parent a271a865e911d9d33bc97c040804344f40ce2f21 (unrmail): Use regular expression search to find message separators such that the fake separators inserted by rmime.el are not matched. The sections added by rmime.el are removed. diff -r a271a865e911 -r 6e97bfe9f7f0 lisp/mail/unrmail.el --- a/lisp/mail/unrmail.el Mon Jan 16 04:11:37 2006 +0000 +++ b/lisp/mail/unrmail.el Mon Jan 16 17:50:18 2006 +0000 @@ -108,11 +108,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