From: yamaoka Date: Tue, 14 Nov 2000 04:54:31 +0000 (+0000) Subject: Synch with Gnus. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=42d2d180a6fe63e46ceb63d9cff4a9900feb0ff6;p=elisp%2Fgnus.git- Synch with Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c81216a..c058d84 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2000-11-13 22:08:09 ShengHuo ZHU + + * mml2015.el (mml2015-mailcrypt-sign): Remove "-" escape. + * mml.el (mml-generate-mime-1): Save cont. skip multipart attributes. + 2000-11-13 20:43:37 ShengHuo ZHU * mm-decode.el (mm-get-part): Don't call mm-insert-part. diff --git a/lisp/mml.el b/lisp/mml.el index 8bafd18..f740e24 100644 --- a/lisp/mml.el +++ b/lisp/mml.el @@ -396,11 +396,12 @@ If MML is non-nil, return the buffer up till the correspondent mml tag." (let ((mml-boundary (mml-compute-boundary cont))) (insert (format "Content-Type: multipart/%s; boundary=\"%s\"\n" type mml-boundary)) - ;; Skip `multipart' and `type' elements. - (setq cont (cddr cont)) - (while cont - (insert "\n--" mml-boundary "\n") - (mml-generate-mime-1 (pop cont))) + (let ((cont cont) part) + (while (setq part (pop cont)) + ;; Skip `multipart' and attributes. + (when (and (consp part) (consp (cdr part))) + (insert "\n--" mml-boundary "\n") + (mml-generate-mime-1 part)))) (insert "\n--" mml-boundary "--\n"))))) (t (error "Invalid element: %S" cont))) diff --git a/lisp/mml2015.el b/lisp/mml2015.el index 154677f..d38bf68 100644 --- a/lisp/mml2015.el +++ b/lisp/mml2015.el @@ -210,7 +210,7 @@ nil nil nil nil) (let ((boundary (funcall mml-boundary-function (incf mml-multipart-number))) - hash) + hash point) (goto-char (point-min)) (unless (re-search-forward "^-----BEGIN PGP SIGNED MESSAGE-----\r?$" nil t) (error "Cannot find signed begin line." )) @@ -228,6 +228,7 @@ (insert (format "\tmicalg=pgp-%s; protocol=\"application/pgp-signature\"\n" (downcase hash))) (insert (format "\n--%s\n" boundary)) + (setq point (point)) (goto-char (point-max)) (unless (re-search-backward "^-----END PGP \\(SIGNATURE\\)-----\r?$" nil t) (error "Cannot find signature part." )) @@ -238,6 +239,12 @@ (error "Cannot find signature part." )) (replace-match "MESSAGE" t t nil 1) (goto-char (match-beginning 0)) + (save-restriction + (narrow-to-region point (point)) + (goto-char point) + (while (re-search-forward "^- -" nil t) + (replace-match "-" t t)) + (goto-char (point-max))) (insert (format "--%s\n" boundary)) (insert "Content-Type: application/pgp-signature\n\n") (goto-char (point-max))