From: Michael Olson Date: Tue, 12 Feb 2008 01:24:20 +0000 (+0000) Subject: EasyPG: Update manual, menu label, epa-menu-mode->epa-mode, dired minor mode. X-Git-Tag: emacs-pretest-23.0.90~7991 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5a8d03e9b9407d033afb9d795003cff1ced52b7b;p=emacs.git EasyPG: Update manual, menu label, epa-menu-mode->epa-mode, dired minor mode. --- diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index f88471754cb..c3a4e60748f 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,7 @@ +2008-02-11 Daiki Ueno + + * epa.texi (Quick start): Remove the .emacs setting. + 2008-02-10 Daiki Ueno * epa.texi (Quick start): Use the command `epa-enable' instead of diff --git a/doc/misc/epa.texi b/doc/misc/epa.texi index 08f3fb4178b..24453cd8ace 100644 --- a/doc/misc/epa.texi +++ b/doc/misc/epa.texi @@ -77,36 +77,23 @@ EasyPG Assistant provides the following features. @node Quick start @chapter Quick start -@c To install, just follow the standard CMMI installation instructions. - -@c @cartouche -@c @example -@c $ ./configure -@c $ sudo make install -@c @end example -@c @end cartouche - -@c @noindent -@c Then, add the following line to your @file{~/.emacs} - -Add the following line to your @file{~/.emacs}. - -@cartouche -@lisp -(epa-mode 1) -@end lisp -@end cartouche - -@noindent -Restart emacs and type @kbd{M-x epa- @key{TAB}}, and you will see a -lot of commands available. For example, +EasyPG Assistant commands are prefixed by @samp{epa-}. For example, @itemize @bullet @item To browse your keyring, type @kbd{M-x epa-list-keys} @item To create a cleartext signature of the region, type @kbd{M-x epa-sign-region} + +@item To encrypt a file, type @kbd{M-x epa-encrypt-file} @end itemize +EasyPG Assistant provides several cryptographic features which can be +integrated into other Emacs functionalities. For example, automatic +encryption/decryption of @samp{*.gpg} files. + +To install these features, do @kbd{C-u 1 M-x epa-mode}. It can also +be turned on by customize. Try @kbd{M-x customize-variable epa-mode}. + @node Commands @chapter Commands diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 21a3158a3c2..2322e6b7513 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2008-02-11 Daiki Ueno + + * epa.el (epa-menu-mode): Merge into epa-mode. + (epa-menu-items): Rename the label "EasyPG Assistant" to + "Encryption/Decryption". + + * epa-dired.el: Define a new minor-mode epa-dired-mode for dired. + (epa-dired-mode-map): Renamed from epa-dired-map. + (epa-global-dired-mode): Renamed the global minor mode. + 2008-02-11 Drew Adams * isearch.el (isearch-fail): New face. diff --git a/lisp/epa-dired.el b/lisp/epa-dired.el index ab0bf7d92a2..a02081bd9df 100644 --- a/lisp/epa-dired.el +++ b/lisp/epa-dired.el @@ -26,18 +26,22 @@ (require 'epa) (require 'dired) -(defvar epa-dired-map +(defvar epa-dired-mode-map (let ((keymap (make-sparse-keymap))) - (define-key keymap "d" 'epa-dired-do-decrypt) - (define-key keymap "v" 'epa-dired-do-verify) - (define-key keymap "s" 'epa-dired-do-sign) - (define-key keymap "e" 'epa-dired-do-encrypt) + (define-key keymap ":d" 'epa-dired-do-decrypt) + (define-key keymap ":v" 'epa-dired-do-verify) + (define-key keymap ":s" 'epa-dired-do-sign) + (define-key keymap ":e" 'epa-dired-do-encrypt) keymap)) -(fset 'epa-dired-prefix epa-dired-map) +(defvar epa-dired-mode-hook nil) +(defvar epa-dired-mode-on-hook nil) +(defvar epa-dired-mode-off-hook nil) -(defun epa-dired-mode-hook () - (define-key dired-mode-map ":" 'epa-dired-prefix)) +;;;###autoload +(define-minor-mode epa-dired-mode + "A minor-mode for encrypt/decrypt files with Dired." + nil " epa-dired" epa-dired-mode-map) (defun epa-dired-do-decrypt () "Decrypt marked files." @@ -83,12 +87,12 @@ If no one is selected, symmetric encryption will be performed. ")) (revert-buffer))) ;;;###autoload -(define-minor-mode epa-dired-mode +(define-minor-mode epa-global-dired-mode "Minor mode to hook EasyPG into Dired." :global t :init-value nil :group 'epa-dired :version "23.1" - (remove-hook 'dired-mode-hook 'epa-dired-mode-hook) - (if epa-dired-mode - (add-hook 'dired-mode-hook 'epa-dired-mode-hook))) + (remove-hook 'dired-mode-hook 'epa-dired-mode) + (if epa-global-dired-mode + (add-hook 'dired-mode-hook 'epa-dired-mode))) (provide 'epa-dired) diff --git a/lisp/epa.el b/lisp/epa.el index 16c418b362b..21c4e70a9e1 100644 --- a/lisp/epa.el +++ b/lisp/epa.el @@ -45,10 +45,9 @@ the separate window." :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 @@ You should bind this variable with `let', but do not set it globally.") (defvar epa-menu nil) (defconst epa-menu-items - '("EasyPG Assistant" + '("Encryption/Decryption" ("Decrypt" ["File" epa-decrypt-file :help "Decrypt a file"] @@ -1219,29 +1218,24 @@ Don't use this command in Lisp programs!" ;; (message "Signing keys...done"))) ;; (make-obsolete 'epa-sign-keys "Do not use.") -;;;###autoload -(define-minor-mode epa-menu-mode - "Minor mode to hook EasyPG into the menu-bar." - :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" + (unless epa-menu + (easy-menu-define epa-menu nil "EasyPG Assistant global menu" + epa-menu-items)) + (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)))))