changeset 17216:ef3033d89075

(tq-process-buffer): Catch errors running tq-queue-head-fn.
author Richard M. Stallman <rms@gnu.org>
date Sat, 22 Mar 1997 03:55:49 +0000
parents 21e3f467224e
children 571d0c136e48
files lisp/emacs-lisp/tq.el
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/tq.el	Sat Mar 22 03:55:21 1997 +0000
+++ b/lisp/emacs-lisp/tq.el	Sat Mar 22 03:55:49 1997 +0000
@@ -112,10 +112,13 @@
       (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)