* 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: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
(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
(require 'smime)
+;;;###autoload
(defun mml-smime-sign (cont)
;; FIXME: You have to input the sender.
(when (null smime-keys)
(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))
"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)
(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
(defvar mml2015-decrypt-function 'mailcrypt-decrypt)
(defvar mml2015-verify-function 'mailcrypt-verify)
+;;;###autoload
(defun mml2015-decrypt (handle)
(let (child)
(cond
(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