2000-11-13 22:08:09 ShengHuo ZHU <zsh@cs.rochester.edu>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Tue, 14 Nov 2000 02:50:20 +0000 (02:50 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Tue, 14 Nov 2000 02:50:20 +0000 (02:50 +0000)
* mml2015.el (mml2015-mailcrypt-sign): Remove "-" escape.
* mml.el (mml-generate-mime-1): Save cont. skip multipart attributes.

lisp/ChangeLog
lisp/mml.el
lisp/mml2015.el

index 8cf0fa0..315bfe6 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 8bafd18..f740e24 100644 (file)
@@ -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)))
index 154677f..d38bf68 100644 (file)
                   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))