[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
auto-encryption-mode, etc. (Re: patch to include EasyPG to Emacs
From: |
Daiki Ueno |
Subject: |
auto-encryption-mode, etc. (Re: patch to include EasyPG to Emacs |
Date: |
Mon, 18 Feb 2008 17:55:59 +0900 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) |
>>>>> In <address@hidden>
>>>>> "Daiki Ueno" <address@hidden> wrote:
> Okay, I'll prepare a patch to do these this weekend.
The attached is a patch which makes the EasyPG integration a bit
intrusive. It does:
- add `auto-encryption-mode' which is an analog to
`auto-compression-mode',
- make `auto-encryption-mode' active by default,
- remove an entry in etc/TODO, which states "Implement a variant of
uncompress.el or jka-compr.el that works with GNU Privacy Guard for
encryption",
- make insert-file-contents-literally inhibit epa-file-handler as well
as jka-compr-handler and image-file-handler,
- define "Encryption/Decryption" submenu in the "Tools" menu, and
- bind encryption commands in dired-mode-map.
This patch is intended for review. Comments are welcome.
lisp/ChangeLog:
2008-02-18 Daiki Ueno <address@hidden>
* epg.el (epg-start-receive-keys): Fix typo in docstring.
* epa.el (epa-global-minor-modes): Abolish.
(epa-mode): Abolish.
* loadup.el: Load epa-file-hook.
* epa-file-hook.el: New file splitted from epa-file.el.
* dired.el (dired-mode-map): Bind encryption/decryption commands.
* epa-dired.el (epa-dired-do-decrypt): Add autoload cookie.
(epa-dired-do-verify): Ditto.
(epa-dired-do-sign): Ditto.
(epa-dired-do-encrypt): Ditto.
(epa-dired-mode): Abolish.
(epa-global-dired-mode): Abolish.
* menu-bar.el (menu-bar-encryption-decryption-menu): New menu item.
* epa.el (epa-menu): Abolish.
(epa-menu-items): Abolish.
* files.el (insert-file-contents-literally): Inhibit epa-file-handler.
etc/ChangeLog:
2008-02-18 Daiki Ueno <address@hidden>
* TODO: Remove auto-encryption task.
Index: etc/TODO
===================================================================
RCS file: /sources/emacs/emacs/etc/TODO,v
retrieving revision 1.184
diff -c -r1.184 TODO
*** etc/TODO 11 Feb 2008 07:39:25 -0000 1.184
--- etc/TODO 18 Feb 2008 08:27:05 -0000
***************
*** 323,334 ****
** Add a cpio mode, more or less like tar mode.
- ** Implement a variant of uncompress.el or jka-compr.el that works with
- GNU Privacy Guard for encryption. [Code exists but isn't assigned.
- See the Gnus development sources for assigned code concerning GPG
- use with mail, which is probably a good start.] See also
- http://www.loveshack.ukfsn.org/emacs/auto-crypt.tgz.
-
** Save undo information in special temporary files, and reload it
when needed for undoing. This could extend undo capacity.
--- 323,328 ----
Index: lisp/dired.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/dired.el,v
retrieving revision 1.378
diff -c -r1.378 dired.el
*** lisp/dired.el 8 Jan 2008 20:44:46 -0000 1.378
--- lisp/dired.el 18 Feb 2008 08:27:15 -0000
***************
*** 1280,1285 ****
--- 1280,1290 ----
(define-key map "\C-tf" 'image-dired-mark-tagged-files)
(define-key map "\C-t\C-t" 'image-dired-dired-insert-marked-thumbs)
(define-key map "\C-te" 'image-dired-dired-edit-comment-and-tags)
+ ;; encryption and decryption
+ (define-key map ":d" 'epa-dired-do-decrypt)
+ (define-key map ":v" 'epa-dired-do-verify)
+ (define-key map ":s" 'epa-dired-do-sign)
+ (define-key map ":e" 'epa-dired-do-encrypt)
;; Make menu bar items.
***************
*** 1326,1331 ****
--- 1331,1359 ----
(cons "Immediate" (make-sparse-keymap "Immediate")))
(define-key map
+ [menu-bar immediate epa-dired-do-decrypt]
+ '(menu-item "Decrypt" epa-dired-do-decrypt
+ :help "Decrypt file at cursor"))
+
+ (define-key map
+ [menu-bar immediate epa-dired-do-verify]
+ '(menu-item "Verify" epa-dired-do-verify
+ :help "Verify digital signature of file at cursor"))
+
+ (define-key map
+ [menu-bar immediate epa-dired-do-sign]
+ '(menu-item "Sign" epa-dired-do-sign
+ :help "Create digital signature of file at cursor"))
+
+ (define-key map
+ [menu-bar immediate epa-dired-do-encrypt]
+ '(menu-item "Encrypt" epa-dired-do-encrypt
+ :help "Encrypt file at cursor"))
+
+ (define-key map [menu-bar immediate dashes-4]
+ '("--"))
+
+ (define-key map
[menu-bar immediate image-dired-dired-display-external]
'(menu-item "Display Image Externally"
image-dired-dired-display-external
:help "Display image in external viewer"))
Index: lisp/epa-dired.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/epa-dired.el,v
retrieving revision 1.5
diff -c -r1.5 epa-dired.el
*** lisp/epa-dired.el 12 Feb 2008 01:24:20 -0000 1.5
--- lisp/epa-dired.el 18 Feb 2008 08:27:15 -0000
***************
*** 26,48 ****
(require 'epa)
(require 'dired)
- (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)
- keymap))
-
- (defvar epa-dired-mode-hook nil)
- (defvar epa-dired-mode-on-hook nil)
- (defvar epa-dired-mode-off-hook nil)
-
;;;###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."
(interactive)
--- 26,32 ----
***************
*** 52,57 ****
--- 36,42 ----
(setq file-list (cdr file-list)))
(revert-buffer)))
+ ;;;###autoload
(defun epa-dired-do-verify ()
"Verify marked files."
(interactive)
***************
*** 60,65 ****
--- 45,51 ----
(epa-verify-file (expand-file-name (car file-list)))
(setq file-list (cdr file-list)))))
+ ;;;###autoload
(defun epa-dired-do-sign ()
"Sign marked files."
(interactive)
***************
*** 74,79 ****
--- 60,66 ----
(setq file-list (cdr file-list)))
(revert-buffer)))
+ ;;;###autoload
(defun epa-dired-do-encrypt ()
"Encrypt marked files."
(interactive)
***************
*** 86,99 ****
(setq file-list (cdr file-list)))
(revert-buffer)))
- ;;;###autoload
- (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)
- (if epa-global-dired-mode
- (add-hook 'dired-mode-hook 'epa-dired-mode)))
-
(provide 'epa-dired)
;; arch-tag: 2025700b-48d0-4684-bc94-228ad1f8e9ff
--- 73,78 ----
Index: lisp/epa-file-hook.el
===================================================================
RCS file: lisp/epa-file-hook.el
diff -N lisp/epa-file-hook.el
*** /dev/null 1 Jan 1970 00:00:00 -0000
--- lisp/epa-file-hook.el 18 Feb 2008 08:27:15 -0000
***************
*** 0 ****
--- 1,106 ----
+ ;;; epa-file-hook.el --- preloaded code to enable epa-file.el
+ ;; Copyright (C) 2008 Free Software Foundation, Inc.
+
+ ;; Author: Daiki Ueno <address@hidden>
+ ;; Keywords: PGP, GnuPG
+
+ ;; This file is part of GNU Emacs.
+
+ ;; 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.
+
+ ;; GNU Emacs is distributed in the hope that it will be useful,
+ ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ;; 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.
+
+ ;;; Code:
+
+ (defgroup epa-file nil
+ "The EasyPG Assistant hooks for transparent file encryption"
+ :version "23.1"
+ :group 'epa)
+
+ (defun epa-file--file-name-regexp-set (variable value)
+ (set-default variable value)
+ (if (fboundp 'epa-file-name-regexp-update)
+ (epa-file-name-regexp-update)))
+
+ (defcustom epa-file-name-regexp "\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'"
+ "Regexp which matches filenames to be encrypted with GnuPG.
+
+ If you set this outside Custom while epa-file is already enabled, you
+ have to call `epa-file-name-regexp-update' after setting it to
+ properly update file-name-handler-alist. Setting this through Custom
+ does that automatically."
+ :type 'regexp
+ :group 'epa-file
+ :set 'epa-file--file-name-regexp-set)
+
+ (defcustom epa-file-inhibit-auto-save t
+ "If non-nil, disable auto-saving when opening an encrypted file."
+ :type 'boolean
+ :group 'epa-file)
+
+ (defvar epa-file-encrypt-to nil
+ "*Recipient(s) used for encrypting files.
+ May either be a string or a list of strings.")
+
+ (put 'epa-file-encrypt-to 'safe-local-variable
+ (lambda (val)
+ (or (stringp val)
+ (and (listp val)
+ (catch 'safe
+ (mapc (lambda (elt)
+ (unless (stringp elt)
+ (throw 'safe nil)))
+ val)
+ t)))))
+
+ (put 'epa-file-encrypt-to 'permanent-local t)
+
+ (defvar epa-file-handler
+ (cons epa-file-name-regexp 'epa-file-handler))
+
+ (defvar epa-file-auto-mode-alist-entry
+ (list epa-file-name-regexp nil 'epa-file))
+
+ (defun epa-file-find-file-hook ()
+ (if (and buffer-file-name
+ (string-match epa-file-name-regexp buffer-file-name)
+ epa-file-inhibit-auto-save)
+ (auto-save-mode 0))
+ (set-buffer-modified-p nil))
+
+ (define-minor-mode auto-encryption-mode
+ "Toggle automatic file encryption and decryption.
+ With prefix argument ARG, turn auto encryption on if positive, else off.
+ Return the new status of auto encryption (non-nil means on)."
+ :global t :init-value t :group 'epa-file :version "23.1"
+ (setq file-name-handler-alist
+ (delq epa-file-handler file-name-handler-alist))
+ (remove-hook 'find-file-hooks 'epa-file-find-file-hook)
+ (setq auto-mode-alist (delq epa-file-auto-mode-alist-entry
+ auto-mode-alist))
+ (when auto-encryption-mode
+ (setq file-name-handler-alist
+ (cons epa-file-handler file-name-handler-alist))
+ (add-hook 'find-file-hooks 'epa-file-find-file-hook)
+ (setq auto-mode-alist (cons epa-file-auto-mode-alist-entry
+ auto-mode-alist))))
+
+ (put 'epa-file-handler 'safe-magic t)
+ (put 'epa-file-handler 'operations '(write-region insert-file-contents))
+
+ (when auto-encryption-mode (auto-encryption-mode 1))
+
+ (provide 'epa-file-hook)
+
+ ;;; epa-file-hook.el ends here
Index: lisp/epa-file.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/epa-file.el,v
retrieving revision 1.4
diff -c -r1.4 epa-file.el
*** lisp/epa-file.el 10 Feb 2008 20:57:46 -0000 1.4
--- lisp/epa-file.el 18 Feb 2008 08:27:15 -0000
***************
*** 24,91 ****
;;; Code:
(require 'epa)
!
! (defgroup epa-file nil
! "The EasyPG Assistant hooks for transparent file encryption"
! :version "23.1"
! :group 'epa)
!
! (defun epa-file--file-name-regexp-set (variable value)
! (set-default variable value)
! (if (fboundp 'epa-file-name-regexp-update)
! (epa-file-name-regexp-update)))
!
! (defcustom epa-file-name-regexp "\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'"
! "Regexp which matches filenames to be encrypted with GnuPG.
!
! If you set this outside Custom while epa-file is already enabled, you
! have to call `epa-file-name-regexp-update' after setting it to
! properly update file-name-handler-alist. Setting this through Custom
! does that automatically."
! :type 'regexp
! :group 'epa-file
! :set 'epa-file--file-name-regexp-set)
(defcustom epa-file-cache-passphrase-for-symmetric-encryption nil
"If non-nil, cache passphrase for symmetric encryption."
:type 'boolean
:group 'epa-file)
- (defcustom epa-file-inhibit-auto-save t
- "If non-nil, disable auto-saving when opening an encrypted file."
- :type 'boolean
- :group 'epa-file)
-
(defcustom epa-file-select-keys nil
"If non-nil, always asks user to select recipients."
:type 'boolean
:group 'epa-file)
- (defvar epa-file-encrypt-to nil
- "*Recipient(s) used for encrypting files.
- May either be a string or a list of strings.")
-
- ;;;###autoload
- (put 'epa-file-encrypt-to 'safe-local-variable
- (lambda (val)
- (or (stringp val)
- (and (listp val)
- (catch 'safe
- (mapc (lambda (elt)
- (unless (stringp elt)
- (throw 'safe nil)))
- val)
- t)))))
-
- ;;;###autoload
- (put 'epa-file-encrypt-to 'permanent-local t)
-
- (defvar epa-file-handler
- (cons epa-file-name-regexp 'epa-file-handler))
-
- (defvar epa-file-auto-mode-alist-entry
- (list epa-file-name-regexp nil 'epa-file))
-
(defvar epa-file-passphrase-alist nil)
(eval-and-compile
--- 24,41 ----
;;; Code:
(require 'epa)
! (require 'epa-file-hook)
(defcustom epa-file-cache-passphrase-for-symmetric-encryption nil
"If non-nil, cache passphrase for symmetric encryption."
:type 'boolean
:group 'epa-file)
(defcustom epa-file-select-keys nil
"If non-nil, always asks user to select recipients."
:type 'boolean
:group 'epa-file)
(defvar epa-file-passphrase-alist nil)
(eval-and-compile
***************
*** 123,128 ****
--- 73,79 ----
passphrase))))
(epa-passphrase-callback-function context key-id nil)))
+ ;;;###autoload
(defun epa-file-handler (operation &rest args)
(save-match-data
(let ((op (get operation 'epa-file)))
***************
*** 273,285 ****
(message "Wrote %s" buffer-file-name))))
(put 'write-region 'epa-file 'epa-file-write-region)
- (defun epa-file-find-file-hook ()
- (if (and buffer-file-name
- (string-match epa-file-name-regexp buffer-file-name)
- epa-file-inhibit-auto-save)
- (auto-save-mode 0))
- (set-buffer-modified-p nil))
-
(defun epa-file-select-keys ()
"Select recipients for encryption."
(interactive)
--- 224,229 ----
***************
*** 314,337 ****
(message "`epa-file' disabled"))
(message "`epa-file' already disabled")))
- ;;;###autoload
- (define-minor-mode epa-file-mode
- "Toggle automatic file encryption and decryption.
- With prefix argument ARG, turn auto encryption on if positive, else off.
- Return the new status of auto encryption (non-nil means on)."
- :global t :init-value nil :group 'epa-file :version "23.1"
- (setq file-name-handler-alist
- (delq epa-file-handler file-name-handler-alist))
- (remove-hook 'find-file-hooks 'epa-file-find-file-hook)
- (setq auto-mode-alist (delq epa-file-auto-mode-alist-entry
- auto-mode-alist))
- (when epa-file-mode
- (setq file-name-handler-alist
- (cons epa-file-handler file-name-handler-alist))
- (add-hook 'find-file-hooks 'epa-file-find-file-hook)
- (setq auto-mode-alist (cons epa-file-auto-mode-alist-entry
- auto-mode-alist))))
-
(provide 'epa-file)
;; arch-tag: 5715152f-0eb1-4dbc-9008-07098775314d
--- 258,263 ----
Index: lisp/epa.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/epa.el,v
retrieving revision 1.6
diff -c -r1.6 epa.el
*** lisp/epa.el 12 Feb 2008 01:24:20 -0000 1.6
--- lisp/epa.el 18 Feb 2008 08:27:16 -0000
***************
*** 45,57 ****
:type 'integer
:group 'epa)
- (defcustom epa-global-minor-modes '(epa-global-dired-mode
- epa-global-mail-mode
- epa-file-mode)
- "Globally defined minor modes to hook into other modes."
- :type '(repeat symbol)
- :group 'epa)
-
(defgroup epa-faces nil
"Faces for epa-mode."
:version "23.1"
--- 45,50 ----
***************
*** 236,279 ****
(define-key keymap "q" 'delete-window)
keymap))
- (defvar epa-menu nil)
-
- (defconst epa-menu-items
- '("Encryption/Decryption"
- ("Decrypt"
- ["File" epa-decrypt-file
- :help "Decrypt a file"]
- ["Region" epa-decrypt-region
- :help "Decrypt the current region"])
- ("Verify"
- ["File" epa-verify-file
- :help "Verify digital signature of a file"]
- ["Region" epa-verify-region
- :help "Verify digital signature of the current region"])
- ("Sign"
- ["File" epa-sign-file
- :help "Create digital signature of a file"]
- ["Region" epa-sign-region
- :help "Create digital signature of the current region"])
- ("Encrypt"
- ["File" epa-encrypt-file
- :help "Encrypt a file"]
- ["Region" epa-encrypt-region
- :help "Encrypt the current region"])
- "----"
- ["Browse keyring" epa-list-keys
- :help "Browse your public keyring"]
- ("Import keys"
- ["File" epa-import-keys
- :help "Import public keys from a file"]
- ["Region" epa-import-keys-region
- :help "Import public keys from the current region"])
- ("Export key"
- ["To a File" epa-export-keys
- :help "Export public keys to a file"]
- ["To a Buffer" epa-insert-keys
- :help "Insert public keys after the current point"])))
-
(defvar epa-exit-buffer-function #'bury-buffer)
(define-widget 'epa-key 'push-button
--- 229,234 ----
***************
*** 1218,1244 ****
;; (message "Signing keys...done")))
;; (make-obsolete 'epa-sign-keys "Do not use.")
- ;;;###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 epa-mode)
- (message "`%S' not found" (car modes)))
- (setq modes (cdr modes)))))
-
(provide 'epa)
;; arch-tag: 38d20ced-20d5-4137-b17a-f206335423d7
--- 1173,1178 ----
Index: lisp/epg.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/epg.el,v
retrieving revision 1.3
diff -c -r1.3 epg.el
*** lisp/epg.el 10 Feb 2008 20:57:47 -0000 1.3
--- lisp/epg.el 18 Feb 2008 08:27:16 -0000
***************
*** 2412,2418 ****
`epg-gpg-program' by using `epg-wait-for-completion' and call
`epg-reset' to clear a temporaly output file.
If you are unsure, use synchronous version of this function
! `epg-generate-key-from-file' or `epg-generate-key-from-string' instead."
(epg-context-set-operation context 'receive-keys)
(epg-context-set-result context nil)
(epg--start context (cons "--recv-keys" key-id-list)))
--- 2412,2418 ----
`epg-gpg-program' by using `epg-wait-for-completion' and call
`epg-reset' to clear a temporaly output file.
If you are unsure, use synchronous version of this function
! `epg-receive-keys' instead."
(epg-context-set-operation context 'receive-keys)
(epg-context-set-result context nil)
(epg--start context (cons "--recv-keys" key-id-list)))
Index: lisp/files.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/files.el,v
retrieving revision 1.960
diff -c -r1.960 files.el
*** lisp/files.el 16 Feb 2008 21:39:30 -0000 1.960
--- lisp/files.el 18 Feb 2008 08:27:18 -0000
***************
*** 1772,1778 ****
(symbol-function 'find-buffer-file-type)
nil))
(inhibit-file-name-handlers
! (append '(jka-compr-handler image-file-handler)
inhibit-file-name-handlers))
(inhibit-file-name-operation 'insert-file-contents))
(unwind-protect
--- 1772,1778 ----
(symbol-function 'find-buffer-file-type)
nil))
(inhibit-file-name-handlers
! (append '(jka-compr-handler image-file-handler epa-file-handler)
inhibit-file-name-handlers))
(inhibit-file-name-operation 'insert-file-contents))
(unwind-protect
Index: lisp/loadup.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/loadup.el,v
retrieving revision 1.160
diff -c -r1.160 loadup.el
*** lisp/loadup.el 1 Feb 2008 22:43:10 -0000 1.160
--- lisp/loadup.el 18 Feb 2008 08:27:18 -0000
***************
*** 87,92 ****
--- 87,93 ----
(load "help")
(load "jka-cmpr-hook")
+ (load "epa-file-hook")
;; Any Emacs Lisp source file (*.el) loaded here after can contain
;; multilingual text.
(load "international/mule-cmds")
Index: lisp/menu-bar.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/menu-bar.el,v
retrieving revision 1.318
diff -c -r1.318 menu-bar.el
*** lisp/menu-bar.el 8 Jan 2008 20:44:39 -0000 1.318
--- lisp/menu-bar.el 18 Feb 2008 08:27:18 -0000
***************
*** 1084,1089 ****
--- 1084,1153 ----
(known (assq read-mail-command known-rmail-commands)))
(if known (cdr known) (symbol-name read-mail-command))))
+ (defvar menu-bar-encryption-decryption-menu
+ (make-sparse-keymap "Encryption/Decryption"))
+
+ (define-key menu-bar-tools-menu [encryption-decryption]
+ (list 'menu-item "Encryption/Decryption"
menu-bar-encryption-decryption-menu))
+
+ (define-key menu-bar-tools-menu [separator-encryption-decryption]
+ '("--"))
+
+ (define-key menu-bar-encryption-decryption-menu [insert-keys]
+ '(menu-item "Insert Keys" epa-insert-keys
+ :help "Insert public keys after the current point"))
+
+ (define-key menu-bar-encryption-decryption-menu [export-keys]
+ '(menu-item "Export Keys" epa-export-keys
+ :help "Export public keys to a file"))
+
+ (define-key menu-bar-encryption-decryption-menu [import-keys-region]
+ '(menu-item "Import Keys from Region" epa-import-keys-region
+ :help "Import public keys from the current region"))
+
+ (define-key menu-bar-encryption-decryption-menu [import-keys]
+ '(menu-item "Import Keys from File" epa-import-keys
+ :help "Import public keys from a file"))
+
+ (define-key menu-bar-encryption-decryption-menu [list-keys]
+ '(menu-item "List Keys" epa-list-keys
+ :help "Browse your public keyring"))
+
+ (define-key menu-bar-encryption-decryption-menu [separator-keys]
+ '("--"))
+
+ (define-key menu-bar-encryption-decryption-menu [encrypt-region]
+ '(menu-item "Encrypt Region" epa-encrypt-region
+ :help "Encrypt the current region"))
+
+ (define-key menu-bar-encryption-decryption-menu [encrypt-file]
+ '(menu-item "Encrypt File" epa-encrypt-file
+ :help "Encrypt a file"))
+
+ (define-key menu-bar-encryption-decryption-menu [sign-region]
+ '(menu-item "Sign Region" epa-sign-region
+ :help "Create digital signature of the current region"))
+
+ (define-key menu-bar-encryption-decryption-menu [sign-file]
+ '(menu-item "Sign File" epa-sign-file
+ :help "Create digital signature of a file"))
+
+ (define-key menu-bar-encryption-decryption-menu [verify-region]
+ '(menu-item "Verify Region" epa-verify-region
+ :help "Verify digital signature of the current region"))
+
+ (define-key menu-bar-encryption-decryption-menu [verify-file]
+ '(menu-item "Verify File" epa-verify-file
+ :help "Verify digital signature of a file"))
+
+ (define-key menu-bar-encryption-decryption-menu [decrypt-region]
+ '(menu-item "Decrypt Region" epa-decrypt-region
+ :help "Decrypt the current region"))
+
+ (define-key menu-bar-encryption-decryption-menu [decrypt-file]
+ '(menu-item "Decrypt File" epa-decrypt-file
+ :help "Decrypt a file"))
+
(defvar menu-bar-games-menu (make-sparse-keymap "Games"))
(define-key menu-bar-tools-menu [games]
Regards,
--
Daiki Ueno
- Re: patch to include EasyPG to Emacs, (continued)
- Re: patch to include EasyPG to Emacs, Richard Stallman, 2008/02/16
- Re: patch to include EasyPG to Emacs, Jan Djärv, 2008/02/16
- Re: patch to include EasyPG to Emacs, Andreas Schwab, 2008/02/16
- Re: patch to include EasyPG to Emacs, Jeremy Maitin-Shepard, 2008/02/16
- Re: patch to include EasyPG to Emacs, Richard Stallman, 2008/02/17
- Re: patch to include EasyPG to Emacs, Richard Stallman, 2008/02/17
- Re: patch to include EasyPG to Emacs, Jan Djärv, 2008/02/18
- Re: patch to include EasyPG to Emacs, Miles Bader, 2008/02/18
- Re: patch to include EasyPG to Emacs, Richard Stallman, 2008/02/14
- Re: patch to include EasyPG to Emacs, Daiki Ueno, 2008/02/14
- auto-encryption-mode, etc. (Re: patch to include EasyPG to Emacs,
Daiki Ueno <=
- Re: auto-encryption-mode, etc. (Re: patch to include EasyPG to Emacs, Richard Stallman, 2008/02/18
- Re: auto-encryption-mode, etc. (Re: patch to include EasyPG to Emacs, Dan Nicolaescu, 2008/02/18