diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-04-20 02:31:16 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-04-20 02:31:16 +0000 |
commit | b3978a31e70a6315b4fc3c52a91ae2da0b899949 (patch) | |
tree | 42fc43d75cfeab64189d40421e3f8352afc16790 /lisp/mail | |
parent | ea4ab1db45402867de49b9a5f609787f2dea4647 (diff) | |
download | emacs-b3978a31e70a6315b4fc3c52a91ae2da0b899949.tar.gz |
(undigestify-rmail-message): Strip "^- " which is
added by some digest makers to the beginning of lines.
Diffstat (limited to 'lisp/mail')
-rw-r--r-- | lisp/mail/undigest.el | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/lisp/mail/undigest.el b/lisp/mail/undigest.el index 78e55553890..b80a5f4a48b 100644 --- a/lisp/mail/undigest.el +++ b/lisp/mail/undigest.el @@ -99,9 +99,22 @@ Leaves original message, deleted, before the undigestified messages." (progn (search-forward "\n\n" nil 'move) (point)))) - (if (mail-fetch-field "To") nil + (if (mail-fetch-field "To") + nil (goto-char (point-min)) - (insert "To: " digest-name "\n")))))) + (insert "To: " digest-name "\n"))) + ;; Digestifiers may insert `- ' on lines that start with `-'. + ;; Undo that. + (save-excursion + (goto-char (point-min)) + (if (re-search-forward + "\n\n----------------------------*\n*" + nil t) + (let ((end (point-marker))) + (goto-char (point-min)) + (while (re-search-forward "^- " end t) + (delete-char -2))))) + ))) (setq error nil) (message "Message successfully undigestified") (let ((n rmail-current-message)) |