[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: patch to include EasyPG to Emacs
From: |
Daiki Ueno |
Subject: |
Re: patch to include EasyPG to Emacs |
Date: |
Mon, 11 Feb 2008 15:30:54 +0900 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Here is up-to-date patch. It does:
- remove the installation instruction from epa.texi at all,
- rename the menu label "EasyPG Assistant" to "Encryption/Decryption",
- merge epa-menu-mode into epa-mode, and
- define a minor mode for dired instead of directly modifying the keymap.
Thanks Dan for the suggestions.
Index: lisp/ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.12763
diff -c -r1.12763 ChangeLog
*** lisp/ChangeLog 11 Feb 2008 04:11:00 -0000 1.12763
--- lisp/ChangeLog 11 Feb 2008 06:21:19 -0000
***************
*** 1,3 ****
--- 1,13 ----
+ 2008-02-11 Daiki Ueno <address@hidden>
+
+ * 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 Glenn Morris <address@hidden>
* progmodes/compile.el (compilation-error-regexp-alist-alist):
Index: lisp/epa-dired.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/epa-dired.el,v
retrieving revision 1.4
diff -c -r1.4 epa-dired.el
*** lisp/epa-dired.el 10 Feb 2008 20:57:46 -0000 1.4
--- lisp/epa-dired.el 11 Feb 2008 06:21:19 -0000
***************
*** 26,43 ****
(require 'epa)
(require 'dired)
! (defvar epa-dired-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))
! (fset 'epa-dired-prefix epa-dired-map)
! (defun epa-dired-mode-hook ()
! (define-key dired-mode-map ":" 'epa-dired-prefix))
(defun epa-dired-do-decrypt ()
"Decrypt marked files."
--- 26,47 ----
(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."
***************
*** 83,94 ****
(revert-buffer)))
;;;###autoload
! (define-minor-mode epa-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)))
(provide 'epa-dired)
--- 87,98 ----
(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)
Index: lisp/epa.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/epa.el,v
retrieving revision 1.5
diff -c -r1.5 epa.el
*** lisp/epa.el 10 Feb 2008 21:59:27 -0000 1.5
--- lisp/epa.el 11 Feb 2008 06:21:19 -0000
***************
*** 45,54 ****
:type 'integer
:group 'epa)
! (defcustom epa-global-minor-modes '(epa-dired-mode
! epa-file-mode
epa-global-mail-mode
! epa-menu-mode)
"Globally defined minor modes to hook into other modes."
:type '(repeat symbol)
:group 'epa)
--- 45,53 ----
: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)
***************
*** 240,246 ****
(defvar epa-menu nil)
(defconst epa-menu-items
! '("EasyPG Assistant"
("Decrypt"
["File" epa-decrypt-file
:help "Decrypt a file"]
--- 239,245 ----
(defvar epa-menu nil)
(defconst epa-menu-items
! '("Encryption/Decryption"
("Decrypt"
["File" epa-decrypt-file
:help "Decrypt a file"]
***************
*** 1220,1247 ****
;; (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"
(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))
(message "`%S' not found" (car modes)))
(setq modes (cdr modes)))))
--- 1219,1241 ----
;; (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)))))
Index: doc/misc/ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/doc/misc/ChangeLog,v
retrieving revision 1.91
diff -c -r1.91 ChangeLog
*** doc/misc/ChangeLog 10 Feb 2008 20:57:44 -0000 1.91
--- doc/misc/ChangeLog 11 Feb 2008 06:21:19 -0000
***************
*** 1,3 ****
--- 1,7 ----
+ 2008-02-11 Daiki Ueno <address@hidden>
+
+ * epa.texi (Quick start): Remove the .emacs setting.
+
2008-02-10 Daiki Ueno <address@hidden>
* epa.texi (Quick start): Use the command `epa-enable' instead of
Index: doc/misc/epa.texi
===================================================================
RCS file: /sources/emacs/emacs/doc/misc/epa.texi,v
retrieving revision 1.3
diff -c -r1.3 epa.texi
*** doc/misc/epa.texi 10 Feb 2008 20:57:44 -0000 1.3
--- doc/misc/epa.texi 11 Feb 2008 06:21:19 -0000
***************
*** 77,112 ****
@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,
@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}
@end itemize
@node Commands
@chapter Commands
--- 77,99 ----
@node Quick start
@chapter Quick start
! 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
Regards,
--
Daiki Ueno
- Re: patch to include EasyPG to Emacs, (continued)
- Re: patch to include EasyPG to Emacs, Daiki Ueno, 2008/02/10
- Re: patch to include EasyPG to Emacs, Stefan Monnier, 2008/02/10
- Re: patch to include EasyPG to Emacs, Daiki Ueno, 2008/02/10
- Re: patch to include EasyPG to Emacs, Daiki Ueno, 2008/02/10
- Re: patch to include EasyPG to Emacs, Michael Olson, 2008/02/10
- Re: patch to include EasyPG to Emacs, Daiki Ueno, 2008/02/10
- Re: patch to include EasyPG to Emacs, Michael Olson, 2008/02/10
- Re: patch to include EasyPG to Emacs, Stefan Monnier, 2008/02/10
- Re: patch to include EasyPG to Emacs, Dan Nicolaescu, 2008/02/10
- Re: patch to include EasyPG to Emacs, Daiki Ueno, 2008/02/10
- Re: patch to include EasyPG to Emacs,
Daiki Ueno <=
- Re: patch to include EasyPG to Emacs, Michael Olson, 2008/02/11
- Re: patch to include EasyPG to Emacs, Dan Nicolaescu, 2008/02/11
- Re: patch to include EasyPG to Emacs, Daiki Ueno, 2008/02/12
- Re: patch to include EasyPG to Emacs, Richard Stallman, 2008/02/12
- Re: patch to include EasyPG to Emacs, Dan Nicolaescu, 2008/02/13
- Re: patch to include EasyPG to Emacs, Richard Stallman, 2008/02/13
- Re: patch to include EasyPG to Emacs, Daiki Ueno, 2008/02/14
- Re: patch to include EasyPG to Emacs, Sascha Wilde, 2008/02/14
- Re: patch to include EasyPG to Emacs, Daiki Ueno, 2008/02/14
- Re: patch to include EasyPG to Emacs, Sascha Wilde, 2008/02/15