]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/mail/hashcash.el: Get rid of backquoted lambdas
authorChristopher Wellons <wellons@nullprogram.com>
Tue, 12 Mar 2019 20:35:28 +0000 (16:35 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 12 Mar 2019 20:35:28 +0000 (16:35 -0400)
Copyright-paperwork-exempt: yes

(hashcash-generate-payment-async): η-reduce.
(hashcash-insert-payment-async): Use proper closure.

lisp/mail/hashcash.el

index 59200eaab88d019a6b6695491adba45a12a27af8..519c6d94e1bd329c24320181b196323d916b46d7 100644 (file)
@@ -182,8 +182,7 @@ Return immediately.  Call CALLBACK with process and result when ready."
        (setq hashcash-process-alist (cons
                                      (cons process (current-buffer))
                                      hashcash-process-alist))
-       (set-process-filter process `(lambda (process output)
-                                      (funcall ,callback process output))))
+       (set-process-filter process callback))
     (funcall callback nil nil)))
 
 (defun hashcash-check-payment (token str val)
@@ -244,8 +243,8 @@ Only start calculation.  Results are inserted when ready."
     (hashcash-generate-payment-async
      (hashcash-payment-to arg)
      (hashcash-payment-required arg)
-     `(lambda (process payment)
-       (hashcash-insert-payment-async-2 ,(current-buffer) process payment)))))
+     (lambda (process payment)
+       (hashcash-insert-payment-async-2 (current-buffer) process payment)))))
 
 (defun hashcash-insert-payment-async-2 (buffer process pay)
   (when (buffer-live-p buffer)