]> git.eshelyaron.com Git - emacs.git/commitdiff
epa-inhibit inhibits auto-recognition of .gpg files
authorRichard Stallman <rms@gnu.org>
Wed, 12 Aug 2015 15:19:47 +0000 (11:19 -0400)
committerRichard Stallman <rms@gnu.org>
Wed, 12 Aug 2015 15:19:47 +0000 (11:19 -0400)
* lisp/epa-file.el (epa-inhibit): New variable.
(epa-file-handler): Check epa-inhibit.

lisp/epa-file.el

index db8613aec974b6fb0595675a1a66f149fb8169f7..88d25a570b336028a4c832b31a1dceb29ac7147d 100644 (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)