+2007-09-05 Daiki Ueno <ueno@unixuser.org>
+
+ * 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 <ueno@unixuser.org>
* epa.el (epa-verify-region): Decode the plaintext by
(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
(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
(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")))