(change-log-default-name): Autoload safety.
[bpt/emacs.git] / lisp / epa.el
index 8d20a61..0f8f252 100644 (file)
@@ -6,10 +6,10 @@
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -17,9 +17,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Code:
 
@@ -219,23 +217,35 @@ You should bind this variable with `let', but do not set it globally.")
     (define-key keymap [delete] 'scroll-down)
     (define-key keymap "q" 'epa-exit-buffer)
     (define-key keymap [menu-bar epa-key-list-mode] (cons "Keys" menu-map))
+    (define-key menu-map [epa-key-list-unmark-key]
+      '(menu-item "Unmark Key" epa-unmark-key
+                 :help "Unmark a key"))
+    (define-key menu-map [epa-key-list-mark-key]
+      '(menu-item "Mark Key" epa-mark-key
+                 :help "Mark a key"))
+    (define-key menu-map [separator-epa-file] '(menu-item "--"))
+    (define-key menu-map [epa-verify-file]
+      '(menu-item "Verify File..." epa-verify-file
+                 :help "Verify FILE"))
+    (define-key menu-map [epa-sign-file]
+      '(menu-item "Sign File..." epa-sign-file
+                 :help "Sign FILE by SIGNERS keys selected"))
+    (define-key menu-map [epa-decrypt-file]
+      '(menu-item "Decrypt File..." epa-decrypt-file
+                 :help "Decrypt FILE"))
+    (define-key menu-map [epa-encrypt-file]
+      '(menu-item "Encrypt File.." epa-encrypt-file
+                 :help "Encrypt FILE for RECIPIENTS"))
+    (define-key menu-map [separator-epa-key-list] '(menu-item "--"))
     (define-key menu-map [epa-key-list-delete-keys]
       '(menu-item "Delete keys" epa-delete-keys
-                 :help "Delete marked keys"))
+                 :help "Delete Marked Keys"))
     (define-key menu-map [epa-key-list-import-keys]
-      '(menu-item "Import keys" epa-import-keys
+      '(menu-item "Import Keys" epa-import-keys
                  :help "Import keys from a file"))
     (define-key menu-map [epa-key-list-export-keys]
-      '(menu-item "Export keys" epa-export-keys
+      '(menu-item "Export Keys" epa-export-keys
                  :help "Export marked keys to a file"))
-    (define-key menu-map [separator-epa-key-list]
-      '(menu-item "--"))
-    (define-key menu-map [epa-key-list-unmark-key]
-      '(menu-item "Unmark key" epa-unmark-key
-                 :help "Unmark a key"))
-    (define-key menu-map [epa-key-list-mark-key]
-      '(menu-item "Mark key" epa-mark-key
-                 :help "Mark a key"))
     keymap))
 
 (defvar epa-key-mode-map
@@ -259,7 +269,8 @@ You should bind this variable with `let', but do not set it globally.")
   :help-echo 'epa--key-widget-help-echo)
 
 (defun epa--key-widget-action (widget &optional event)
-  (epa--show-key (widget-get widget :value)))
+  (save-selected-window
+    (epa--show-key (widget-get widget :value))))
 
 (defun epa--key-widget-value-create (widget)
   (let* ((key (widget-get widget :value))
@@ -317,7 +328,7 @@ You should bind this variable with `let', but do not set it globally.")
   (make-local-variable 'epa-exit-buffer-function)
   (make-local-variable 'revert-buffer-function)
   (setq revert-buffer-function 'epa--key-list-revert-buffer)
-  (run-hooks 'epa-key-list-mode-hook))
+  (run-mode-hooks 'epa-key-list-mode-hook))
 
 (defun epa-key-mode ()
   "Major mode for a key description."
@@ -334,7 +345,7 @@ You should bind this variable with `let', but do not set it globally.")
   ;; if buffer-file-name is not set.
   (font-lock-set-defaults)
   (make-local-variable 'epa-exit-buffer-function)
-  (run-hooks 'epa-key-mode-hook))
+  (run-mode-hooks 'epa-key-mode-hook))
 
 (defun epa-info-mode ()
   "Major mode for `epa-info-buffer'."
@@ -345,7 +356,7 @@ You should bind this variable with `let', but do not set it globally.")
        truncate-lines t
        buffer-read-only t)
   (use-local-map epa-info-mode-map)
-  (run-hooks 'epa-info-mode-hook))
+  (run-mode-hooks 'epa-info-mode-hook))
 
 (defun epa-mark-key (&optional arg)
   "Mark a key on the current line.