Mercurial > emacs
diff lisp/mail/unrmail.el @ 88161:6e97bfe9f7f0
(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.
author | Alex Schroeder <alex@gnu.org> |
---|---|
date | Mon, 16 Jan 2006 17:50:18 +0000 |
parents | d7ddb3e565de |
children |
line wrap: on
line diff
--- 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