;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;; Created: 1994/08/21 renamed from mime.el
-;; Version: $Revision: 7.104 $
+;; Version: $Revision: 7.106 $
;; Keywords: mail, news, MIME, multimedia, multilingual
;; This file is part of tm (Tools for MIME).
;;;
(defconst mime-editor/RCS-ID
- "$Id: tm-edit.el,v 7.104 1997/02/10 05:49:00 morioka Exp $")
+ "$Id: tm-edit.el,v 7.106 1997/03/20 07:20:15 morioka Exp $")
(defconst mime-editor/version (get-version-string mime-editor/RCS-ID))
(defvar mime-editor/encrypting-type 'pgp-elkins
"*PGP encrypting type (pgp-elkins, pgp-kazu or nil). [tm-edit.el]")
-(defvar mime-editor/pgp-sign-function 'tm:mc-pgp-sign-region)
-(defvar mime-editor/pgp-encrypt-function 'tm:mc-pgp-encrypt-region)
-(defvar mime-editor/traditional-pgp-sign-function 'mc-pgp-sign-region)
-(defvar mime-editor/pgp-insert-public-key-function 'mc-insert-public-key)
-
-(autoload mime-editor/pgp-sign-function "tm-edit-mc")
-(autoload mime-editor/pgp-encrypt-function "tm-edit-mc")
-(autoload mime-editor/traditional-pgp-sign-function "mc-pgp")
-(autoload mime-editor/pgp-insert-public-key-function "mc-toplev")
-
;;; @@ about tag
;;;
(defun mime-editor/insert-text ()
"Insert a text message.
-Charset is automatically obtained from the `mime/lc-charset-alist'."
+Charset is automatically obtained from the `charsets-mime-charset-alist'."
(interactive)
(let ((ret (mime-editor/insert-tag "text" nil nil)))
(if ret
(insert (format "Content-Transfer-Encoding: %s\n" encoding))
)
(insert "\n")
- (or (funcall mime-editor/pgp-sign-function
+ (or (funcall (pgp-function 'mime-sign)
(point-min)(point-max) nil nil pgp-boundary)
(throw 'mime-editor/error 'pgp-error)
)
(insert (format "Content-Transfer-Encoding: %s\n" encoding))
)
(insert "\n")
- (or (funcall mime-editor/pgp-encrypt-function
+ (or (funcall (pgp-function 'encrypt)
recipients (point-min) (point-max) from)
(throw 'mime-editor/error 'pgp-error)
)
)
(insert "\n")
(or (as-binary-process
- (funcall mime-editor/traditional-pgp-sign-function
+ (funcall (pgp-function 'traditional-sign)
beg (point-max)))
(throw 'mime-editor/error 'pgp-error)
)
)
(insert "\n")
(or (as-binary-process
- (funcall mime-editor/pgp-encrypt-function
+ (funcall (pgp-function 'encrypt)
recipients beg (point-max) nil 'maybe)
)
(throw 'mime-editor/error 'pgp-error)
(tag (buffer-substring beg end))
)
(delete-region beg end)
- (setq contype (mime-editor/get-contype tag))
- (setq encoding (mime-editor/get-encoding tag))
- (insert (concat prefix "--" boundary "\n"))
- (save-restriction
- (narrow-to-region (point)(point))
- (insert "Content-Type: " contype "\n")
- (if encoding
- (insert "Content-Transfer-Encoding: " encoding "\n"))
- (mime/encode-message-header)
- )
+ (let ((contype (mime-editor/get-contype tag))
+ (encoding (mime-editor/get-encoding tag))
+ )
+ (insert (concat prefix "--" boundary "\n"))
+ (save-restriction
+ (narrow-to-region (point)(point))
+ (insert "Content-Type: " contype "\n")
+ (if encoding
+ (insert "Content-Transfer-Encoding: " encoding "\n"))
+ (mime/encode-message-header)
+ ))
t)))
(defun mime-editor/translate-region (beg end &optional boundary multipart)
(interactive "P")
(mime-editor/insert-tag "application" "pgp-keys")
(mime-editor/define-encoding "7bit")
- (funcall mime-editor/pgp-insert-public-key-function)
+ (funcall (pgp-function 'insert-key))
)