2007-03-21 Daiki Ueno <ueno@unixuser.org>
+ * epa-file.el (epa-file-inhibit-auto-save): New user option.
+ (epa-file-insert-file-contents): Turn off auto-save-mode if
+ epa-file-inhibit-auto-save is non-nil.
+ Reported by "[ #9937] epa-file auto-saves in plain text"
+
* epa.el (epa--list-keys): New function.
(epa-list-keys): Use it.
(epa-list-secret-keys): New command.
:type 'boolean
:group 'epa-file)
+(defcustom epa-file-inhibit-auto-save t
+ "If t, disable auto-saving when opening an encrypted file."
+ :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.")
(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))