[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Use closures in hashcash.el

From: Christopher Wellons
Subject: Re: [PATCH] Use closures in hashcash.el
Date: Wed, 13 Mar 2019 11:22:44 -0400
User-agent: NeoMutt/20170113 (1.7.2)

Michael Heerdegen has pointed out that the second backtick change isn't
correct since it doesn't remember the original buffer. Here's a
correction (sorry!):

diff --git a/lisp/mail/hashcash.el b/lisp/mail/hashcash.el
index 519c6d94e1..6ee1aee55a 100644
--- a/lisp/mail/hashcash.el
+++ b/lisp/mail/hashcash.el
@@ -243,8 +243,9 @@ Only start calculation.  Results are inserted when ready."
     (hashcash-payment-to arg)
     (hashcash-payment-required arg)
-     (lambda (process payment)
-       (hashcash-insert-payment-async-2 (current-buffer) process payment)))))
+     (let ((buffer (current-buffer)))
+       (lambda (process payment)
+         (hashcash-insert-payment-async-2 buffer process payment))))))

(defun hashcash-insert-payment-async-2 (buffer process pay)
  (when (buffer-live-p buffer)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]