From 369718f8db84c881817a6368996984e2693c3e1b Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 20 Apr 1995 02:31:16 +0000 Subject: [PATCH] (undigestify-rmail-message): Strip "^- " which is added by some digest makers to the beginning of lines. --- lisp/mail/undigest.el | 17 +++++++++++++++-- 1 file 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)) -- 2.39.5