]> code.delx.au - gnu-emacs/blobdiff - lisp/pgg-pgp5.el
Fix up comment convention on the arch-tag lines.
[gnu-emacs] / lisp / pgg-pgp5.el
index 3cba59916e52528a842c253d9be59521a929126c..44a85ad199c4e3bd982e278a47ddbe50120beeb8 100644 (file)
@@ -1,7 +1,7 @@
 ;;; pgg-pgp5.el --- PGP 5.* support for PGG.
 
 ;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
-;;   2005, 2006 Free Software Foundation, Inc.
+;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Author: Daiki Ueno <ueno@unixuser.org>
 ;; Created: 1999/11/02
@@ -11,7 +11,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -147,23 +147,23 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"."
   "Encrypt the current region between START and END."
   (let* ((pgg-pgp5-user-id (or pgg-pgp5-user-id pgg-default-user-id))
         (passphrase (or passphrase
-                         (when sign
-                           (pgg-read-passphrase
-                            (format "PGP passphrase for %s: "
-                                    pgg-pgp5-user-id)
-                            pgg-pgp5-user-id))))
+                        (when sign
+                          (pgg-read-passphrase
+                           (format "PGP passphrase for %s: "
+                                   pgg-pgp5-user-id)
+                           pgg-pgp5-user-id))))
         (args
-          (append
-           `("+NoBatchInvalidKeys=off" "-fat" "+batchmode=1"
-             ,@(if recipients
-                   (apply #'append
-                          (mapcar (lambda (rcpt)
-                                    (list "-r"
-                                          (concat "\"" rcpt "\"")))
-                                  (append recipients
-                                          (if pgg-encrypt-for-me
-                                              (list pgg-pgp5-user-id)))))))
-           (if sign '("-s" "-u" pgg-pgp5-user-id)))))
+         (append
+          `("+NoBatchInvalidKeys=off" "-fat" "+batchmode=1"
+            ,@(if (or recipients pgg-encrypt-for-me)
+                  (apply #'append
+                         (mapcar (lambda (rcpt)
+                                   (list "-r"
+                                         (concat "\"" rcpt "\"")))
+                                 (append recipients
+                                         (if pgg-encrypt-for-me
+                                             (list pgg-pgp5-user-id)))))))
+          (if sign '("-s" "-u" pgg-pgp5-user-id)))))
     (pgg-pgp5-process-region start end nil pgg-pgp5-pgpe-program args)
     (pgg-process-when-success nil)))
 
@@ -171,10 +171,10 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"."
   "Decrypt the current region between START and END."
   (let* ((pgg-pgp5-user-id (or pgg-pgp5-user-id pgg-default-user-id))
         (passphrase
-          (or passphrase
-              (pgg-read-passphrase
-               (format "PGP passphrase for %s: " pgg-pgp5-user-id)
-               (pgg-pgp5-lookup-key pgg-pgp5-user-id 'encrypt))))
+         (or passphrase
+             (pgg-read-passphrase
+              (format "PGP passphrase for %s: " pgg-pgp5-user-id)
+              (pgg-pgp5-lookup-key pgg-pgp5-user-id 'encrypt))))
         (args
          '("+verbose=1" "+batchmode=1" "+language=us" "-f")))
     (pgg-pgp5-process-region start end passphrase pgg-pgp5-pgpv-program args)
@@ -184,10 +184,10 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"."
   "Make detached signature from text between START and END."
   (let* ((pgg-pgp5-user-id (or pgg-pgp5-user-id pgg-default-user-id))
         (passphrase
-          (or passphrase
-              (pgg-read-passphrase
-               (format "PGP passphrase for %s: " pgg-pgp5-user-id)
-               (pgg-pgp5-lookup-key pgg-pgp5-user-id 'sign))))
+         (or passphrase
+             (pgg-read-passphrase
+              (format "PGP passphrase for %s: " pgg-pgp5-user-id)
+              (pgg-pgp5-lookup-key pgg-pgp5-user-id 'sign))))
         (args
          (list (if clearsign "-fat" "-fbat")
                "+verbose=1" "+language=us" "+batchmode=1"
@@ -256,5 +256,5 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"."
 
 (provide 'pgg-pgp5)
 
-;;; arch-tag: 3dbd1073-6b3a-466c-9f55-5c587ffa6d7b
+;; arch-tag: 3dbd1073-6b3a-466c-9f55-5c587ffa6d7b
 ;;; pgg-pgp5.el ends here