2000-10-28 03:43:03 ShengHuo ZHU <zsh@cs.rochester.edu>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Sat, 28 Oct 2000 06:50:10 +0000 (06:50 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Sat, 28 Oct 2000 06:50:10 +0000 (06:50 +0000)
* mm-decode.el (mm-find-part-by-type): Move it here.
* mml.el (mml-postprocess): Move it here.
(mml-postprocess-alist): Move it here. Merge them.

lisp/ChangeLog
lisp/mm-decode.el
lisp/mml-smime.el
lisp/mml.el
lisp/mml2015.el

index 6fada7a..df8af35 100644 (file)
@@ -1,3 +1,9 @@
+2000-10-28 03:43:03  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * mm-decode.el (mm-find-part-by-type): Move it here.
+       * mml.el (mml-postprocess): Move it here.
+       (mml-postprocess-alist): Move it here. Merge them.
+
 2000-10-28 03:38:39  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * rfc2047.el (rfc2047-encode-message-header): Make sure no
index c549ebd..729c461 100644 (file)
@@ -841,6 +841,17 @@ external if displayed external."
   (and (mm-valid-image-format-p format)
        (mm-image-fit-p handle)))
 
+(defun mm-find-part-by-type (handles type &optional notp) 
+  (let (handle)
+    (while handles
+      (if (if notp
+             (not (equal (mm-handle-media-type (car handles)) type))
+           (equal (mm-handle-media-type (car handles)) type))
+         (setq handle (car handles)
+               handles nil))
+      (setq handles (cdr handles)))
+    handle))
+
 (provide 'mm-decode)
 
 ;;; mm-decode.el ends here
index a216fe8..6a745df 100644 (file)
@@ -37,6 +37,7 @@
 
 (require 'smime)
 
+;;;###autoload
 (defun mml-smime-sign (cont)
   ;; FIXME: You have to input the sender.
   (when (null smime-keys)
@@ -48,6 +49,7 @@
     (delete-region (point-min) (point)))
   (goto-char (point-max)))
   
+;;;###autoload
 (defun mml-smime-encrypt (cont)
   ;; FIXME: You have to input the receiptant.
   ;; FIXME: Should encrypt to myself so I can read it??
     (delete-region (point-min) (point)))
   (goto-char (point-max)))
 
-;; The following code might be moved into mml.el or gnus-art.el.
-
-(defvar mml-postprocess-alist
-  '(("smime-sign" . mml-smime-sign)
-    ("smime-encrypt" . mml-smime-encrypt))
-  "Alist of postprocess functions.")
-
-(defun mml-postprocess (cont)
-  (let ((pp (cdr (or (assq 'postprocess cont)
-                    (assq 'pp cont))))
-       item)
-    (if (and pp (setq item (assoc pp mml-postprocess-alist)))
-       (funcall (cdr item) cont))))
-
+;;;###autoload
 (defun mml-smime-setup ()
   (setq mml-generate-mime-postprocess-function 'mml-postprocess))
 
index 8c7b849..b91a840 100644 (file)
@@ -81,6 +81,13 @@ generated.")
   "A function called after generating a mime part.
 The function is called with one parameter, which is the generated part.")
 
+(defvar mml-postprocess-alist
+  '(("pgp-sign" . mml2015-mailcrypt-sign)
+    ("pgp-encrypt" . mml2015-mailcrypt-encrypt)
+    ("smime-sign" . mml-smime-sign)
+    ("smime-encrypt" . mml-smime-encrypt))
+  "Alist of postprocess functions.")
+
 (defvar mml-generate-default-type "text/plain")
 
 (defvar mml-buffer-list nil)
@@ -849,6 +856,13 @@ If RAW, don't highlight the article."
   (interactive)
   (mml-parse))
 
+(defun mml-postprocess (cont)
+  (let ((pp (cdr (or (assq 'postprocess cont)
+                    (assq 'pp cont))))
+       item)
+    (if (and pp (setq item (assoc pp mml-postprocess-alist)))
+       (funcall (cdr item) cont))))
+
 (provide 'mml)
 
 ;;; mml.el ends here
index 1cbe133..e8c2980 100644 (file)
@@ -38,6 +38,7 @@
 (defvar mml2015-decrypt-function 'mailcrypt-decrypt)
 (defvar mml2015-verify-function 'mailcrypt-verify)
 
+;;;###autoload
 (defun mml2015-decrypt (handle)
   (let (child)
     (cond 
@@ -92,6 +93,7 @@
 
 (defvar mml2015-mailcrypt-prefix 0)
 
+;;;###autoload
 (defun mml2015-mailcrypt-sign (cont)
   (mailcrypt-sign mml2015-mailcrypt-prefix)
   (let ((boundary 
     (insert (format "--%s--\n" boundary))
     (goto-char (point-max))))
 
+;;;###autoload
 (defun mml2015-mailcrypt-encrypt (cont)
   ;; FIXME:
   ;; You have to input the receiptant.
     (insert (format "--%s--\n" boundary))
     (goto-char (point-max))))
 
-;; The following code might be moved into mml.el or gnus-art.el.
-
-(defvar mml-postprocess-alist
-  '(("pgp-sign" . mml2015-mailcrypt-sign)
-    ("pgp-encrypt" . mml2015-mailcrypt-encrypt))
-  "Alist of postprocess functions.")
-
-(defun mml-postprocess (cont)
-  (let ((pp (cdr (or (assq 'postprocess cont)
-                    (assq 'pp cont))))
-       item)
-    (if (and pp (setq item (assoc pp mml-postprocess-alist)))
-       (funcall (cdr item) cont))))
-
+;;;###autoload
 (defun mml2015-setup ()
   (setq mml-generate-mime-postprocess-function 'mml-postprocess)
 ;  (push '("multipart/signed" . mml2015-verify)
   (push '("multipart/encrypted" . mml2015-decrypt)
        gnus-mime-multipart-functions))
 
-;; The following code might be moved into mm-decode.el.
-
-(defun mm-find-part-by-type (handles type &optional notp) 
-  (let (handle)
-    (while handles
-      (if (if notp
-             (not (equal (mm-handle-media-type (car handles)) type))
-           (equal (mm-handle-media-type (car handles)) type))
-         (setq handle (car handles)
-               handles nil))
-      (setq handles (cdr handles)))
-    handle))
-
 (provide 'mml2015)
 
 ;;; mml2015.el ends here