Save current-prefix-arg.
authorueno <ueno>
Sun, 31 Dec 2006 11:17:47 +0000 (11:17 +0000)
committerueno <ueno>
Sun, 31 Dec 2006 11:17:47 +0000 (11:17 +0000)
epa.el

diff --git a/epa.el b/epa.el
index e064e92..7ff6747 100644 (file)
--- a/epa.el
+++ b/epa.el
@@ -682,15 +682,16 @@ d - Create a detached signature
 (defun epa-sign-file (file signers mode)
   "Sign FILE by SIGNERS keys selected."
   (interactive
-   (list (expand-file-name (read-file-name "File: "))
-        (if current-prefix-arg
-            (epa-select-keys (epg-make-context epa-protocol)
-                             "Select keys for signing.
+   (let ((verbose current-prefix-arg))
+     (list (expand-file-name (read-file-name "File: "))
+          (if verbose
+              (epa-select-keys (epg-make-context epa-protocol)
+                               "Select keys for signing.
 If no one is selected, default secret key is used.  "
-                             nil t))
-        (if current-prefix-arg
-            (epa--read-signature-type)
-          'clear)))
+                               nil t))
+          (if verbose
+              (epa--read-signature-type)
+            'clear))))
   (let ((signature (concat file
                           (if (eq epa-protocol 'OpenPGP)
                               (if (or epa-armor
@@ -884,18 +885,18 @@ Don't use this command in Lisp programs!"
 
 Don't use this command in Lisp programs!"
   (interactive
-   (progn
+   (let ((verbose current-prefix-arg))
      (setq epa-last-coding-system-specified
           (or coding-system-for-write
               (epa--select-safe-coding-system
                (region-beginning) (region-end))))
      (list (region-beginning) (region-end)
-          (if current-prefix-arg
+          (if verbose
               (epa-select-keys (epg-make-context epa-protocol)
                                "Select keys for signing.
 If no one is selected, default secret key is used.  "
                                nil t))
-          (if current-prefix-arg
+          (if verbose
               (epa--read-signature-type)
             'clear))))
   (save-excursion
@@ -965,15 +966,16 @@ Don't use this command in Lisp programs!"
      (setq epa-last-coding-system-specified
           (or coding-system-for-write
               (epa--select-safe-coding-system (point) (point-max))))
-     (list (point) (point-max)
-          (if current-prefix-arg
-              (epa-select-keys (epg-make-context epa-protocol)
-                               "Select keys for signing.
+     (let ((verbose current-prefix-arg))
+       (list (point) (point-max)
+            (if verbose
+                (epa-select-keys (epg-make-context epa-protocol)
+                                 "Select keys for signing.
 If no one is selected, default secret key is used.  "
-                               nil t))
-          (if current-prefix-arg
-              (epa--read-signature-type)
-            'clear))))
+                                 nil t))
+            (if verbose
+                (epa--read-signature-type)
+              'clear)))))
   (epa-sign-region start end signers mode))
 
 ;;;###autoload
@@ -1032,7 +1034,8 @@ If no one is selected, symmetric encryption will be performed.  ")
 Don't use this command in Lisp programs!"
   (interactive
    (save-excursion
-     (let (recipients)
+     (let ((verbose current-prefix-arg)
+          recipients)
        (goto-char (point-min))
        (when (epa--mail-mode-p)
         (save-restriction
@@ -1057,7 +1060,7 @@ Don't use this command in Lisp programs!"
             (or coding-system-for-write
                 (epa--select-safe-coding-system (point) (point-max))))
        (list (point) (point-max)
-            (if current-prefix-arg
+            (if verbose
                 (epa-select-keys
                  (epg-make-context epa-protocol)
                  "Select recipients for encryption.
@@ -1072,7 +1075,7 @@ If no one is selected, symmetric encryption will be performed.  "
                                    (epg-make-context epa-protocol)
                                    (concat "<" recipient ">")))
                                 recipients)))))
-            (if current-prefix-arg
+            (if verbose
                 (y-or-n-p "Sign? "))))))
   (epa-encrypt-region start end recipients sign))