From 8e794cb5f6195d3cf3f46b5a50e56a6afd44e836 Mon Sep 17 00:00:00 2001 From: ueno Date: Thu, 19 Apr 2007 09:39:40 +0000 Subject: [PATCH] * epa.el (epa-mark-key): Renamed from epa-mark. (epa-unmark-key): Renamed from epa-unmark. (epa-toggle-mark): Abolished. --- ChangeLog | 4 ++++ epa.el | 29 +++++++++++++---------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4dfc84c..8e3cb5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-04-19 Daiki Ueno + * epa.el (epa-mark-key): Renamed from epa-mark. + (epa-unmark-key): Renamed from epa-unmark. + (epa-toggle-mark): Abolished. + * epa-file.el (epa-file-insert-file-contents): Guess the value of epa-file-encrypt-to from 'encrypted-to context-result. (epa-file-encrypt-to): Make it permanent local. diff --git a/epa.el b/epa.el index 51b6d53..bc2938a 100644 --- a/epa.el +++ b/epa.el @@ -177,8 +177,8 @@ You should bind this variable with `let', but do not set it globally.") (defvar epa-key-list-mode-map (let ((keymap (make-sparse-keymap))) - (define-key keymap "m" 'epa-mark) - (define-key keymap "u" 'epa-unmark) + (define-key keymap "m" 'epa-mark-key) + (define-key keymap "u" 'epa-unmark-key) (define-key keymap "d" 'epa-decrypt-file) (define-key keymap "v" 'epa-verify-file) (define-key keymap "s" 'epa-sign-file) @@ -301,30 +301,27 @@ You should bind this variable with `let', but do not set it globally.") (use-local-map epa-info-mode-map) (run-hooks 'epa-info-mode-hook)) -(defun epa-mark (&optional arg) - "Mark the current line. -If ARG is non-nil, unmark the current line." +(defun epa-mark-key (&optional arg) + "Mark a key on the current line. +If ARG is non-nil, unmark the key." (interactive "P") (let ((inhibit-read-only t) buffer-read-only properties) (beginning-of-line) + (unless (get-text-property (point) 'epa-key) + (error "No key on this line")) (setq properties (text-properties-at (point))) (delete-char 1) (insert (if arg " " "*")) (set-text-properties (1- (point)) (point) properties) (forward-line))) -(defun epa-unmark (&optional arg) - "Unmark the current line. -If ARG is non-nil, mark the current line." +(defun epa-unmark-key (&optional arg) + "Unmark a key on the current line. +If ARG is non-nil, mark the key." (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))) ?*))) + (epa-mark-key (not arg))) (defun epa-exit-buffer () "Exit the current buffer. @@ -436,8 +433,8 @@ If ARG is non-nil, mark the current line." (erase-buffer) (insert prompt "\n" (substitute-command-keys "\ -- `\\[epa-mark]' to mark a key on the line -- `\\[epa-unmark]' to unmark a key on the line\n")) +- `\\[epa-mark-key]' to mark a key on the line +- `\\[epa-unmark-key]' to unmark a key on the line\n")) (widget-create 'link :notify (lambda (&rest ignore) (abort-recursive-edit)) :help-echo -- 1.7.10.4