update.
[elisp/semi.git] / mime-mc.el
index 75ba129..52314b3 100644 (file)
@@ -1,12 +1,11 @@
 ;;; mime-mc.el --- Mailcrypt interface for SEMI
 
-;; Copyright (C) 1996,1997 MORIOKA Tomohiko
+;; Copyright (C) 1996,1997,1998 MORIOKA Tomohiko
 
 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Version: $Id: mime-mc.el,v 0.0 1997-02-27 08:03:48 tmorioka Exp $
 ;; Keywords: PGP, security, MIME, multimedia, mail, news
 
-;; This file is part of SEMI (SEMI is Emacs MIME Interfaces).
+;; This file is part of SEMI (Secure Emacs MIME Interface).
 
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as
 ;;; Code:
 
 (require 'mailcrypt)
-(load "mc-pgp")
+(eval-and-compile (load "mc-pgp"))
 
 (defun mime-mc-pgp-generic-parser (result)
   (let ((ret (mc-pgp-generic-parser result)))
     (if (consp ret)
-       (vector (car ret)(cdr ret))
-      )))
+       (vector (car ret)(cdr ret)))))
 
 (defun mime-mc-process-region
   (beg end passwd program args parser &optional buffer boundary)
@@ -88,12 +86,10 @@ Content-Transfer-Encoding: 7bit
 " boundary))
                        (insert-buffer-substring mybuf (car rgn) (cdr rgn))
                        (goto-char (point-max))
-                       (insert (format "\n--%s--\n" boundary))
-                       )
+                       (insert (format "\n--%s--\n" boundary)))
                    (delete-region beg end)
                    (goto-char beg)
-                   (insert-buffer-substring mybuf (car rgn) (cdr rgn))
-                   )
+                   (insert-buffer-substring mybuf (car rgn) (cdr rgn)))
                  (set-buffer mybuf)
                  (delete-region (car rgn) (cdr rgn)))))
          ;; Return nil on failure and exit code on success
@@ -112,8 +108,7 @@ Content-Transfer-Encoding: 7bit
        (buffer (get-buffer-create mc-buffer-name))
        passwd args key
        (parser (function mc-pgp-generic-parser))
-       (pgp-path mc-pgp-path)
-       )
+       (pgp-path mc-pgp-path))
     (setq key (mc-pgp-lookup-key (or id mc-pgp-user-id)))
     (setq passwd
          (mc-activate-passwd
@@ -129,8 +124,7 @@ Content-Transfer-Encoding: 7bit
                 (format "+clearsig=%s" (if unclear "off" "on"))
                 "+batchmode" "-u" (cdr key))))
     (if mc-pgp-comment
-       (setq args (cons (format "+comment=%s" mc-pgp-comment) args))
-      )
+       (setq args (cons (format "+comment=%s" mc-pgp-comment) args)))
     (message "Signing as %s ..." (car key))
     (if (mime-mc-process-region
         start end passwd pgp-path args parser buffer boundary)
@@ -153,8 +147,7 @@ Content-Transfer-Encoding: 7bit
                              'never)))
     (mc-pgp-encrypt-region
      (mc-split "\\([ \t\n]*,[ \t\n]*\\)+" recipients)
-     start end id nil)
-    ))
+     start end id nil)))
 
                
 ;;; @ end