(FILECREATED "24-Aug-84 13:52:17" {ERIS}<LISPUSERS>YAPFF.;1 3309   

      changes to:  (VARS YAPFFCOMS PAGEFULLFLASHSHADE PAGEFULLTITLESHADE PAGEFULLFLASHCOUNT 
			 PAGEFULLFLASHINTERVAL)
		   (FNS NPAGEFULLFN SHIFTDOWN? WAITFORSHIFTUP WAITFORSHIFTDOWN))


(* Copyright (c)  by NIL. All rights reserved.)

(PRETTYCOMPRINT YAPFFCOMS)

(RPAQQ YAPFFCOMS [(FNS NPAGEFULLFN WAITFORSHIFTUP SHIFTDOWN?)
		  (VARS PAGEFULLFLASHCOUNT PAGEFULLFLASHSHADE PAGEFULLTITLESHADE 
			PAGEFULLFLASHINTERVAL)
		  (P (AND (GETD (QUOTE NPAGEFULLFN))
			  (/MOVD (QUOTE NPAGEFULLFN)
				 (QUOTE PAGEFULLFN])
(DEFINEQ

(NPAGEFULLFN
  [LAMBDA (STREAM)                                           (* lmm "24-Aug-84 13:52")
    (COND
      [(AND [SETQ STREAM (DISPLAYSTREAMP (OR STREAM (TTYDISPLAYSTREAM]
	    (SETQ STREAM (WFROMDS STREAM T)))                (* got a window)
	(if [OR (SHIFTDOWN?)
		(AND (NOT (READP T))
		     (NOT (WINDOWPROP STREAM (QUOTE NOPAGEHOLD]
	    then (RESETLST (PROGN (RESETSAVE (SETDISPLAYHEIGHT T))

          (* * first change the title to show "Holding: ")


				  (RESETSAVE WINDOWTITLESHADE WINDOWTITLESHADE)
				  [SETQ WINDOWTITLESHADE
				    (PROG1 WINDOWTITLESHADE (SETQ WINDOWTITLESHADE PAGEFULLTITLESHADE)
					   (RESETSAVE
					     NIL
					     (LIST (FUNCTION [LAMBDA (W TITLE)
						       (WINDOWPROP W (QUOTE TITLE)
								   TITLE])
						   STREAM
						   (PUTWINDOWPROP STREAM (QUOTE TITLE)
								  (CONCAT "Holding: "
									  (OR (GETWINDOWPROP
										STREAM
										(QUOTE TITLE))
									      ""]

          (* * then flash the window until the shift is down or there is typeahead)


				  )
			   (bind (I ← PAGEFULLFLASHCOUNT)
				 TIMER
			      until (OR (READP T)
					[AND (WAIT.FOR.TTY PAGEFULLFLASHINTERVAL)
					     (bind WAITTIME do (if (OR (READP T)
								       (SHIFTDOWN?))
								   then (RETURN T)
								 else (BLOCK))
						repeatwhile (NOT (TIMEREXPIRED?
								   (OR WAITTIME (SETQ WAITTIME
									 (SETQ TIMER
									   (SETUPTIMER 
									    PAGEFULLFLASHINTERVAL 
										       TIMER]
					(AND I (LESSP (add I -1)
						      0)))
			      do (FLASHWINDOW STREAM NIL NIL PAGEFULLFLASHSHADE))

          (* * now, wait for shift to go up. If both shifts are down, set NOPAGEHOLD on this window)


			   (WAITFORSHIFTUP STREAM]
      (T (do (BLOCK) while (SHIFTDOWN?])

(WAITFORSHIFTUP
  [LAMBDA (STREAM)                                           (* lmm "24-Aug-84 13:37")
    (if (SHIFTDOWN?)
	then (bind BOTHDOWN
		do (AND (KEYDOWNP (QUOTE LSHIFT))
			(KEYDOWNP (QUOTE RSHIFT))
			(SETQ BOTHDOWN T))
		   (BLOCK)
		repeatwhile (SHIFTDOWN?) finally (AND STREAM (WINDOWP STREAM)
						      (PUTWINDOWPROP STREAM (QUOTE NOPAGEHOLD)
								     BOTHDOWN])

(SHIFTDOWN?
  [LAMBDA NIL                                                (* lmm "24-Aug-84 13:41")
    (OR (KEYDOWNP (QUOTE LSHIFT))
	(KEYDOWNP (QUOTE RSHIFT])
)

(RPAQQ PAGEFULLFLASHCOUNT NIL)

(RPAQQ PAGEFULLFLASHSHADE 1)

(RPAQQ PAGEFULLTITLESHADE 7)

(RPAQQ PAGEFULLFLASHINTERVAL 4000)
(AND (GETD (QUOTE NPAGEFULLFN))
     (/MOVD (QUOTE NPAGEFULLFN)
	    (QUOTE PAGEFULLFN)))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (595 3053 (NPAGEFULLFN 605 . 2455) (WAITFORSHIFTUP 2457 . 2882) (SHIFTDOWN? 2884 . 3051)
))))
STOP