* gnus-sync.el (gnus-sync-file-encrypt-to, gnus-sync-save): Set epa-file-encrypt...
authorTed Zlatanov <tzz@lifelogs.com>
Sat, 22 Dec 2012 20:02:32 +0000 (15:02 -0500)
committerTed Zlatanov <tzz@lifelogs.com>
Sat, 22 Dec 2012 20:02:32 +0000 (15:02 -0500)
lisp/ChangeLog
lisp/gnus-sync.el

index fe20468..048a660 100644 (file)
@@ -1,3 +1,8 @@
+2012-12-22  Philipp Haselwarter <philipp@haselwarter.org>
+
+       * gnus-sync.el (gnus-sync-file-encrypt-to, gnus-sync-save): Set
+       epa-file-encrypt-to from variable to avoid querying.
+
 2012-12-14  Akinori MUSHA  <knu@iDaemons.org>  (tiny change)
 
        * sieve-mode.el (sieve-font-lock-keywords):
index 8584e94..547efc0 100644 (file)
@@ -150,6 +150,11 @@ and `gnus-topic-alist'.  Also see `gnus-variable-list'."
 (defvar gnus-sync-newsrc-loader nil
   "Carrier for newsrc data")
 
+(defcustom gnus-sync-file-encrypt-to nil
+  "If non-nil, `epa-file-encrypt-to' is set from this for encrypting the Sync
+  file."
+  :group 'gnus-sync)
+
 (defcustom gnus-sync-lesync-name (system-name)
   "The LeSync name for this machine."
   :group 'gnus-sync
@@ -775,6 +780,9 @@ With a prefix, FORCE is set and all groups will be saved."
         (progn
           (let ((coding-system-for-write gnus-ding-file-coding-system)
                 (standard-output (current-buffer)))
+            (when gnus-sync-file-encrypt-to
+              (set (make-local-variable 'epa-file-encrypt-to)
+                   gnus-sync-file-encrypt-to))
             (princ (format ";; -*- mode:emacs-lisp; coding: %s; -*-\n"
                            gnus-ding-file-coding-system))
             (princ ";; Gnus sync data v. 0.0.1\n")