From: Richard M. Stallman Date: Sat, 22 Mar 1997 03:55:49 +0000 (+0000) Subject: (tq-process-buffer): Catch errors running tq-queue-head-fn. X-Git-Tag: emacs-20.1~2729 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=941e78a72a98a0bf26f51689bf9a7b7d47319d83;p=emacs.git (tq-process-buffer): Catch errors running tq-queue-head-fn. --- diff --git a/lisp/emacs-lisp/tq.el b/lisp/emacs-lisp/tq.el index 0de2c48e638..5b2fa3ca399 100644 --- a/lisp/emacs-lisp/tq.el +++ b/lisp/emacs-lisp/tq.el @@ -112,10 +112,13 @@ that's how we tell where the answer ends." (if (re-search-forward (tq-queue-head-regexp tq) nil t) (let ((answer (buffer-substring (point-min) (point)))) (delete-region (point-min) (point)) - (funcall (tq-queue-head-fn tq) - (tq-queue-head-closure tq) - answer) - (tq-queue-pop tq) + (unwind-protect + (condition-case nil + (funcall (tq-queue-head-fn tq) + (tq-queue-head-closure tq) + answer) + (error nil)) + (tq-queue-pop tq)) (tq-process-buffer tq)))))) (provide 'tq)