+2000-11-13 22:08:09 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * 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 <zsh@cs.rochester.edu>
* mm-decode.el (mm-get-part): Don't call mm-insert-part.
(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)))
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." ))
(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." ))
(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))