Mercurial > emacs
diff lisp/epa.el @ 91787:457a4ba95667
EasyPG: Update manual, menu label, epa-menu-mode->epa-mode, dired minor mode.
author | Michael Olson <mwolson@gnu.org> |
---|---|
date | Tue, 12 Feb 2008 01:24:20 +0000 |
parents | e9326c8f35b0 |
children | c895a1d0e007 |
line wrap: on
line diff
--- a/lisp/epa.el Tue Feb 12 01:18:35 2008 +0000 +++ b/lisp/epa.el Tue Feb 12 01:24:20 2008 +0000 @@ -45,10 +45,9 @@ :type 'integer :group 'epa) -(defcustom epa-global-minor-modes '(epa-dired-mode - epa-file-mode +(defcustom epa-global-minor-modes '(epa-global-dired-mode epa-global-mail-mode - epa-menu-mode) + epa-file-mode) "Globally defined minor modes to hook into other modes." :type '(repeat symbol) :group 'epa) @@ -240,7 +239,7 @@ (defvar epa-menu nil) (defconst epa-menu-items - '("EasyPG Assistant" + '("Encryption/Decryption" ("Decrypt" ["File" epa-decrypt-file :help "Decrypt a file"] @@ -1220,28 +1219,23 @@ ;; (make-obsolete 'epa-sign-keys "Do not use.") ;;;###autoload -(define-minor-mode epa-menu-mode - "Minor mode to hook EasyPG into the menu-bar." +(define-minor-mode epa-mode + "Minor mode to hook EasyPG into various modes. +See `epa-global-minor-modes'." :global t :init-value nil :group 'epa :version "23.1" (unless epa-menu (easy-menu-define epa-menu nil "EasyPG Assistant global menu" epa-menu-items)) - (easy-menu-remove-item nil '("Tools") "EasyPG Assistant") - (if epa-menu-mode - (easy-menu-add-item nil '("Tools") epa-menu))) - -;;;###autoload -(define-minor-mode epa-mode - "Minor mode to hook EasyPG into various modes. -See `epa-global-minor-modes'." - :global t :init-value nil :group 'epa :version "23.1" + (easy-menu-remove-item nil '("Tools") "Encryption/Decryption") + (if epa-mode + (easy-menu-add-item nil '("Tools") epa-menu)) (let ((modes epa-global-minor-modes) symbol) (while modes (setq symbol (car modes)) (if (and symbol (fboundp symbol)) - (funcall symbol (if epa-mode 1 0)) + (funcall symbol epa-mode) (message "`%S' not found" (car modes))) (setq modes (cdr modes)))))