comparison lisp/emacs-lisp/tq.el @ 49598:0d8b17d428b5

Trailing whitepace deleted.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 04 Feb 2003 13:24:35 +0000
parents e67950065cf9
children fec321336b72 d7ddb3e565de
comparison
equal deleted inserted replaced
49597:e88404e8f2cf 49598:0d8b17d428b5
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the 23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, 24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 ;; Boston, MA 02111-1307, USA. 25 ;; Boston, MA 02111-1307, USA.
26 26
27 ;;; Commentary: 27 ;;; Commentary:
28 28
29 ;; manages receiving a stream asynchronously, 29 ;; manages receiving a stream asynchronously,
30 ;; parsing it into transactions, and then calling 30 ;; parsing it into transactions, and then calling
31 ;; handler functions 31 ;; handler functions
32 32
33 ;; Our basic structure is the queue/process/buffer triple. Each entry 33 ;; Our basic structure is the queue/process/buffer triple. Each entry
66 (defun tq-queue-head-regexp (tq) (car (car (tq-queue tq)))) 66 (defun tq-queue-head-regexp (tq) (car (car (tq-queue tq))))
67 (defun tq-queue-head-fn (tq) (cdr (cdr (car (tq-queue tq))))) 67 (defun tq-queue-head-fn (tq) (cdr (cdr (car (tq-queue tq)))))
68 (defun tq-queue-head-closure (tq) (car (cdr (car (tq-queue tq))))) 68 (defun tq-queue-head-closure (tq) (car (cdr (car (tq-queue tq)))))
69 (defun tq-queue-empty (tq) (not (tq-queue tq))) 69 (defun tq-queue-empty (tq) (not (tq-queue tq)))
70 (defun tq-queue-pop (tq) (setcar tq (cdr (car tq))) (null (car tq))) 70 (defun tq-queue-pop (tq) (setcar tq (cdr (car tq))) (null (car tq)))
71 71
72 72
73 ;;; must add to queue before sending! 73 ;;; must add to queue before sending!
74 (defun tq-enqueue (tq question regexp closure fn) 74 (defun tq-enqueue (tq question regexp closure fn)
75 "Add a transaction to transaction queue TQ. 75 "Add a transaction to transaction queue TQ.
76 This sends the string QUESTION to the process that TQ communicates with. 76 This sends the string QUESTION to the process that TQ communicates with.