summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-03-22 03:55:49 +0000
committerRichard M. Stallman <rms@gnu.org>1997-03-22 03:55:49 +0000
commitc17457854b0bf5b2368d8e4cadd1694968f2f43f (patch)
tree3d32647519826bb8096c19fdc8433cc88d3669a1
parent31672d441203f9120d2f7428b2071070c74131e5 (diff)
downloademacs-c17457854b0bf5b2368d8e4cadd1694968f2f43f.tar.gz
(tq-process-buffer): Catch errors running tq-queue-head-fn.
-rw-r--r--lisp/emacs-lisp/tq.el11
1 files changed, 7 insertions, 4 deletions
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)