aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaiki Ueno2009-09-11 22:46:14 +0000
committerDaiki Ueno2009-09-11 22:46:14 +0000
commitb18508ddd0488fb16b5ecbc19bba1edc658d0951 (patch)
treeb93408a9c2544c9a7465ff8dc3c17012bb8a37d1
parent138907962d8e70fc7ac0ed8c709dd310cb37550e (diff)
downloademacs-b18508ddd0488fb16b5ecbc19bba1edc658d0951.tar.gz
emacs-b18508ddd0488fb16b5ecbc19bba1edc658d0951.zip
(epg-context-set-passphrase-callback)
(epg-context-set-progress-callback): Add more description about callback function.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/epg.el16
2 files changed, 17 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e7b4987b7eb..8870cbd73cc 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -2,6 +2,9 @@
2 2
3 * epg.el (epg-cipher-algorithm-alist): Add CAMELLIA. 3 * epg.el (epg-cipher-algorithm-alist): Add CAMELLIA.
4 (epg-digest-algorithm-alist): Add SHA224. 4 (epg-digest-algorithm-alist): Add SHA224.
5 (epg-context-set-passphrase-callback)
6 (epg-context-set-progress-callback): Add more description about
7 callback function.
5 8
62009-09-11 Stefan Monnier <monnier@iro.umontreal.ca> 92009-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
7 10
diff --git a/lisp/epg.el b/lisp/epg.el
index f8d72f46cc0..22f18762c5b 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -328,7 +328,12 @@ This function is for internal use only."
328 328
329(defun epg-context-set-passphrase-callback (context 329(defun epg-context-set-passphrase-callback (context
330 passphrase-callback) 330 passphrase-callback)
331 "Set the function used to query passphrase." 331 "Set the function used to query passphrase.
332
333PASSPHRASE-CALLBACK is either a function, or a cons-cell whose
334car is a function and cdr is a callback data.
335The function gets three arguments: the context, the key-id in
336question, and the callback data (if any)."
332 (unless (eq (car-safe context) 'epg-context) 337 (unless (eq (car-safe context) 'epg-context)
333 (signal 'wrong-type-argument (list 'epg-context-p context))) 338 (signal 'wrong-type-argument (list 'epg-context-p context)))
334 (aset (cdr context) 7 (if (consp passphrase-callback) 339 (aset (cdr context) 7 (if (consp passphrase-callback)
@@ -338,7 +343,14 @@ This function is for internal use only."
338(defun epg-context-set-progress-callback (context 343(defun epg-context-set-progress-callback (context
339 progress-callback) 344 progress-callback)
340 "Set the function which handles progress update. 345 "Set the function which handles progress update.
341If optional argument HANDBACK is specified, it is passed to PROGRESS-CALLBACK." 346
347PROGRESS-CALLBACK is either a function, or a cons-cell whose
348car is a function and cdr is a callback data.
349
350The function gets five arguments: the context, the operation
351description, the character to display a progress unit, the
352current amount done, the total amount to be done, and the
353callback data (if any)."
342 (unless (eq (car-safe context) 'epg-context) 354 (unless (eq (car-safe context) 'epg-context)
343 (signal 'wrong-type-argument (list 'epg-context-p context))) 355 (signal 'wrong-type-argument (list 'epg-context-p context)))
344 (aset (cdr context) 8 (if (consp progress-callback) 356 (aset (cdr context) 8 (if (consp progress-callback)