# HG changeset patch # User Richard M. Stallman # Date 885360371 0 # Node ID b48b8060e70d9b984f56af55469833ae2c2a78ce # Parent 8af33d2de7b20c52d85809bd203bcf2670ddf238 (tq-filter): Use with-current-buffer. diff -r 8af33d2de7b2 -r b48b8060e70d lisp/emacs-lisp/tq.el --- a/lisp/emacs-lisp/tq.el Wed Jan 21 01:41:23 1998 +0000 +++ b/lisp/emacs-lisp/tq.el Wed Jan 21 05:26:11 1998 +0000 @@ -87,14 +87,10 @@ (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."