diff options
| author | Richard Stallman | 2015-08-12 11:19:47 -0400 |
|---|---|---|
| committer | Richard Stallman | 2015-08-12 11:19:47 -0400 |
| commit | 472addd6f2b693e171fc5096d78dbca1536bfb8e (patch) | |
| tree | c17419515c7ad811ec07b7be54b526fcb74c004a | |
| parent | bf3f6a961f378f35a292c41c0bfbdae88ee1b1b9 (diff) | |
| download | emacs-472addd6f2b693e171fc5096d78dbca1536bfb8e.tar.gz emacs-472addd6f2b693e171fc5096d78dbca1536bfb8e.zip | |
epa-inhibit inhibits auto-recognition of .gpg files
* lisp/epa-file.el (epa-inhibit): New variable.
(epa-file-handler): Check epa-inhibit.
| -rw-r--r-- | 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 db8613aec97..88d25a570b3 100644 --- a/lisp/epa-file.el +++ b/lisp/epa-file.el | |||
| @@ -82,12 +82,15 @@ encryption is used." | |||
| 82 | passphrase)))) | 82 | passphrase)))) |
| 83 | (epa-passphrase-callback-function context key-id file))) | 83 | (epa-passphrase-callback-function context key-id file))) |
| 84 | 84 | ||
| 85 | (defvar epa-inhibit nil | ||
| 86 | "Non-nil means don't try to decrypt .gpg files when operating on them.") | ||
| 87 | |||
| 85 | ;;;###autoload | 88 | ;;;###autoload |
| 86 | (defun epa-file-handler (operation &rest args) | 89 | (defun epa-file-handler (operation &rest args) |
| 87 | (save-match-data | 90 | (save-match-data |
| 88 | (let ((op (get operation 'epa-file))) | 91 | (let ((op (get operation 'epa-file))) |
| 89 | (if op | 92 | (if (and op (not epa-inhibit)) |
| 90 | (apply op args) | 93 | (apply op args) |
| 91 | (epa-file-run-real-handler operation args))))) | 94 | (epa-file-run-real-handler operation args))))) |
| 92 | 95 | ||
| 93 | (defun epa-file-run-real-handler (operation args) | 96 | (defun epa-file-run-real-handler (operation args) |