(FILECREATED "29-Jan-86 11:46:09" {ERIS}<LISPUSERS>KOTO>TILEDEDIT.;3 3137   

      changes to:  (FNS MAKEMDERALIST)

      previous date: "15-Jan-86 20:49:30" {ERIS}<LISPUSERS>KOTO>TILEDEDIT.;2)


(* Copyright (c) 1985, 1986 by Jeff Shrager. All rights reserved.)

(PRETTYCOMPRINT TILEDEDITCOMS)

(RPAQQ TILEDEDITCOMS ((FNS MAKEEDITW MDENEXTW MAKEMDERALIST)))
(DEFINEQ

(MAKEEDITW
  [LAMBDA (NAME TYP)                                         (* hts: "15-Jan-86 20:39")
    (PROG (W)
	    (if (SETQ W (if (TOPEDITW)
				then (PUTWINDOWPROP (TOPEDITW)
							(QUOTE DEDITCACHED))
			      else (WINDOWP DEditWindow)))
		then (if (NULL (SAMEEDITW W NAME TYP))
			   then (PUTWINDOWPROP W (QUOTE TITLE)
						   (NAMEOFEDITW NAME TYP))
				  (PUTWINDOWPROP W (QUOTE DEDITWHOAMI)
						   (LIST NAME TYP)))
	      else (SETQ W (LET* [(NEWREGION (MDENEXTW))
				      (W (CREATEW (CDAR NEWREGION)
						    (NAMEOFEDITW NAME TYP]
				     (WINDOWPROP W (QUOTE MDEREGION)
						   NEWREGION)
				 W))
		     (PUTWINDOWPROP W (QUOTE DEDITWHOAMI)
				      (LIST NAME TYP)))
	    (PUTWINDOWPROP W (QUOTE DEDITCHANGES)
			     EDITCHANGES)
	    (RETURN W])

(MDENEXTW
  [LAMBDA NIL                                                (* hts: "15-Jan-86 20:45")
    (LET [(CR (AND (WINDOWP (TOPEDITW))
		     (CDR (WINDOWPROP (TOPEDITW)
					  (QUOTE MDEREGION]
         (COND
	   ((NULL CR)
	     (MAKEMDERALIST))
	   (T CR])

(MAKEMDERALIST
  [LAMBDA NIL                                                (* Jeff.Shrager "29-Jan-86 11:45")

          (* * This used to be stored as a constant in a variable, but in light of different screen sizes 
	  (as introduced by the Daybreak machines) it makes more sense to have it recomputed as needed according to the 
	  current screen size.)


    (LET [(EDITBUFFERHEIGHT 72)
	  (EDITOPSWIDTH (COND
			  ((GETD (QUOTE DEDITK))         (* If the lusing DEDITKeys package is incore, then the
							     menu will be wider.)
			    94)
			  (T 69]
         (LET ((EDITWINDOWHEIGHT (QUOTIENT (DIFFERENCE SCREENHEIGHT EDITBUFFERHEIGHT)
					     2))
	       (EDITWINDOWWIDTH (QUOTIENT (DIFFERENCE SCREENWIDTH (PLUS EDITOPSWIDTH 
									      SCROLLBARWIDTH))
					    2)))
	      (LIST (CONS 1 (CREATEREGION SCROLLBARWIDTH (PLUS EDITWINDOWHEIGHT 
								       EDITBUFFERHEIGHT)
						EDITWINDOWWIDTH EDITWINDOWHEIGHT))
		      (CONS 2 (CREATEREGION (PLUS SCROLLBARWIDTH EDITWINDOWWIDTH)
						(PLUS EDITWINDOWHEIGHT EDITBUFFERHEIGHT)
						EDITWINDOWWIDTH EDITWINDOWHEIGHT))
		      (CONS 3 (CREATEREGION SCROLLBARWIDTH EDITBUFFERHEIGHT EDITWINDOWWIDTH 
						EDITWINDOWHEIGHT))
		      (CONS 4 (CREATEREGION (PLUS SCROLLBARWIDTH EDITWINDOWWIDTH)
						EDITBUFFERHEIGHT EDITWINDOWWIDTH EDITWINDOWHEIGHT])
)
(PUTPROPS TILEDEDIT COPYRIGHT ("Jeff Shrager" 1985 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (371 3057 (MAKEEDITW 381 . 1309) (MDENEXTW 1311 . 1621) (MAKEMDERALIST 1623 . 3055)))))
STOP