changeset 104963:aa7ac26deae0

(epg-context-set-passphrase-callback) (epg-context-set-progress-callback): Add more description about callback function.
author Daiki Ueno <ueno@unixuser.org>
date Fri, 11 Sep 2009 22:46:14 +0000
parents 7913b528a7e3
children a19ada807754
files lisp/ChangeLog lisp/epg.el
diffstat 2 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Sep 11 22:27:32 2009 +0000
+++ b/lisp/ChangeLog	Fri Sep 11 22:46:14 2009 +0000
@@ -2,6 +2,9 @@
 
 	* epg.el (epg-cipher-algorithm-alist): Add CAMELLIA.
 	(epg-digest-algorithm-alist): Add SHA224.
+	(epg-context-set-passphrase-callback)
+	(epg-context-set-progress-callback): Add more description about
+	callback function.
 
 2009-09-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 
--- a/lisp/epg.el	Fri Sep 11 22:27:32 2009 +0000
+++ b/lisp/epg.el	Fri Sep 11 22:46:14 2009 +0000
@@ -328,7 +328,12 @@
 
 (defun epg-context-set-passphrase-callback (context
 					    passphrase-callback)
-  "Set the function used to query passphrase."
+  "Set the function used to query passphrase.
+
+PASSPHRASE-CALLBACK is either a function, or a cons-cell whose
+car is a function and cdr is a callback data.
+The function gets three arguments: the context, the key-id in
+question, and the callback data (if any)."
   (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aset (cdr context) 7 (if (consp passphrase-callback)
@@ -338,7 +343,14 @@
 (defun epg-context-set-progress-callback (context
 					  progress-callback)
   "Set the function which handles progress update.
-If optional argument HANDBACK is specified, it is passed to PROGRESS-CALLBACK."
+
+PROGRESS-CALLBACK is either a function, or a cons-cell whose
+car is a function and cdr is a callback data.
+
+The function gets five arguments: the context, the operation
+description, the character to display a progress unit, the
+current amount done, the total amount to be done, and the
+callback data (if any)."
   (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aset (cdr context) 8 (if (consp progress-callback)