From: kaoru Date: Sat, 18 Feb 2006 14:23:19 +0000 (+0000) Subject: * mime-edit.el (mime-edit-delete-trailing-whitespace): New Function for RFC3156. X-Git-Tag: semi-1_14-wl-root~24 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0eccf7aadab9ca0102c08deec0eb0adaf3fdbfa;p=elisp%2Fsemi.git * mime-edit.el (mime-edit-delete-trailing-whitespace): New Function for RFC3156. (mime-edit-sign-pgp-mime): Use it. --- diff --git a/ChangeLog b/ChangeLog index 99d0ea5..938fcb7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-02-18 TAKAHASHI Kaoru + + * mime-edit.el (mime-edit-delete-trailing-whitespace): New + Function for RFC3156. + (mime-edit-sign-pgp-mime): Use it. + 2005-06-14 Katsumi Yamaoka * mime-view.el (mime-display-text/richtext): Withdraw the last diff --git a/mime-edit.el b/mime-edit.el index 5d2eb45..0377302 100644 --- a/mime-edit.el +++ b/mime-edit.el @@ -1792,6 +1792,13 @@ Parameter must be '(PROMPT CHOICE1 (CHOICE2...))." (defvar mime-edit-pgp-user-id nil) +(defun mime-edit-delete-trailing-whitespace () + (save-match-data + (save-excursion + (goto-char (point-min)) + (while (re-search-forward "[ \t]+$" nil t) + (delete-region (match-beginning 0) (match-end 0)))))) + (defun mime-edit-sign-pgp-mime (beg end boundary) (save-excursion (save-restriction @@ -1803,6 +1810,7 @@ Parameter must be '(PROMPT CHOICE1 (CHOICE2...))." (encoding (nth 1 ret)) (pgp-boundary (concat "pgp-sign-" boundary)) micalg) + (mime-edit-delete-trailing-whitespace) ; RFC3156 (goto-char beg) (insert (format "Content-Type: %s\n" ctype)) (if encoding