Mercurial > emacs
diff lisp/emacs-lisp/tq.el @ 20693:b48b8060e70d
(tq-filter): Use with-current-buffer.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 21 Jan 1998 05:26:11 +0000 |
parents | ef3033d89075 |
children | d9207f337e2d |
line wrap: on
line diff
--- 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."