;;; -*- Mode:Lisp; Readtable:ZL; Package:USER; Base:10; Patch-File:T -*-
;;; Patch file for System version 124.60
;;; Reason:
;;;  Control-C no longer means "End this message" to (QSEND) -- it now has its
;;;  usual rubout handler interpretation of Yank Input.
;;; Written 15-Jun-88 16:53:12 by pld at site Gigamos Cambridge
;;; while running on Azathoth from band 1
;;; with Experimental System 124.59, Experimental Local-File 74.2, Experimental File-Server 23.1, Experimental Unix-Interface 12.0, Experimental ZMail 72.0, Experimental Tape 23.6, Experimental Lambda-Diag 16.2, microcode 1759, SDU Boot Tape 3.14, SDU ROM 8, the old ones.


; From modified file DJ: L.IO1; CONVER.LISP#155 at 15-Jun-88 16:53:36
#10R ZWEI#: 
(COMPILER-LET ((*PACKAGE* (PKG-FIND-PACKAGE "ZWEI")))
  (COMPILER::PATCH-SOURCE-FILE "SYS: IO1; CONVER  "

(DEFUN QSEND-GET-MESSAGE (&OPTIONAL (STREAM *STANDARD-INPUT*) IGNORE END-WITH-RETURN-OK)
  (IF (AND (NOT RUBOUT-HANDLER)
	   (MEMQ :RUBOUT-HANDLER (SEND STREAM :WHICH-OPERATIONS)))
      (SEND STREAM :RUBOUT-HANDLER
	       '((:EDITING-COMMAND #/END #/C-Z
				   (#/C-M-Y "Yank last msg received")
				   (#/C-M-E "Switch to Converse")))
	       #'QSEND-GET-MESSAGE STREAM NIL END-WITH-RETURN-OK)
      (DO ((MSG (MAKE-ARRAY 100 :TYPE 'ART-STRING :LEADER-LIST '(0)))
	   (CH))
	  (NIL)
	(SETQ CH (SEND STREAM :TYI))
	(AND
	  (OR (AND (MEMQ CH '(#/END #/C-Z NIL)))
	      (AND END-WITH-RETURN-OK (EQ CH #/RETURN))) ;;why doesn't this work?
	  (RETURN MSG))
	(AND (EQ CH #/C-M-E) (RETURN (VALUES MSG T)))
	(COND ((EQ CH #/C-M-Y)   ;;selectq ify?
	       (LET ((TEXT (LAST-MESSAGE-TEXT)))
		 (IF (NULL TEXT) (SETQ TEXT ""))
		 (STRING-NCONC MSG TEXT)
		 (SEND STREAM :FORCE-KBD-INPUT TEXT)))
	      ;; Normal case for a vanilla character
	      (T (ARRAY-PUSH-EXTEND MSG CH))))))

))
