From: ueno Date: Mon, 10 Jul 2006 01:07:26 +0000 (+0000) Subject: * epa.el (epa-keys-mode-map): Bind return to epa-toggle-mark. X-Git-Tag: epg-0_0_4~21 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=cf2a863ffc7b0b25dffd51985d3febd6d1f9c928;p=elisp%2Fepg.git * epa.el (epa-keys-mode-map): Bind return to epa-toggle-mark. (epa-toggle-mark): New command. --- diff --git a/ChangeLog b/ChangeLog index a83503e..c851246 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-07-10 Daiki Ueno + + * epa.el (epa-keys-mode-map): Bind return to epa-toggle-mark. + (epa-toggle-mark): New command. + 2006-07-04 Daiki Ueno * pgg-epg.el (pgg-epg-sign-region): Select the signing key matched diff --git a/epa.el b/epa.el index aae2313..e29441e 100644 --- a/epa.el +++ b/epa.el @@ -171,6 +171,7 @@ the separate window." (let ((keymap (make-sparse-keymap))) (define-key keymap "m" 'epa-mark) (define-key keymap "u" 'epa-unmark) + (define-key keymap [return] 'epa-toggle-mark) (define-key keymap "d" 'epa-decrypt-file) (define-key keymap "v" 'epa-verify-file) (define-key keymap "s" 'epa-sign-file) @@ -499,6 +500,11 @@ If ARG is non-nil, mark the current line." (interactive "P") (epa-mark (not arg))) +(defun epa-toggle-mark () + "Toggle the mark the current line." + (interactive) + (epa-mark (eq (char-after (save-excursion (beginning-of-line) (point))) ?*))) + (defun epa-exit-buffer () "Exit the current buffer. `epa-exit-buffer-function' is called if it is set."