1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-13 16:38:14 +00:00

epa-inhibit inhibits auto-recognition of .gpg files

* lisp/epa-file.el (epa-inhibit): New variable.
(epa-file-handler): Check epa-inhibit.
This commit is contained in:
Richard Stallman 2015-08-12 11:19:47 -04:00
parent bf3f6a961f
commit 472addd6f2

View File

@ -82,12 +82,15 @@ encryption is used."
passphrase))))
(epa-passphrase-callback-function context key-id file)))
(defvar epa-inhibit nil
"Non-nil means don't try to decrypt .gpg files when operating on them.")
;;;###autoload
(defun epa-file-handler (operation &rest args)
(save-match-data
(let ((op (get operation 'epa-file)))
(if op
(apply op args)
(if (and op (not epa-inhibit))
(apply op args)
(epa-file-run-real-handler operation args)))))
(defun epa-file-run-real-handler (operation args)