From: ueno Date: Tue, 20 Mar 2007 23:07:17 +0000 (+0000) Subject: (epa-file-inhibit-auto-save): New user option. X-Git-Tag: epg-0_0_11~46 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbc21ba955f6a8b45d7ad8c81afd3a5bd1437716;p=elisp%2Fepg.git (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" --- diff --git a/ChangeLog b/ChangeLog index 42600fd..ce80b30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-03-21 Daiki Ueno + * 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. diff --git a/epa-file.el b/epa-file.el index 0e40924..46b9bfc 100644 --- a/epa-file.el +++ b/epa-file.el @@ -39,6 +39,11 @@ :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.") @@ -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))