;ELC ;;; compiled by jwz@thalidomide on Sat Jan 1 01:13:26 1994 ;;; from file /th/jwz/emacs19/lisp/gnus/chat.el ;;; emacs version 19.9 Lucid (beta9). ;;; bytecomp version 2.22; 22-dec-93. ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "This file was compiled for Emacs 19.")) (defvar chat/data-marker nil "\ A buffer's data marker.") (make-variable-buffer-local 'chat/data-marker) (fset 'chat/set-data-marker '(macro . #[(location) "ÀÁ\nE‡" [set-marker (if (markerp chat/data-marker) chat/data-marker (setq chat/data-marker (make-marker))) location] 3 "\ Set the current buffer's data marker to LOCATION. Returns the data marker."])) (byte-code "ÀÁÂÃ#ˆÀÁÄÅ#‡" [put no-process error-conditions (error no-process) error-message "Connection is broken"] 4) (fset 'chat/with-buffer-of '(macro . #[(proc &rest forms) "ÀÁÂà DDD \"‡" [append save-excursion set-buffer process-buffer proc forms] 5 "\ Set the current buffer to PROC's buffer, and evaluate FORMS."])) (byte-code "ÀÁÂÃ#ˆÄÅM‡" [put chat/with-buffer-of lisp-indent-hook 1 chat/accept-from (macro . #[(proc) "ÀÁ DÄEÅ DÆÇ EF‡" [if memq process-status proc '(open run) accept-process-output signal 'no-process] 6])] 4) (fset 'chat/wait-for-length #[(size proc) "ŠÀ !qˆde\n\\W«”à !Ä>«†Å !ˆªlÆÇ \"ˆªeÈ !«„ ª…Ê ‰ e\n\\Ë“)‡" [process-buffer proc size process-status (open run) accept-process-output signal no-process markerp chat/data-marker make-marker nil] 3 "\ Wait until we have SIZE characters of data from PROC. When successful, returns true and sets PROC's data mark to the location after SIZE. Does not change the match data. Signals 'no-process if PROC has died."]) (fset 'chat/wait-for-string #[(string proc) "ŠÀ !qˆebˆÂ ÄÅ#¬š` GZÆ !Ç>«†È !ˆª…ÉÊ \"ˆbˆª_Ë !«„ ª…Í ‰ `Ä“)‡" [process-buffer proc search-forward string nil eob process-status (open run) accept-process-output signal no-process markerp chat/data-marker make-marker] 4 "\ Wait until we see STRING in PROC's data. When successful, returns true and sets PROC's data mark to the end of the STRING match. Also sets the match data. Signals 'no-process if PROC has died."]) (fset 'chat/wait-for-regexp #[(regexp proc) "ŠÀ !qˆŠebˆÂ ÄÅ#¬—Æ !Ç>«†È !ˆª…ÉÊ \"ˆebˆªbË !«„ ª…Í ‰ `Ä“*‡" [process-buffer proc re-search-forward regexp nil t process-status (open run) accept-process-output signal no-process markerp chat/data-marker make-marker] 4 "\ Wait until we see REGEXP in PROC's data. When successful, returns true and sets PROC's data mark to the end of the REGEXP match. Also sets the match data. Signals 'no-process if PROC has died."]) (fset 'chat/wait-for-dot-crlf #[(proc) "ŠÀ !qˆŠebˆÂÃ!¬¨ÄÅÆÇ#«…ÂÈ!¬œm«q`ÉZÊ !Ë>«†Ì !ˆª…ÍÎ \"ˆbˆªXÆyˆÏ!«„ª…Ñ ‰`Æ“*‡" [process-buffer proc looking-at ". ?\n" search-forward "\n." nil eob " ?\n" 3 process-status (open run) accept-process-output signal no-process markerp chat/data-marker make-marker] 4 "\ The same as (chat/wait-for-regexp \"^\\\\.\\r\\n\" PROC), but considerably faster."]) (fset 'chat/with-data-of '(macro . #[(proc &rest forms) "À ÂÃÄ \"ÆEE‡" [chat/with-buffer-of proc prog1 append (save-restriction (narrow-to-region (point-min) chat/data-marker)) forms (delete-region (point-min) chat/data-marker)] 6 "\ Set the current buffer to PROC's buffer, narrowed to the region up to PROC's data mark, and evaluate FORMS. And then the data up to the data mark is deleted. Returns the value of FORMS. If you discover you didn't really need all the data and want to push some back, use 'chat/set-data-marker to change the data mark. Or consider using 'chat/with-buffer-of instead."])) (put 'chat/with-data-of 'lisp-indent-hook 1) (fset 'chat/data-of #[(proc) "ŠÀ !qˆŒe\n}ˆÃ ed|ˆ)e\n|ˆ)‡" [process-buffer proc chat/data-marker buffer-string] 3 "\ Returns a string that contains PROC's data up to its data mark, and deletes the data. If you need to do any parsing, you probably want to be using 'chat/with-data-of instead."]) (fset 'chat/delete-pending-data #[(proc) "ŠÀ !qˆ~ˆedW­‰ed|ˆÂ ˆªr)‡" [process-buffer proc accept-process-output] 2 "\ Clear out as much of PROC's pending data that we can without blocking. Returns nothing."]) (fset 'chat/with-data-for-length '(macro . #[(length proc &rest forms) "ÀÁ\n EÄÅ D\"E‡" [progn chat/wait-for-length length proc append chat/with-data-of forms] 5 "\ (LENGTH PROC FORMS ...). Equivalent to (chat/wait-for-length LENGTH PROC) (chat/with-data-of PROC FORMS ...) "])) (put 'chat/with-data-for-length 'lisp-indent-hook 2) (fset 'chat/with-data-until-string '(macro . #[(string proc &rest forms) "ÀÁ\n EÄÅ D\"E‡" [progn chat/wait-for-string string proc append chat/with-data-of forms] 5 "\ (STRING PROC FORMS ...). Equivalent to (chat/wait-for-string STRING PROC) (chat/with-data-of PROC FORMS ...) "])) (put 'chat/with-data-until-string 'lisp-indent-hook 2) (fset 'chat/with-data-until-regexp '(macro . #[(regexp proc &rest forms) "ÀÁ\n EÄÅ D\"E‡" [progn chat/wait-for-regexp regexp proc append chat/with-data-of forms] 5 "\ (REGEXP PROC FORMS ...). Equivalent to (chat/wait-for-regexp REGEXP PROC) (chat/with-data-of PROC FORMS ...) "])) (put 'chat/with-data-until-regexp 'lisp-indent-hook 2) (fset 'chat/with-data-until-dot-crlf '(macro . #[(proc &rest forms) "ÀÁ\nDÃÄ\nD \"E‡" [progn chat/wait-for-dot-crlf proc append chat/with-data-of forms] 5 "\ (PROC FORMS ...). Equivalent to (chat/wait-for-dot-crlf PROC) (chat/with-data-of PROC FORMS ...) "])) (byte-code "ÀÁÂÃ#ˆÄÅ!‡" [put chat/with-data-until-dot-crlf lisp-indent-hook 1 provide chat] 4)