diff options
author | Glenn Morris <rgm@gnu.org> | 2009-02-07 03:01:59 +0000 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2009-02-07 03:01:59 +0000 |
commit | 417c7530ed0bfc1bf67018d3ccb206782e43ce96 (patch) | |
tree | 283b1e40806f3a913aededfca7f18e78c31ec902 /lisp/mail/unrmail.el | |
parent | 35ce13d0370c9a3f2ff2228c7bf547efd68b1480 (diff) | |
download | emacs-417c7530ed0bfc1bf67018d3ccb206782e43ce96.tar.gz |
Sync final change from rmail-mox-branch, rev 1.13.2.4, 2006-01-16.
Alex Schroeder <alex at gnu.org>
(unrmail): Use regexps to find message separators so as not to match
any fake rmime.el separators. Remove any sections added by rmime.el.
Diffstat (limited to 'lisp/mail/unrmail.el')
-rw-r--r-- | lisp/mail/unrmail.el | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/mail/unrmail.el b/lisp/mail/unrmail.el index 395e7d2e2e6..ecf4bdeec4f 100644 --- a/lisp/mail/unrmail.el +++ b/lisp/mail/unrmail.el @@ -107,11 +107,12 @@ For example, invoke `emacs -batch -f batch-unrmail RMAIL'." (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 @@ For example, invoke `emacs -batch -f batch-unrmail RMAIL'." (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 |