Mercurial > emacs
comparison lispref/processes.texi @ 70034:db4c2d467e9a
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-220
Creator: Michael Olson <mwolson@gnu.org>
Improve tq.el.
* lispref/processes.texi (Transaction Queues): Mention the new optional
`delay-question' argument for `tq-enqueue'.
* lisp/emacs-lisp/tq.el: Improve comments.
(tq-queue-head-question): New accessor function.
(tq-queue-head-regexp, tq-queue-head-closure, tq-queue-head-fn):
Update for modified queue structure.
(tq-queue-add): Accept `question' argument.
(tq-queue-pop): If a question is pending, send it.
(tq-enqueue): Accept new optional argument `delay-question'. If
this is non-nil, and at least one other question is pending a
response, queue the question rather than sending it immediately.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sun, 16 Apr 2006 02:17:00 +0000 |
parents | a7395d06bdc9 |
children | 0d799d14ece7 c156f6a9e7b5 |
comparison
equal
deleted
inserted
replaced
70033:257bb51424b3 | 70034:db4c2d467e9a |
---|---|
1506 capable of sending and receiving streams of bytes. It may be a child | 1506 capable of sending and receiving streams of bytes. It may be a child |
1507 process, or it may be a TCP connection to a server, possibly on another | 1507 process, or it may be a TCP connection to a server, possibly on another |
1508 machine. | 1508 machine. |
1509 @end defun | 1509 @end defun |
1510 | 1510 |
1511 @defun tq-enqueue queue question regexp closure fn | 1511 @defun tq-enqueue queue question regexp closure fn &optional delay-question |
1512 This function sends a transaction to queue @var{queue}. Specifying the | 1512 This function sends a transaction to queue @var{queue}. Specifying the |
1513 queue has the effect of specifying the subprocess to talk to. | 1513 queue has the effect of specifying the subprocess to talk to. |
1514 | 1514 |
1515 The argument @var{question} is the outgoing message that starts the | 1515 The argument @var{question} is the outgoing message that starts the |
1516 transaction. The argument @var{fn} is the function to call when the | 1516 transaction. The argument @var{fn} is the function to call when the |
1518 @var{closure}, and the answer received. | 1518 @var{closure}, and the answer received. |
1519 | 1519 |
1520 The argument @var{regexp} is a regular expression that should match | 1520 The argument @var{regexp} is a regular expression that should match |
1521 text at the end of the entire answer, but nothing before; that's how | 1521 text at the end of the entire answer, but nothing before; that's how |
1522 @code{tq-enqueue} determines where the answer ends. | 1522 @code{tq-enqueue} determines where the answer ends. |
1523 | |
1524 If the argument @var{delay-question} is non-nil, delay sending this | |
1525 question until the process has finished replying to any previous | |
1526 questions. This produces more reliable results with some processes." | |
1523 | 1527 |
1524 The return value of @code{tq-enqueue} itself is not meaningful. | 1528 The return value of @code{tq-enqueue} itself is not meaningful. |
1525 @end defun | 1529 @end defun |
1526 | 1530 |
1527 @defun tq-close queue | 1531 @defun tq-close queue |