]> git.eshelyaron.com Git - emacs.git/commitdiff
(tq-filter): Use with-current-buffer.
authorRichard M. Stallman <rms@gnu.org>
Wed, 21 Jan 1998 05:26:11 +0000 (05:26 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 21 Jan 1998 05:26:11 +0000 (05:26 +0000)
lisp/emacs-lisp/tq.el

index 5b2fa3ca3997c4bec1c8c9f8c0bea491a2cc0902..41839c8f11f5e8372c08951dde5591d362f8e1e8 100644 (file)
@@ -87,14 +87,10 @@ that's how we tell where the answer ends."
 
 (defun tq-filter (tq string)
   "Append STRING to the TQ's buffer; then process the new data."
-  (let ((old-buffer (current-buffer)))
-    (unwind-protect
-       (progn
-         (set-buffer (tq-buffer tq))
-         (goto-char (point-max))
-         (insert string)
-         (tq-process-buffer tq))
-      (set-buffer old-buffer))))
+  (with-current-buffer (tq-buffer tq)
+    (goto-char (point-max))
+    (insert string)
+    (tq-process-buffer tq)))
 
 (defun tq-process-buffer (tq)
   "Check TQ's buffer for the regexp at the head of the queue."