aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman1997-03-22 03:55:49 +0000
committerRichard M. Stallman1997-03-22 03:55:49 +0000
commit941e78a72a98a0bf26f51689bf9a7b7d47319d83 (patch)
tree756bacf6e3d99fb0587d8351fbb79f5571e90736 /lisp
parent328a37ec312c1eadedae8210b9554d2e51353981 (diff)
downloademacs-941e78a72a98a0bf26f51689bf9a7b7d47319d83.tar.gz
emacs-941e78a72a98a0bf26f51689bf9a7b7d47319d83.zip
(tq-process-buffer): Catch errors running tq-queue-head-fn.
Diffstat (limited to 'lisp')
-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."
112 (if (re-search-forward (tq-queue-head-regexp tq) nil t) 112 (if (re-search-forward (tq-queue-head-regexp tq) nil t)
113 (let ((answer (buffer-substring (point-min) (point)))) 113 (let ((answer (buffer-substring (point-min) (point))))
114 (delete-region (point-min) (point)) 114 (delete-region (point-min) (point))
115 (funcall (tq-queue-head-fn tq) 115 (unwind-protect
116 (tq-queue-head-closure tq) 116 (condition-case nil
117 answer) 117 (funcall (tq-queue-head-fn tq)
118 (tq-queue-pop tq) 118 (tq-queue-head-closure tq)
119 answer)
120 (error nil))
121 (tq-queue-pop tq))
119 (tq-process-buffer tq)))))) 122 (tq-process-buffer tq))))))
120 123
121(provide 'tq) 124(provide 'tq)