From: ueno Date: Tue, 4 Sep 2007 23:24:25 +0000 (+0000) Subject: (epa-file-auto-mode-alist-entry): New variable. X-Git-Tag: epg-0_0_15~7 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=53f1cd79c580a897c0f01f6b01649809960b48ec;p=elisp%2Fepg.git (epa-file-auto-mode-alist-entry): New variable. (epa-file-enable): Install an entry in auto-mode-alist. (epa-file-disable): Ditto. --- diff --git a/ChangeLog b/ChangeLog index d7a0548..3a4b81f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-09-05 Daiki Ueno + + * epa-file.el (epa-file-auto-mode-alist-entry): New variable. + (epa-file-enable): Install an entry in auto-mode-alist. + (epa-file-disable): Ditto. + 2007-08-31 Daiki Ueno * epa.el (epa-verify-region): Decode the plaintext by diff --git a/epa-file.el b/epa-file.el index a6a800e..4d6df44 100644 --- a/epa-file.el +++ b/epa-file.el @@ -82,6 +82,9 @@ May either be a string or a list of strings.") (defvar epa-file-handler (cons epa-file-name-regexp 'epa-file-handler)) +(defvar epa-file-auto-mode-alist-entry + (list epa-file-name-regexp nil 'epa-file)) + (defvar epa-file-passphrase-alist nil) (eval-and-compile @@ -291,6 +294,7 @@ If no one is selected, symmetric encryption will be performed. "))) (setq file-name-handler-alist (cons epa-file-handler file-name-handler-alist)) (add-hook 'find-file-hooks 'epa-file-find-file-hook) + (setq auto-mode-alist (cons epa-file-auto-mode-alist-entry auto-mode-alist)) (message "`epa-file' enabled"))) ;;;###autoload @@ -301,6 +305,8 @@ If no one is selected, symmetric encryption will be performed. "))) (setq file-name-handler-alist (delq epa-file-handler file-name-handler-alist)) (remove-hook 'find-file-hooks 'epa-file-find-file-hook) + (setq auto-mode-alist (delq epa-file-auto-mode-alist-entry + auto-mode-alist)) (message "`epa-file' disabled")) (message "`epa-file' already disabled")))