X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=mime-mc.el;h=52314b3c0b261f63175f42e76bcb4fbcad9bc7d8;hb=09f40ad99cde24ded82094c59961ca30f1452f88;hp=75ba1298a31524575479512cb640e9091b9b13b8;hpb=3cc749dc0dac0f1f3a1b9629147e7e3cb939abea;p=elisp%2Fsemi.git diff --git a/mime-mc.el b/mime-mc.el index 75ba129..52314b3 100644 --- a/mime-mc.el +++ b/mime-mc.el @@ -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 -;; 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 @@ -26,13 +25,12 @@ ;;; 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