Mercurial > emacs
changeset 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 | 8af33d2de7b2 |
children | 83a65a1efdaa |
files | lisp/emacs-lisp/tq.el |
diffstat | 1 files changed, 4 insertions(+), 8 deletions(-) [+] |
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."