From: ueno Date: Tue, 19 Dec 2006 08:44:29 +0000 (+0000) Subject: * epg.el (epg-export-keys-to-file): Fixed a typo. X-Git-Tag: epg-0_0_9~21 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59b227deceb57a37a91af9cc4edcb5039f0c0b3b;p=elisp%2Fepg.git * epg.el (epg-export-keys-to-file): Fixed a typo. * epa.el (epa-sign-region): --armor & --textmode. (epa-encrypt-region): Ditto. (epa-insert-keys): New command. (epa--insert-keys): Renamed from epa-insert-keys. --- diff --git a/ChangeLog b/ChangeLog index 02eaf80..dc1ff3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-12-19 Daiki Ueno + + * epg.el (epg-export-keys-to-file): Fixed a typo. + + * epa.el (epa-sign-region): --armor & --textmode. + (epa-encrypt-region): Ditto. + (epa-insert-keys): New command. + (epa--insert-keys): Renamed from epa-insert-keys. + 2006-12-11 Daiki Ueno * pgg-epg.el (pgg-epg-decrypt-region): Don't call diff --git a/epa.el b/epa.el index 6b12a4d..c59706b 100644 --- a/epa.el +++ b/epa.el @@ -350,7 +350,7 @@ If ARG is non-nil, mark the current line." (or (next-single-property-change point 'epa-list-keys) (point-max))) (goto-char point)) - (epa-insert-keys context name mode) + (epa--insert-keys context name mode) (epa-keys-mode) (widget-setup) (set-keymap-parent (current-local-map) widget-keymap)) @@ -359,7 +359,7 @@ If ARG is non-nil, mark the current line." (goto-char (point-min)) (pop-to-buffer (current-buffer))) -(defun epa-insert-keys (context name mode) +(defun epa--insert-keys (context name mode) (save-excursion (save-restriction (narrow-to-region (point) (point)) @@ -432,17 +432,17 @@ If SECRET is non-nil, list secret keys instead of public keys." (insert "\n\n") (if names (while names - (epa-insert-keys context (car names) secret) + (epa--insert-keys context (car names) secret) (if (get-text-property (point) 'epa-list-keys) (epa-mark)) (goto-char (point-max)) (setq names (cdr names))) (if secret (progn - (epa-insert-keys context nil secret) + (epa--insert-keys context nil secret) (if (get-text-property (point) 'epa-list-keys) (epa-mark))) - (epa-insert-keys context nil nil))) + (epa--insert-keys context nil nil))) (epa-keys-mode) (widget-setup) (set-keymap-parent (current-local-map) widget-keymap) @@ -809,8 +809,10 @@ d - Create a detached signature (save-excursion (let ((context (epg-make-context)) signature) - (epg-context-set-armor context epa-armor) - (epg-context-set-textmode context epa-textmode) + ;;(epg-context-set-armor context epa-armor) + (epg-context-set-armor context t) + ;;(epg-context-set-textmode context epa-textmode) + (epg-context-set-textmode context t) (epg-context-set-signers context signers) (epg-context-set-passphrase-callback context #'epa-passphrase-callback-function) @@ -838,8 +840,10 @@ If no one is selected, symmetric encryption will be performed. "))) (save-excursion (let ((context (epg-make-context)) cipher) - (epg-context-set-armor context epa-armor) - (epg-context-set-textmode context epa-textmode) + ;;(epg-context-set-armor context epa-armor) + (epg-context-set-armor context t) + ;;(epg-context-set-textmode context epa-textmode) + (epg-context-set-textmode context t) (epg-context-set-passphrase-callback context #'epa-passphrase-callback-function) (epg-context-set-progress-callback context @@ -922,6 +926,18 @@ Don't use this command in Lisp programs!" (message "Exporting to %s...done" (file-name-nondirectory file)))) ;;;###autoload +(defun epa-insert-keys (keys) + "Insert selected KEYS after the point. + +Don't use this command in Lisp programs!" + (interactive + (list (epa-select-keys (epg-make-context) "Select keys to export. "))) + (let ((context (epg-make-context))) + ;;(epg-context-set-armor context epa-armor) + (epg-context-set-armor context t) + (insert (epg-export-keys-to-string context keys)))) + +;;;###autoload (defun epa-sign-keys (keys &optional local) "Sign selected KEYS. If a prefix-arg is specified, the signature is marked as non exportable. diff --git a/epg.el b/epg.el index 515110f..e445aec 100644 --- a/epg.el +++ b/epg.el @@ -2224,7 +2224,7 @@ If you are unsure, use synchronous version of this function "Extract public KEYS." (unwind-protect (progn - (if keys + (if file (epg-context-set-output-file context file) (epg-context-set-output-file context (epg--make-temp-file "epg-output")))