* epa-file.el (epa-file-write-region): Ask recipients only the
first time.
+ (epa-file-select-keys): New user option.
2007-04-19 Daiki Ueno <ueno@unixuser.org>
:type 'boolean
:group 'epa-file)
+(defcustom epa-file-select-keys nil
+ "If non-nil, always asks user to select recipients."
+ :type 'boolean
+ :group 'epa-file)
+
(defvar epa-file-encrypt-to nil
"*Recipient(s) used for encrypting files.
May either be a string or a list of strings.")
(epa-file--encode-coding-string start coding-system)
(epa-file--encode-coding-string (buffer-substring start end)
coding-system))
- (if (local-variable-p 'epa-file-encrypt-to)
- (if epa-file-encrypt-to
- (epg-list-keys context recipients))
- (epa-select-keys
- context
- "Select recipents for encryption.
+ (if (or epa-file-select-keys
+ (not (local-variable-p 'epa-file-encrypt-to)))
+ (epa-select-keys
+ context
+ "Select recipents for encryption.
If no one is selected, symmetric encryption will be performed. "
- recipients))))
+ recipients)
+ (if epa-file-encrypt-to
+ (epg-list-keys context recipients)))))
(error
(if (setq entry (assoc file epa-file-passphrase-alist))
(setcdr entry nil))