]> git.eshelyaron.com Git - emacs.git/commitdiff
(tq-process-buffer): Catch errors running tq-queue-head-fn.
authorRichard M. Stallman <rms@gnu.org>
Sat, 22 Mar 1997 03:55:49 +0000 (03:55 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 22 Mar 1997 03:55:49 +0000 (03:55 +0000)
lisp/emacs-lisp/tq.el

index 0de2c48e638b765ce91d82fb9b3e41695f0e39ef..5b2fa3ca3997c4bec1c8c9f8c0bea491a2cc0902 100644 (file)
@@ -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)