[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 472addd 1/5: epa-inhibit inhibits auto-recognition
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] master 472addd 1/5: epa-inhibit inhibits auto-recognition of .gpg files |
Date: |
Wed, 12 Aug 2015 15:35:37 +0000 |
branch: master
commit 472addd6f2b693e171fc5096d78dbca1536bfb8e
Author: Richard Stallman <address@hidden>
Commit: Richard Stallman <address@hidden>
epa-inhibit inhibits auto-recognition of .gpg files
* lisp/epa-file.el (epa-inhibit): New variable.
(epa-file-handler): Check epa-inhibit.
---
lisp/epa-file.el | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/lisp/epa-file.el b/lisp/epa-file.el
index db8613a..88d25a5 100644
--- a/lisp/epa-file.el
+++ b/lisp/epa-file.el
@@ -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)