diff lisp/tm/tm-edit.el @ 22:8fc7fe29b841 r19-15b94

Import from CVS: tag r19-15b94
author cvs
date Mon, 13 Aug 2007 08:50:29 +0200
parents 0293115a14e9
children 7e54bd776075
line wrap: on
line diff
--- a/lisp/tm/tm-edit.el	Mon Aug 13 08:50:06 2007 +0200
+++ b/lisp/tm/tm-edit.el	Mon Aug 13 08:50:29 2007 +0200
@@ -6,7 +6,7 @@
 ;;         MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;; Created: 1994/08/21 renamed from mime.el
-;; Version: $Revision: 1.5 $
+;; Version: $Revision: 1.6 $
 ;; Keywords: mail, news, MIME, multimedia, multilingual
 
 ;; This file is part of tm (Tools for MIME).
@@ -120,7 +120,7 @@
 ;;;
 
 (defconst mime-editor/RCS-ID
-  "$Id: tm-edit.el,v 1.5 1997/02/02 05:06:19 steve Exp $")
+  "$Id: tm-edit.el,v 1.6 1997/02/16 01:29:32 steve Exp $")
 
 (defconst mime-editor/version (get-version-string mime-editor/RCS-ID))
 
@@ -433,16 +433,6 @@
 (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
 ;;;
@@ -880,7 +870,7 @@
 
 (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
@@ -1558,7 +1548,7 @@
 	    (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)
 	    )
@@ -1622,7 +1612,7 @@
 	      (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)
 	      )
@@ -1659,7 +1649,7 @@
 	  )
 	(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)
 	    )
@@ -1693,7 +1683,7 @@
 	    )
 	  (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)
@@ -2074,7 +2064,7 @@
   (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))
   )
 
 
@@ -2444,7 +2434,10 @@
 	      (setq type ctype)
 	      )
 	    (cond
-	     ((string-equal type "multipart")
+	     ((string= ctype "application/pgp-signature")
+	      (delete-region (point-min)(point-max))
+	      )
+	     ((string= type "multipart")
 	      (let* ((boundary (assoc-value "boundary" params))
 		     (boundary-pat
 		      (concat "\n--" (regexp-quote boundary) "[ \t]*\n"))