From: yamaoka Date: Mon, 20 Feb 2006 04:17:01 +0000 (+0000) Subject: Synch with semi-1_14 branch. X-Git-Tag: emiko-1_14-epg-branchpoint~8 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=fdcad2c843f99ab9042ba6f493ddd79cd78789d8;p=elisp%2Fsemi.git Synch with semi-1_14 branch. --- diff --git a/ChangeLog b/ChangeLog index a66865f..17d3e77 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. + 2003-12-18 Daiki Ueno * pgg-gpg.el (pgg-gpg-process-region): Set environment variable diff --git a/mime-edit.el b/mime-edit.el index 31a2c70..816cd3b 100644 --- a/mime-edit.el +++ b/mime-edit.el @@ -1656,6 +1656,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 @@ -1667,6 +1674,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