From 258d523a72eb4b658915306b0613f1bf66dcd16f Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sat, 15 Apr 2006 18:12:07 +0000 Subject: [PATCH] (hashcash-insert-payment-async-2): Make sure the buffer is alive. --- lisp/ChangeLog | 1 + lisp/hashcash.el | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f97be3b85..2abb6d31f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,6 +2,7 @@ * hashcash.el (hashcash-insert-payment-async): Remove dead code; reindent. + (hashcash-insert-payment-async-2): Make sure the buffer is alive. 2006-04-15 NAKAJI Hiroyuki (tiny change) diff --git a/lisp/hashcash.el b/lisp/hashcash.el index d4d556af4..7382345df 100644 --- a/lisp/hashcash.el +++ b/lisp/hashcash.el @@ -238,15 +238,16 @@ Only start calculation. Results are inserted when ready." (hashcash-insert-payment-async-2 ,(current-buffer) process payment))))) (defun hashcash-insert-payment-async-2 (buffer process pay) - (with-current-buffer buffer - (save-excursion - (save-restriction - (setq hashcash-process-alist (delq - (assq process hashcash-process-alist) - hashcash-process-alist)) - (message-goto-eoh) - (when pay - (insert-before-markers "X-Hashcash: " pay)))))) + (when (buffer-live-p buffer) + (with-current-buffer buffer + (save-excursion + (save-restriction + (setq hashcash-process-alist (delq + (assq process hashcash-process-alist) + hashcash-process-alist)) + (message-goto-eoh) + (when pay + (insert-before-markers "X-Hashcash: " pay))))))) (defun hashcash-cancel-async (&optional buffer) "Delete any hashcash processes associated with BUFFER. -- 2.34.1