[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master f33ec1f: epg: Use epg-context-set-*-callback for ex
From: |
Daiki Ueno |
Subject: |
[Emacs-diffs] master f33ec1f: epg: Use epg-context-set-*-callback for extra treatment of args |
Date: |
Fri, 28 Nov 2014 07:00:29 +0000 |
branch: master
commit f33ec1f5293c701ce489a8e3982b5b984400b578
Author: Daiki Ueno <address@hidden>
Date: Fri Nov 28 15:59:23 2014 +0900
epg: Use epg-context-set-*-callback for extra treatment of args
* epa.el (epa-sign-file, epa-encrypt-file, epa-decrypt-region)
(epa-sign-region, epa-encrypt-region): Use
`epg-context-set-{passphrase,progress}-callback', instead of
`setf'. This partially reverts commit 9e48a95c (bug#19150).
Reported by José A. Romero L.
---
lisp/ChangeLog | 8 ++++++
lisp/epa.el | 76 ++++++++++++++++++++++++++++----------------------------
2 files changed, 46 insertions(+), 38 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7ff0dc8..772e0a7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
+2014-11-28 Daiki Ueno <address@hidden>
+
+ * epa.el (epa-sign-file, epa-encrypt-file, epa-decrypt-region)
+ (epa-sign-region, epa-encrypt-region): Use
+ `epg-context-set-{passphrase,progress}-callback', instead of
+ `setf'. This partially reverts commit 9e48a95c (bug#19150).
+ Reported by José A. Romero L.
+
2014-11-27 Lars Magne Ingebrigtsen <address@hidden>
* net/eww.el (eww-restore-history): Bind
diff --git a/lisp/epa.el b/lisp/epa.el
index 8b95261..07a9545 100644
--- a/lisp/epa.el
+++ b/lisp/epa.el
@@ -776,13 +776,13 @@ If no one is selected, default secret key is used. "
(setf (epg-context-armor context) epa-armor)
(setf (epg-context-textmode context) epa-textmode)
(setf (epg-context-signers context) signers)
- (setf (epg-context-passphrase-callback context)
- #'epa-passphrase-callback-function)
- (setf (epg-context-progress-callback context)
- (cons
- #'epa-progress-callback-function
- (format "Signing %s..."
- (file-name-nondirectory file))))
+ (epg-context-set-passphrase-callback context
+ #'epa-passphrase-callback-function)
+ (epg-context-set-progress-callback context
+ (cons
+ #'epa-progress-callback-function
+ (format "Signing %s..."
+ (file-name-nondirectory file))))
(setf (epg-context-pinentry-mode context) epa-pinentry-mode)
(message "Signing %s..." (file-name-nondirectory file))
(condition-case error
@@ -807,13 +807,13 @@ If no one is selected, symmetric encryption will be
performed. ")))
(context (epg-make-context epa-protocol)))
(setf (epg-context-armor context) epa-armor)
(setf (epg-context-textmode context) epa-textmode)
- (setf (epg-context-passphrase-callback context)
- #'epa-passphrase-callback-function)
- (setf (epg-context-progress-callback context)
- (cons
- #'epa-progress-callback-function
- (format "Encrypting %s..."
- (file-name-nondirectory file))))
+ (epg-context-set-passphrase-callback context
+ #'epa-passphrase-callback-function)
+ (epg-context-set-progress-callback context
+ (cons
+ #'epa-progress-callback-function
+ (format "Encrypting %s..."
+ (file-name-nondirectory file))))
(setf (epg-context-pinentry-mode context) epa-pinentry-mode)
(message "Encrypting %s..." (file-name-nondirectory file))
(condition-case error
@@ -851,12 +851,12 @@ For example:
(save-excursion
(let ((context (epg-make-context epa-protocol))
plain)
- (setf (epg-context-passphrase-callback context)
- #'epa-passphrase-callback-function)
- (setf (epg-context-progress-callback context)
- (cons
- #'epa-progress-callback-function
- "Decrypting..."))
+ (epg-context-set-passphrase-callback context
+ #'epa-passphrase-callback-function)
+ (epg-context-set-progress-callback context
+ (cons
+ #'epa-progress-callback-function
+ "Decrypting..."))
(setf (epg-context-pinentry-mode context) epa-pinentry-mode)
(message "Decrypting...")
(condition-case error
@@ -1058,12 +1058,12 @@ If no one is selected, default secret key is used. "
;;(setf (epg-context-textmode context) epa-textmode)
(setf (epg-context-textmode context) t)
(setf (epg-context-signers context) signers)
- (setf (epg-context-passphrase-callback context)
- #'epa-passphrase-callback-function)
- (setf (epg-context-progress-callback context)
- (cons
- #'epa-progress-callback-function
- "Signing..."))
+ (epg-context-set-passphrase-callback context
+ #'epa-passphrase-callback-function)
+ (epg-context-set-progress-callback context
+ (cons
+ #'epa-progress-callback-function
+ "Signing..."))
(setf (epg-context-pinentry-mode context) epa-pinentry-mode)
(message "Signing...")
(condition-case error
@@ -1147,12 +1147,12 @@ If no one is selected, symmetric encryption will be
performed. ")
(setf (epg-context-textmode context) t)
(if sign
(setf (epg-context-signers context) signers))
- (setf (epg-context-passphrase-callback context)
- #'epa-passphrase-callback-function)
- (setf (epg-context-progress-callback context)
- (cons
- #'epa-progress-callback-function
- "Encrypting..."))
+ (epg-context-set-passphrase-callback context
+ #'epa-passphrase-callback-function)
+ (epg-context-set-progress-callback context
+ (cons
+ #'epa-progress-callback-function
+ "Encrypting..."))
(setf (epg-context-pinentry-mode context) epa-pinentry-mode)
(message "Encrypting...")
(condition-case error
@@ -1316,12 +1316,12 @@ If no one is selected, default public key is exported.
")))
;; (error "No keys selected"))
;; (list keys current-prefix-arg)))
;; (let ((context (epg-make-context epa-protocol)))
-;; (setf (epg-context-passphrase-callback context)
-;; #'epa-passphrase-callback-function)
-;; (setf (epg-context-progress-callback context)
-;; (cons
-;; #'epa-progress-callback-function
-;; "Signing keys..."))
+;; (epg-context-set-passphrase-callback context
+;; #'epa-passphrase-callback-function)
+;; (epg-context-set-progress-callback context
+;; (cons
+;; #'epa-progress-callback-function
+;; "Signing keys..."))
;; (setf (epg-context-pinentry-mode context) epa-pinentry-mode)
;; (message "Signing keys...")
;; (epg-sign-keys context keys local)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master f33ec1f: epg: Use epg-context-set-*-callback for extra treatment of args,
Daiki Ueno <=