From: Richard M. Stallman Date: Thu, 20 Apr 1995 02:31:16 +0000 (+0000) Subject: (undigestify-rmail-message): Strip "^- " which is X-Git-Tag: emacs-19.34~4360 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=369718f8db84c881817a6368996984e2693c3e1b;p=emacs.git (undigestify-rmail-message): Strip "^- " which is added by some digest makers to the beginning of lines. --- 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))