aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olson2008-02-12 01:24:20 +0000
committerMichael Olson2008-02-12 01:24:20 +0000
commit5a8d03e9b9407d033afb9d795003cff1ced52b7b (patch)
tree0da8081dc834e5ca50e4a927fb388ef784813650
parentd218b4e5d2ec290c7be64d3ea264359095a3aee0 (diff)
downloademacs-5a8d03e9b9407d033afb9d795003cff1ced52b7b.tar.gz
emacs-5a8d03e9b9407d033afb9d795003cff1ced52b7b.zip
EasyPG: Update manual, menu label, epa-menu-mode->epa-mode, dired minor mode.
-rw-r--r--doc/misc/ChangeLog4
-rw-r--r--doc/misc/epa.texi33
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/epa-dired.el28
-rw-r--r--lisp/epa.el26
5 files changed, 50 insertions, 51 deletions
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 @@
12008-02-11 Daiki Ueno <ueno@unixuser.org>
2
3 * epa.texi (Quick start): Remove the .emacs setting.
4
12008-02-10 Daiki Ueno <ueno@unixuser.org> 52008-02-10 Daiki Ueno <ueno@unixuser.org>
2 6
3 * epa.texi (Quick start): Use the command `epa-enable' instead of 7 * 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.
77@node Quick start 77@node Quick start
78@chapter Quick start 78@chapter Quick start
79 79
80@c To install, just follow the standard CMMI installation instructions. 80EasyPG Assistant commands are prefixed by @samp{epa-}. For example,
81
82@c @cartouche
83@c @example
84@c $ ./configure
85@c $ sudo make install
86@c @end example
87@c @end cartouche
88
89@c @noindent
90@c Then, add the following line to your @file{~/.emacs}
91
92Add the following line to your @file{~/.emacs}.
93
94@cartouche
95@lisp
96(epa-mode 1)
97@end lisp
98@end cartouche
99
100@noindent
101Restart emacs and type @kbd{M-x epa- @key{TAB}}, and you will see a
102lot of commands available. For example,
103 81
104@itemize @bullet 82@itemize @bullet
105@item To browse your keyring, type @kbd{M-x epa-list-keys} 83@item To browse your keyring, type @kbd{M-x epa-list-keys}
106 84
107@item To create a cleartext signature of the region, type @kbd{M-x epa-sign-region} 85@item To create a cleartext signature of the region, type @kbd{M-x epa-sign-region}
86
87@item To encrypt a file, type @kbd{M-x epa-encrypt-file}
108@end itemize 88@end itemize
109 89
90EasyPG Assistant provides several cryptographic features which can be
91integrated into other Emacs functionalities. For example, automatic
92encryption/decryption of @samp{*.gpg} files.
93
94To install these features, do @kbd{C-u 1 M-x epa-mode}. It can also
95be turned on by customize. Try @kbd{M-x customize-variable epa-mode}.
96
110@node Commands 97@node Commands
111@chapter Commands 98@chapter Commands
112 99
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 21a3158a3c2..2322e6b7513 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12008-02-11 Daiki Ueno <ueno@unixuser.org>
2
3 * epa.el (epa-menu-mode): Merge into epa-mode.
4 (epa-menu-items): Rename the label "EasyPG Assistant" to
5 "Encryption/Decryption".
6
7 * epa-dired.el: Define a new minor-mode epa-dired-mode for dired.
8 (epa-dired-mode-map): Renamed from epa-dired-map.
9 (epa-global-dired-mode): Renamed the global minor mode.
10
12008-02-11 Drew Adams <drew.adams@oracle.com> 112008-02-11 Drew Adams <drew.adams@oracle.com>
2 12
3 * isearch.el (isearch-fail): New face. 13 * 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 @@
26(require 'epa) 26(require 'epa)
27(require 'dired) 27(require 'dired)
28 28
29(defvar epa-dired-map 29(defvar epa-dired-mode-map
30 (let ((keymap (make-sparse-keymap))) 30 (let ((keymap (make-sparse-keymap)))
31 (define-key keymap "d" 'epa-dired-do-decrypt) 31 (define-key keymap ":d" 'epa-dired-do-decrypt)
32 (define-key keymap "v" 'epa-dired-do-verify) 32 (define-key keymap ":v" 'epa-dired-do-verify)
33 (define-key keymap "s" 'epa-dired-do-sign) 33 (define-key keymap ":s" 'epa-dired-do-sign)
34 (define-key keymap "e" 'epa-dired-do-encrypt) 34 (define-key keymap ":e" 'epa-dired-do-encrypt)
35 keymap)) 35 keymap))
36 36
37(fset 'epa-dired-prefix epa-dired-map) 37(defvar epa-dired-mode-hook nil)
38(defvar epa-dired-mode-on-hook nil)
39(defvar epa-dired-mode-off-hook nil)
38 40
39(defun epa-dired-mode-hook () 41;;;###autoload
40 (define-key dired-mode-map ":" 'epa-dired-prefix)) 42(define-minor-mode epa-dired-mode
43 "A minor-mode for encrypt/decrypt files with Dired."
44 nil " epa-dired" epa-dired-mode-map)
41 45
42(defun epa-dired-do-decrypt () 46(defun epa-dired-do-decrypt ()
43 "Decrypt marked files." 47 "Decrypt marked files."
@@ -83,12 +87,12 @@ If no one is selected, symmetric encryption will be performed. "))
83 (revert-buffer))) 87 (revert-buffer)))
84 88
85;;;###autoload 89;;;###autoload
86(define-minor-mode epa-dired-mode 90(define-minor-mode epa-global-dired-mode
87 "Minor mode to hook EasyPG into Dired." 91 "Minor mode to hook EasyPG into Dired."
88 :global t :init-value nil :group 'epa-dired :version "23.1" 92 :global t :init-value nil :group 'epa-dired :version "23.1"
89 (remove-hook 'dired-mode-hook 'epa-dired-mode-hook) 93 (remove-hook 'dired-mode-hook 'epa-dired-mode)
90 (if epa-dired-mode 94 (if epa-global-dired-mode
91 (add-hook 'dired-mode-hook 'epa-dired-mode-hook))) 95 (add-hook 'dired-mode-hook 'epa-dired-mode)))
92 96
93(provide 'epa-dired) 97(provide 'epa-dired)
94 98
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."
45 :type 'integer 45 :type 'integer
46 :group 'epa) 46 :group 'epa)
47 47
48(defcustom epa-global-minor-modes '(epa-dired-mode 48(defcustom epa-global-minor-modes '(epa-global-dired-mode
49 epa-file-mode
50 epa-global-mail-mode 49 epa-global-mail-mode
51 epa-menu-mode) 50 epa-file-mode)
52 "Globally defined minor modes to hook into other modes." 51 "Globally defined minor modes to hook into other modes."
53 :type '(repeat symbol) 52 :type '(repeat symbol)
54 :group 'epa) 53 :group 'epa)
@@ -240,7 +239,7 @@ You should bind this variable with `let', but do not set it globally.")
240(defvar epa-menu nil) 239(defvar epa-menu nil)
241 240
242(defconst epa-menu-items 241(defconst epa-menu-items
243 '("EasyPG Assistant" 242 '("Encryption/Decryption"
244 ("Decrypt" 243 ("Decrypt"
245 ["File" epa-decrypt-file 244 ["File" epa-decrypt-file
246 :help "Decrypt a file"] 245 :help "Decrypt a file"]
@@ -1220,28 +1219,23 @@ Don't use this command in Lisp programs!"
1220;; (make-obsolete 'epa-sign-keys "Do not use.") 1219;; (make-obsolete 'epa-sign-keys "Do not use.")
1221 1220
1222;;;###autoload 1221;;;###autoload
1223(define-minor-mode epa-menu-mode
1224 "Minor mode to hook EasyPG into the menu-bar."
1225 :global t :init-value nil :group 'epa :version "23.1"
1226 (unless epa-menu
1227 (easy-menu-define epa-menu nil "EasyPG Assistant global menu"
1228 epa-menu-items))
1229 (easy-menu-remove-item nil '("Tools") "EasyPG Assistant")
1230 (if epa-menu-mode
1231 (easy-menu-add-item nil '("Tools") epa-menu)))
1232
1233;;;###autoload
1234(define-minor-mode epa-mode 1222(define-minor-mode epa-mode
1235 "Minor mode to hook EasyPG into various modes. 1223 "Minor mode to hook EasyPG into various modes.
1236See `epa-global-minor-modes'." 1224See `epa-global-minor-modes'."
1237 :global t :init-value nil :group 'epa :version "23.1" 1225 :global t :init-value nil :group 'epa :version "23.1"
1226 (unless epa-menu
1227 (easy-menu-define epa-menu nil "EasyPG Assistant global menu"
1228 epa-menu-items))
1229 (easy-menu-remove-item nil '("Tools") "Encryption/Decryption")
1230 (if epa-mode
1231 (easy-menu-add-item nil '("Tools") epa-menu))
1238 (let ((modes epa-global-minor-modes) 1232 (let ((modes epa-global-minor-modes)
1239 symbol) 1233 symbol)
1240 (while modes 1234 (while modes
1241 (setq symbol (car modes)) 1235 (setq symbol (car modes))
1242 (if (and symbol 1236 (if (and symbol
1243 (fboundp symbol)) 1237 (fboundp symbol))
1244 (funcall symbol (if epa-mode 1 0)) 1238 (funcall symbol epa-mode)
1245 (message "`%S' not found" (car modes))) 1239 (message "`%S' not found" (car modes)))
1246 (setq modes (cdr modes))))) 1240 (setq modes (cdr modes)))))
1247 1241