comparison lisp/epa-file.el @ 91731:7efbdc83b944

EasyPG: Implement some suggestions from emacs-devel.
author Michael Olson <mwolson@gnu.org>
date Sun, 10 Feb 2008 20:57:47 +0000
parents bda1e76bc03b
children d876f5372472
comparison
equal deleted inserted replaced
91730:04e7668f6b61 91731:7efbdc83b944
312 (setq auto-mode-alist (delq epa-file-auto-mode-alist-entry 312 (setq auto-mode-alist (delq epa-file-auto-mode-alist-entry
313 auto-mode-alist)) 313 auto-mode-alist))
314 (message "`epa-file' disabled")) 314 (message "`epa-file' disabled"))
315 (message "`epa-file' already disabled"))) 315 (message "`epa-file' already disabled")))
316 316
317 ;;;###autoload
318 (define-minor-mode epa-file-mode
319 "Toggle automatic file encryption and decryption.
320 With prefix argument ARG, turn auto encryption on if positive, else off.
321 Return the new status of auto encryption (non-nil means on)."
322 :global t :init-value nil :group 'epa-file :version "23.1"
323 (setq file-name-handler-alist
324 (delq epa-file-handler file-name-handler-alist))
325 (remove-hook 'find-file-hooks 'epa-file-find-file-hook)
326 (setq auto-mode-alist (delq epa-file-auto-mode-alist-entry
327 auto-mode-alist))
328 (when epa-file-mode
329 (setq file-name-handler-alist
330 (cons epa-file-handler file-name-handler-alist))
331 (add-hook 'find-file-hooks 'epa-file-find-file-hook)
332 (setq auto-mode-alist (cons epa-file-auto-mode-alist-entry
333 auto-mode-alist))))
334
317 (provide 'epa-file) 335 (provide 'epa-file)
318 336
319 ;; arch-tag: 5715152f-0eb1-4dbc-9008-07098775314d 337 ;; arch-tag: 5715152f-0eb1-4dbc-9008-07098775314d
320 ;;; epa-file.el ends here 338 ;;; epa-file.el ends here