;;; -*- Mode:Lisp; Readtable:ZL; Package:USER; Base:8; Patch-File:T -*-
;;; Patch file for System version 125.16
;;; Reason:
;;;  When you get a background error with windows locked, the who-line
;;;  message now tells the truth about which keys to press to resolve the
;;;  problem.  The key for clearing window-system locks is Terminal
;;;  Control-Clear-Input, Not M-C-Clear-Input.  (I always wondered why that
;;;  didn't work.)
;;; Written 21-Jul-88 19:46:34 by keith (Keith Corbett) at site Gigamos Cambridge
;;; while running on Breaking Glass from band 1
;;; with System 125.14, ZWEI 125.2, ZMail 73.0, Local-File 75.0, File-Server 24.0, Unix-Interface 13.0, Tape 24.0, Lambda-Diag 17.0, Experimental Window-Maker 2.1, Experimental Kermit 36.5, Experimental KMC-SYSTEM 2.1, microcode 1761, SDU Boot Tape 3.14, SDU ROM 103, 7/19.



; From modified file DJ: L.WINDOW; WHOLIN.LISP#109 at 21-Jul-88 19:46:35
#8R TV#: 
(COMPILER-LET ((*PACKAGE* (PKG-FIND-PACKAGE "TV")))
  (COMPILER::PATCH-SOURCE-FILE "SYS: WINDOW; WHOLIN  "

(DEFUN WHO-LINE-DOCUMENTATION-FUNCTION (WHO-SHEET)
  (DECLARE (:SELF-FLAVOR WHO-LINE-SHEET))
  (LET* ((W MOUSE-WINDOW)
	 (NEW-STATE
	   (COND (LOCKED-ERROR-WINDOWS
		  ;; To attract attention, make this message blink.
		  (LET ((MSG
			  "*** Background error with window locked; try Terminal Control-Clear-Input or Terminal Call ***")
			(MSG1
			  "    Background error with window locked; try Terminal Control-Clear-Input or Terminal Call"))
		    (IF (EQ WHO-LINE-ITEM-STATE MSG)
			MSG1 MSG)))
		 (*WHO-LINE-DOCUMENTATION-OVERRIDE*)
;		 (PENDING-NOTIFICATIONS
;		  (LET ((MSG
;			  "***** Notifications are pending.  Terminal N is one way to see them. *****")
;			(MSG1
;			  "      Notifications are pending.  Terminal N is one way to see them."))
;		    (IF (EQ WHO-LINE-ITEM-STATE MSG)
;			MSG1 MSG)))
		 ((SYMBOLP W)
		  (AND W WHO-LINE-MOUSE-GRABBED-DOCUMENTATION))
		 (T
		  (MULTIPLE-VALUE-BIND (DOC ERROR)
		      (CATCH-ERROR (SEND W :WHO-LINE-DOCUMENTATION-STRING)
				   NIL)
		    (IF ERROR "Error getting Who-Line documentation string" DOC))))))
    (unless (stringp new-state)
      (setq new-state "Click right to get the System Menu."))
    (WHEN (NEQ WHO-LINE-ITEM-STATE NEW-STATE)
      (SETQ WHO-LINE-ITEM-STATE NEW-STATE)
      (SHEET-CLEAR WHO-SHEET)
      (SHEET-STRING-OUT WHO-SHEET NEW-STATE
			0 (MIN (OR (STRING-SEARCH-CHAR #/NEWLINE NEW-STATE)
				   (LENGTH NEW-STATE))
			       (TRUNCATE (SHEET-INSIDE-WIDTH WHO-SHEET)
					 (SHEET-CHAR-WIDTH WHO-SHEET)))))))

))
