summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1998-01-21 05:26:11 +0000
committerRichard M. Stallman <rms@gnu.org>1998-01-21 05:26:11 +0000
commit09841f8db266d6f56b9c1af081c43f988c0af28b (patch)
treed9000360d42e233db732ca496a211f1c9f3d18a8 /lisp/emacs-lisp
parente8c86f8d742404997a27530b236be905d480394b (diff)
downloademacs-09841f8db266d6f56b9c1af081c43f988c0af28b.tar.gz
emacs-09841f8db266d6f56b9c1af081c43f988c0af28b.tar.bz2
emacs-09841f8db266d6f56b9c1af081c43f988c0af28b.zip
(tq-filter): Use with-current-buffer.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/tq.el12
1 files changed, 4 insertions, 8 deletions
diff --git a/lisp/emacs-lisp/tq.el b/lisp/emacs-lisp/tq.el
index 5b2fa3ca399..41839c8f11f 100644
--- a/lisp/emacs-lisp/tq.el
+++ b/lisp/emacs-lisp/tq.el
@@ -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."