: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)
(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))
(setq file (expand-file-name file))
(let* ((coding-system (or coding-system-for-write
(if (fboundp 'select-safe-coding-system)
- (select-safe-coding-system
- (point-min) (point-max))
+ ;; This is needed since Emacs 22 has
+ ;; no-conversion setting for *.gpg in
+ ;; `auto-coding-alist'.
+ (let ((buffer-file-name
+ (file-name-sans-extension file)))
+ (select-safe-coding-system
+ (point-min) (point-max)))
buffer-file-coding-system)))
(context (epg-make-context))
(coding-system-for-write 'binary)