diff options
| author | Richard M. Stallman | 1992-09-21 15:01:37 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1992-09-21 15:01:37 +0000 |
| commit | 09f119939b603b1bcc885df1dc8fbba62c9336fd (patch) | |
| tree | 3247e3b055da042a5a42ad6228684747ea839d5e | |
| parent | da2d07fc3cae600a06b0b50a8a15c9b73ee80119 (diff) | |
| download | emacs-09f119939b603b1bcc885df1dc8fbba62c9336fd.tar.gz emacs-09f119939b603b1bcc885df1dc8fbba62c9336fd.zip | |
Doc fixes. Make tq-create autoload.
| -rw-r--r-- | lisp/emacs-lisp/tq.el | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/tq.el b/lisp/emacs-lisp/tq.el index 4c356fe5173..043d057a744 100644 --- a/lisp/emacs-lisp/tq.el +++ b/lisp/emacs-lisp/tq.el | |||
| @@ -36,10 +36,12 @@ | |||
| 36 | 36 | ||
| 37 | ;;; Code: | 37 | ;;; Code: |
| 38 | 38 | ||
| 39 | ;;;###autoload | ||
| 39 | (defun tq-create (process) | 40 | (defun tq-create (process) |
| 40 | "Create and return a transaction queue. PROCESS should be capable | 41 | "Create and return a transaction queue communicating with PROCESS. |
| 41 | of sending and receiving streams of bytes. It may be a local process, | 42 | PROCESS should be a subprocess capable of sending and receiving |
| 42 | or it may be connected to a tcp server on another machine." | 43 | streams of bytes. It may be a local process, or it may be connected |
| 44 | to a tcp server on another machine." | ||
| 43 | (let ((tq (cons nil (cons process | 45 | (let ((tq (cons nil (cons process |
| 44 | (generate-new-buffer | 46 | (generate-new-buffer |
| 45 | (concat " tq-temp-" | 47 | (concat " tq-temp-" |
| @@ -68,14 +70,17 @@ or it may be connected to a tcp server on another machine." | |||
| 68 | 70 | ||
| 69 | ;;; must add to queue before sending! | 71 | ;;; must add to queue before sending! |
| 70 | (defun tq-enqueue (tq question regexp closure fn) | 72 | (defun tq-enqueue (tq question regexp closure fn) |
| 71 | "Add a transaction to TQ. Send question to the process, and call FN | 73 | "Add a transaction to transaction queue TQ. |
| 72 | with CLOSURE and and the answer, when it appears. The end of the | 74 | This sends the string QUESTION to the process that TQ communicates with. |
| 73 | answer is identified by REGEXP." | 75 | When the corresponding answer comes back, we call FN |
| 76 | with two arguments: CLOSURE, and the answer to the question. | ||
| 77 | REGEXP is a regular expression to match the entire answer; | ||
| 78 | that's how we tell where the answer ends." | ||
| 74 | (tq-queue-add tq regexp closure fn) | 79 | (tq-queue-add tq regexp closure fn) |
| 75 | (process-send-string (tq-process tq) question)) | 80 | (process-send-string (tq-process tq) question)) |
| 76 | 81 | ||
| 77 | (defun tq-close (tq) | 82 | (defun tq-close (tq) |
| 78 | "Shut down the process, and destroy the evidence." | 83 | "Shut down transaction queue TQ, terminating the process." |
| 79 | (delete-process (tq-process tq)) | 84 | (delete-process (tq-process tq)) |
| 80 | (kill-buffer (tq-buffer tq))) | 85 | (kill-buffer (tq-buffer tq))) |
| 81 | 86 | ||