+2014-11-18 Daiki Ueno <ueno@gnu.org>
+
+ * epg.el (epg-context-set-passphrase-callback)
+ (epg-context-set-progress-callback): Check if the CALLBACK
+ argument is a function, instead of a cons.
+
2014-11-18 Daiki Ueno <ueno@gnu.org>
* epa-file.el (epa-file-insert-file-contents)
query by itself and Emacs can intercept them."
;; (declare (obsolete setf "25.1"))
(setf (epg-context-passphrase-callback context)
- (if (consp passphrase-callback) ;FIXME: functions can also be consp!
- passphrase-callback
- (list passphrase-callback))))
+ (if (functionp passphrase-callback)
+ (list passphrase-callback)
+ passphrase-callback)))
(defun epg-context-set-progress-callback (context
progress-callback)
current amount done, the total amount to be done, and the
callback data (if any)."
(setf (epg-context-progress-callback context)
- (if (consp progress-callback) ;FIXME: could be a function!
- progress-callback
- (list progress-callback))))
+ (if (functionp progress-callback)
+ (list progress-callback)
+ progress-callback)))
(defun epg-context-set-signers (context signers)
"Set the list of key-id for signing."