+2006-11-20 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
+
+ * epa-file.el (epa-file-encrypt-to): New file local variable.
+ (epa-file-write-region): Specify recipients by epa-file-encrypt-to.
+
2006-11-26 Daiki Ueno <ueno@unixuser.org>
* epa.el (epa-sign-file): Query signature type at a time.
: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.")
+
+;;;###autoload
+(put 'epa-file-encrypt-to 'safe-local-variable
+ (lambda (val)
+ (or (stringp val)
+ (and (listp val)
+ (catch 'safe
+ (mapc (lambda (elt)
+ (unless (stringp elt)
+ (throw 'safe nil)))
+ val)
+ t)))))
+
(defvar epa-file-handler
(cons epa-file-name-regexp 'epa-file-handler))
(epa-select-keys
context
"Select recipents for encryption.
-If no one is selected, symmetric encryption will be performed. "))))
+If no one is selected, symmetric encryption will be performed. "
+ (cond
+ ((listp epa-file-encrypt-to) epa-file-encrypt-to)
+ ((stringp epa-file-encrypt-to) (list epa-file-encrypt-to)))))))
(error
(if (setq entry (assoc file epa-file-passphrase-alist))
(setcdr entry nil))