(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "30-Nov-87 15:32:08" {ERINYES}<LISPUSERS>LYRIC>TEDIT-CLOSE-ON-SHRINK.;3 2335   

      changes to%:  (VARS TEDIT-CLOSE-ON-SHRINKCOMS)

      previous date%: "30-Nov-87 14:55:18" {ERINYES}<LISPUSERS>LYRIC>TEDIT-CLOSE-ON-SHRINK.;2)


(* "
Copyright (c) 1987 by Xerox Corporation.  All rights reserved.
")

(PRETTYCOMPRINT TEDIT-CLOSE-ON-SHRINKCOMS)

(RPAQQ TEDIT-CLOSE-ON-SHRINKCOMS ((FNS \TEDIT-CLOSE-ON-SHRINK) (DECLARE%: DONTEVAL@LOAD DOCOPY (P (UNADVISE \TEDIT.REOPEN.STREAM) (PUTPROP (QUOTE TEDIT.CREATEW) (QUOTE READVICE) (QUOTE (NIL (AFTER NIL (if (NOT (MEMB (QUOTE \TEDIT-CLOSE-ON-SHRINK) (WINDOWPROP !VALUE (QUOTE SHRINKFN)))) then (WINDOWADDPROP !VALUE (QUOTE SHRINKFN) (QUOTE \TEDIT-CLOSE-ON-SHRINK))))))) (PUTPROP (QUOTE \TEDIT.CREATEW.FROM.REGION) (QUOTE READVICE) (QUOTE (NIL (AFTER NIL (if (NOT (MEMB (QUOTE \TEDIT-CLOSE-ON-SHRINK) (WINDOWPROP !VALUE (QUOTE SHRINKFN)))) then (WINDOWADDPROP !VALUE (QUOTE SHRINKFN) (QUOTE \TEDIT-CLOSE-ON-SHRINK))))))) (READVISE TEDIT.CREATEW \TEDIT.CREATEW.FROM.REGION) (SETQ ADVISEDFNS (LDIFFERENCE ADVISEDFNS (QUOTE (TEDIT.CREATEW \TEDIT.CREATEW.FROM.REGION \TEDIT.REOPEN.STREAM)))))))
)
(DEFINEQ

(\TEDIT-CLOSE-ON-SHRINK
(LAMBDA (teditWindow) (* N.H.Briggs " 3-Aug-87 17:24") (LET* ((textObj (TEXTOBJ teditWindow)) (backingStream (fetch (TEXTOBJ TXTFILE) of textObj))) (if (NOT (fetch (TEXTOBJ \DIRTY) of textObj)) then (AND backingStream (CLOSEF? backingStream)))) T)
)
)
(DECLARE%: DONTEVAL@LOAD DOCOPY 
(UNADVISE \TEDIT.REOPEN.STREAM)
(PUTPROP (QUOTE TEDIT.CREATEW) (QUOTE READVICE) (QUOTE (NIL (AFTER NIL (if (NOT (MEMB (QUOTE \TEDIT-CLOSE-ON-SHRINK) (WINDOWPROP !VALUE (QUOTE SHRINKFN)))) then (WINDOWADDPROP !VALUE (QUOTE SHRINKFN) (QUOTE \TEDIT-CLOSE-ON-SHRINK)))))))
(PUTPROP (QUOTE \TEDIT.CREATEW.FROM.REGION) (QUOTE READVICE) (QUOTE (NIL (AFTER NIL (if (NOT (MEMB (QUOTE \TEDIT-CLOSE-ON-SHRINK) (WINDOWPROP !VALUE (QUOTE SHRINKFN)))) then (WINDOWADDPROP !VALUE (QUOTE SHRINKFN) (QUOTE \TEDIT-CLOSE-ON-SHRINK)))))))
(READVISE TEDIT.CREATEW \TEDIT.CREATEW.FROM.REGION)
(SETQ ADVISEDFNS (LDIFFERENCE ADVISEDFNS (QUOTE (TEDIT.CREATEW \TEDIT.CREATEW.FROM.REGION \TEDIT.REOPEN.STREAM))))
)
(PUTPROPS TEDIT-CLOSE-ON-SHRINK COPYRIGHT ("Xerox Corporation" 1987))
(DECLARE%: DONTCOPY
  (FILEMAP (NIL (1232 1521 (\TEDIT-CLOSE-ON-SHRINK 1242 . 1519)))))
STOP