Ignore generated files.
[elisp/epg.git] / epa-file.el
index 0e40924..599e59b 100644 (file)
   :group 'epa-file)
 
 (defcustom epa-file-cache-passphrase-for-symmetric-encryption nil
-  "If t, cache passphrase for symmetric encryption."
+  "If non-nil, cache passphrase for symmetric encryption."
+  :type 'boolean
+  :group 'epa-file)
+
+(defcustom epa-file-inhibit-auto-save t
+  "If non-nil, disable auto-saving when opening an encrypted file."
   :type 'boolean
   :group 'epa-file)
 
@@ -120,6 +125,8 @@ May either be a string or a list of strings.")
   (barf-if-buffer-read-only)
   (if (and visit (or beg end))
       (error "Attempt to visit less than an entire file"))
+  (if epa-file-inhibit-auto-save
+      (auto-save-mode 0))
   (setq file (expand-file-name file))
   (let ((local-copy (epa-file-run-real-handler #'file-local-copy (list file)))
        (context (epg-make-context))