diff --git a/library/tedit/TEDIT-WINDOW b/library/tedit/TEDIT-WINDOW
index 5fb985f9..062703fa 100644
--- a/library/tedit/TEDIT-WINDOW
+++ b/library/tedit/TEDIT-WINDOW
@@ -1,10 +1,12 @@
 (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
 
-(FILECREATED "14-Jul-2022 16:55:53" 
-{DSK}<users>kaplan>local>medley3.5>working-medley>library>tedit>TEDIT-WINDOW.;1 180402 
+(FILECREATED "20-Oct-2023 21:46:58" {MEDLEY}<library>tedit>TEDIT-WINDOW.;7 180689 
 
-      :PREVIOUS-DATE "14-Jul-2022 11:08:01" 
-{DSK}<users>kaplan>local>medley3.5>working-medley>library>newtedit>TEDIT-WINDOW.;2)
+      :EDIT-BY rmk
+
+      :CHANGES-TO (FNS TEDIT.DEACTIVATE.WINDOW)
+
+      :PREVIOUS-DATE "14-Jul-2022 16:55:53" {MEDLEY}<library>tedit>TEDIT-WINDOW.;5)
 
 
 (PRETTYCOMPRINT TEDIT-WINDOWCOMS)
@@ -1631,113 +1633,114 @@
 (DEFINEQ
 
 (TEDIT.DEACTIVATE.WINDOW
-  [LAMBDA (W FORCEFLG DISCONNECTONLYFLG)                    (* ; "Edited 16-Oct-2021 18:51 by rmk:")
+  [LAMBDA (W FORCEFLG DISCONNECTONLYFLG)                     (* ; "Edited 20-Oct-2023 21:46 by rmk")
+                                                            (* ; "Edited 16-Oct-2021 18:51 by rmk:")
 
     (* ;; "Deactivate the various button fns for this window")
 
     (PROG [(TEXTOBJ (WINDOWPROP W 'TEXTOBJ]                  (* ; 
                              "Can't be a call to TEXTOBJ, since window may NOT have a textobj on it.")
-          (replace (TEXTOBJ EDITFINISHEDFLG) of TEXTOBJ with T)
-          [COND
-             ((AND TEXTOBJ (fetch (TEXTOBJ EDITOPACTIVE) of TEXTOBJ))
-
-              (* ;; "If something is going on, DON'T CLOSE THE WINDOW")
-
-              (TEDIT.PROMPTPRINT TEXTOBJ "Not closed; edit operation in progress" T)
-              (RETURN 'DON'T))
-             ((AND TEXTOBJ (PROCESSP (WINDOWPROP W 'PROCESS))
-                   (NOT (fetch (TEXTOBJ EDITFINISHEDFLG) of TEXTOBJ))
-                   (NOT (fetch (TEXTOBJ TXTREADONLY) of TEXTOBJ))
-                   (NOT FORCEFLG))                           (* ; 
-                                        "This is an un-quit TEdit window.  Try to QUIT out of TEdit.")
-              (COND
-                 ((\TEDIT.QUIT W T))
-                 (T 
-                    (* ;; "Always return DON'T: If we didn't quit, we don't want to close the window;  if we did quit, the window is closed already, and will be reopened to reclose it.")
-
-                    (RETURN 'DON'T]
-          (COND
-             ([AND TEXTOBJ (OR FORCEFLG (fetch (TEXTOBJ EDITFINISHEDFLG) of TEXTOBJ)
-                               (fetch (TEXTOBJ TXTREADONLY) of TEXTOBJ)
-                               (NOT (PROCESSP (WINDOWPROP W 'PROCESS]
-                                                             (* ; 
-                                     "Only do this if it's a TEdit window, and has been QUIT out of.")
+          (CL:WHEN TEXTOBJ
+              (replace (TEXTOBJ EDITFINISHEDFLG) of TEXTOBJ with T)
               [COND
-                 ((AND (fetch (TEXTOBJ PROMPTWINDOW) of TEXTOBJ)
-                       (OPENWP (fetch (TEXTOBJ PROMPTWINDOW) of TEXTOBJ)))
-                  (CLEARW (fetch (TEXTOBJ PROMPTWINDOW) of TEXTOBJ]
-              (\SHOWSEL (fetch (TEXTOBJ SEL) of TEXTOBJ)
-                     NIL NIL)                                (* ; 
-        "Before the window is closed, make SURE that the caret is down, or the window will reappear.")
+                 ((fetch (TEXTOBJ EDITOPACTIVE) of TEXTOBJ)
+
+                  (* ;; "If something is going on, DON'T CLOSE THE WINDOW")
+
+                  (TEDIT.PROMPTPRINT TEXTOBJ "Not closed; edit operation in progress" T)
+                  (RETURN 'DON'T))
+                 ((AND (PROCESSP (WINDOWPROP W 'PROCESS))
+                       (NOT (fetch (TEXTOBJ EDITFINISHEDFLG) of TEXTOBJ))
+                       (NOT (fetch (TEXTOBJ TXTREADONLY) of TEXTOBJ))
+                       (NOT FORCEFLG))                       (* ; 
+                                        "This is an un-quit TEdit window.  Try to QUIT out of TEdit.")
+                  (COND
+                     ((\TEDIT.QUIT W T))
+                     (T 
+                        (* ;; "Always return DON'T: If we didn't quit, we don't want to close the window;  if we did quit, the window is closed already, and will be reopened to reclose it.")
+
+                        (RETURN 'DON'T]
               (COND
-                 ((AND (\TEDIT.WINDOW.TITLE TEXTOBJ)
-                       (OPENWP (fetch (TEXTOBJ PROMPTWINDOW) of TEXTOBJ))
-                       (OPENWP W)
-                       (EQ W (CAR (fetch (TEXTOBJ \WINDOW) of TEXTOBJ)))
-                       (NOT DISCONNECTONLYFLG))
-                  (\TEDIT.WINDOW.TITLE TEXTOBJ "Edit Window [Inactive]")
+                 ([OR FORCEFLG (fetch (TEXTOBJ EDITFINISHEDFLG) of TEXTOBJ)
+                      (fetch (TEXTOBJ TXTREADONLY) of TEXTOBJ)
+                      (NOT (PROCESSP (WINDOWPROP W 'PROCESS] (* ; 
+                                     "Only do this if it's a TEdit window, and has been QUIT out of.")
+                  [COND
+                     ((AND (fetch (TEXTOBJ PROMPTWINDOW) of TEXTOBJ)
+                           (OPENWP (fetch (TEXTOBJ PROMPTWINDOW) of TEXTOBJ)))
+                      (CLEARW (fetch (TEXTOBJ PROMPTWINDOW) of TEXTOBJ]
+                  (\SHOWSEL (fetch (TEXTOBJ SEL) of TEXTOBJ)
+                         NIL NIL)                            (* ; 
+        "Before the window is closed, make SURE that the caret is down, or the window will reappear.")
+                  (COND
+                     ((AND (\TEDIT.WINDOW.TITLE TEXTOBJ)
+                           (OPENWP (fetch (TEXTOBJ PROMPTWINDOW) of TEXTOBJ))
+                           (OPENWP W)
+                           (EQ W (CAR (fetch (TEXTOBJ \WINDOW) of TEXTOBJ)))
+                           (NOT DISCONNECTONLYFLG))
+                      (\TEDIT.WINDOW.TITLE TEXTOBJ "Edit Window [Inactive]")
                                                              (* ; 
                                                "Reset the window's title to a known 'inactive' value")
-                  ))
-              [COND
-                 ((NOT DISCONNECTONLYFLG)
-                  (for PANE in (REVERSE (CDR (fetch (TEXTOBJ \WINDOW) of TEXTOBJ)))
-                     do 
-                        (* ;; "Run thru any split-off sub-panes, and reattach them, so we get a whole window back before the end of the world.")
+                      ))
+                  [COND
+                     ((NOT DISCONNECTONLYFLG)
+                      (for PANE in (REVERSE (CDR (fetch (TEXTOBJ \WINDOW) of TEXTOBJ)))
+                         do 
+                            (* ;; "Run thru any split-off sub-panes, and reattach them, so we get a whole window back before the end of the world.")
 
-                        (\TEDIT.UNSPLITW PANE))
-                  (replace (TEXTOBJ \WINDOW) of TEXTOBJ with NIL)
-                  (COND
-                     ((type? STREAM (fetch (TEXTOBJ TXTFILE) of TEXTOBJ))
+                            (\TEDIT.UNSPLITW PANE))
+                      (replace (TEXTOBJ \WINDOW) of TEXTOBJ with NIL)
+                      (COND
+                         ((type? STREAM (fetch (TEXTOBJ TXTFILE) of TEXTOBJ))
                                                              (* ; 
                                                        "Close the file that this window was open on.")
-                      (COND
-                         ((NOT (WINDOWPROP W 'TEDIT-CLOSING-FILE T))
-                          (CLOSEF? (fetch (TEXTOBJ TXTFILE) of TEXTOBJ))
-                          (WINDOWPROP W 'TEDIT-CLOSING-FILE NIL]
-              (WINDOWPROP W 'TEXTOBJ NIL)                    (* ; 
+                          (COND
+                             ((NOT (WINDOWPROP W 'TEDIT-CLOSING-FILE T))
+                              (CLOSEF? (fetch (TEXTOBJ TXTFILE) of TEXTOBJ))
+                              (WINDOWPROP W 'TEDIT-CLOSING-FILE NIL]
+                  (WINDOWPROP W 'TEXTOBJ NIL)                (* ; 
                                                     "Detach the edit data structures from the window")
-              (WINDOWPROP W 'TEXTSTREAM NIL)
-              (WINDOWPROP W 'LINES NIL)
-              (WINDOWPROP W 'THISLINE NIL)
-              (WINDOWPROP W 'PROCESS.EXITFN NIL)
-              (WINDOWPROP W 'PROCESS.IDLEFN NIL)
-              (WINDOWPROP W 'CURSOROUTFN NIL)
-              (WINDOWPROP W 'CURSORMOVEDFN NIL)
-              (WINDOWPROP W 'BUTTONEVENTFN 'TOTOPW)          (* ; "And the button functions")
-              (WINDOWPROP W 'RIGHTBUTTONFN 'DOWINDOWCOM)
-              (WINDOWDELPROP W 'CLOSEFN 'TEDIT.DEACTIVATE.WINDOW)
-              (WINDOWPROP W 'SCROLLFN NIL)
-              (WINDOWDELPROP W 'RESHAPEFN '\EDITRESHAPEFN)
-              (AND (NOT DISCONNECTONLYFLG)
-                   (WINDOWPROP W 'PROCESS)
-                   (\TEDIT.INTERRUPT.SETUP (WINDOWPROP W 'PROCESS)
-                          T))                                (* ; 
+                  (WINDOWPROP W 'TEXTSTREAM NIL)
+                  (WINDOWPROP W 'LINES NIL)
+                  (WINDOWPROP W 'THISLINE NIL)
+                  (WINDOWPROP W 'PROCESS.EXITFN NIL)
+                  (WINDOWPROP W 'PROCESS.IDLEFN NIL)
+                  (WINDOWPROP W 'CURSOROUTFN NIL)
+                  (WINDOWPROP W 'CURSORMOVEDFN NIL)
+                  (WINDOWPROP W 'BUTTONEVENTFN 'TOTOPW)      (* ; "And the button functions")
+                  (WINDOWPROP W 'RIGHTBUTTONFN 'DOWINDOWCOM)
+                  (WINDOWDELPROP W 'CLOSEFN 'TEDIT.DEACTIVATE.WINDOW)
+                  (WINDOWPROP W 'SCROLLFN NIL)
+                  (WINDOWDELPROP W 'RESHAPEFN '\EDITRESHAPEFN)
+                  (AND (NOT DISCONNECTONLYFLG)
+                       (WINDOWPROP W 'PROCESS)
+                       (\TEDIT.INTERRUPT.SETUP (WINDOWPROP W 'PROCESS)
+                              T))                            (* ; 
                                                     "Make sure any disarmed interrupts are restored.")
-              (for MENUW in (ATTACHEDWINDOWS W) when (AND (WINDOWPROP MENUW 'TEDITMENU)
-                                                          (WINDOWPROP MENUW 'TEXTOBJ))
-                 do                                          (* ; 
+                  (for MENUW in (ATTACHEDWINDOWS W) when (AND (WINDOWPROP MENUW 'TEDITMENU)
+                                                              (WINDOWPROP MENUW 'TEXTOBJ))
+                     do                                      (* ; 
                                        "Detach all the TEDITMENU windows that belong to this window.")
-                    (replace (TEXTOBJ EDITFINISHEDFLG) of (TEXTOBJ MENUW) with T) 
+                        (replace (TEXTOBJ EDITFINISHEDFLG) of (TEXTOBJ MENUW) with T) 
                                                              (* ; "Mark it finished")
-                    (WINDOWPROP MENUW 'TEDITMENU NIL)        (* ; 
+                        (WINDOWPROP MENUW 'TEDITMENU NIL)    (* ; 
                                                              "And mark it no longer a menu window")
-                    (GIVE.TTY.PROCESS MENUW)                 (* ; 
+                        (GIVE.TTY.PROCESS MENUW)             (* ; 
                                                            "Then give it a chance to kill itself off")
-                    (DISMISS 300))
-              (COND
-                 ((NOT DISCONNECTONLYFLG)
-                  (GIVE.TTY.PROCESS W)
-                  (DISMISS 300)))
-              [replace (TEXTOBJ \WINDOW) of TEXTOBJ with (COND
-                                                            ((LISTP (fetch (TEXTOBJ \WINDOW)
-                                                                       of TEXTOBJ))
+                        (DISMISS 300))
+                  (COND
+                     ((NOT DISCONNECTONLYFLG)
+                      (GIVE.TTY.PROCESS W)
+                      (DISMISS 300)))
+                  [replace (TEXTOBJ \WINDOW) of TEXTOBJ with (COND
+                                                                ((LISTP (fetch (TEXTOBJ \WINDOW)
+                                                                           of TEXTOBJ))
                                                              (* ; "It's a list;  remove this window")
-                                                             (DREMOVE W (fetch (TEXTOBJ \WINDOW)
-                                                                           of TEXTOBJ]
+                                                                 (DREMOVE W (fetch (TEXTOBJ \WINDOW)
+                                                                               of TEXTOBJ]
                                                              (* ; 
                                        "Disconnect the window from the edit data structures as well.")
-              ])
+                  )))])
 
 (\TEDIT.REPAINTFN
   [LAMBDA (W)                                                (* ; "Edited 30-May-91 23:34 by jds")
@@ -2726,25 +2729,25 @@
 (RPAQ? TEDIT.TITLED.ICON.TEMPLATE (CONS TEDITICON (CONS TEDITMASK (CONS TEDIT.ICON.TITLE.REGION NIL))
                                         ))
 (DECLARE%: DONTCOPY
-  (FILEMAP (NIL (7116 90052 (TEDIT.CREATEW 7126 . 9899) (\TEDIT.CREATEW.FROM.REGION 9901 . 10881) (
-TEDIT.CURSORMOVEDFN 10883 . 20782) (TEDIT.CURSOROUTFN 20784 . 21327) (TEDIT.WINDOW.SETUP 21329 . 23154
-) (TEDIT.MINIMAL.WINDOW.SETUP 23156 . 30934) (\TEDIT.ACTIVE.WINDOWP 30936 . 31929) (
-\TEDIT.BUTTONEVENTFN 31931 . 55639) (\TEDIT.WINDOW.OPS 55641 . 58853) (\TEDIT.EXPANDFN 58855 . 59418) 
-(\TEDIT.MAINW 59420 . 60717) (\TEDIT.PRIMARYW 60719 . 61880) (\TEDIT.COPYINSERTFN 61882 . 62678) (
-\TEDIT.NEWREGIONFN 62680 . 65196) (\TEDIT.SET.WINDOW.EXTENT 65198 . 70741) (\TEDIT.SHRINK.ICONCREATE 
-70743 . 72944) (\TEDIT.SHRINKFN 72946 . 73505) (\TEDIT.SPLITW 73507 . 78972) (\TEDIT.UNSPLITW 78974 . 
-83830) (\TEDIT.WINDOW.SETUP 83832 . 89655) (\SAFE.FIRST 89657 . 90050)) (91382 92293 (TEDITWINDOWP 
-91392 . 92291)) (92330 95120 (TEDIT.GETINPUT 92340 . 94400) (\TEDIT.MAKEFILENAME 94402 . 95118)) (
-95169 101597 (TEDIT.PROMPTPRINT 95179 . 98114) (TEDIT.PROMPTFLASH 98116 . 100025) (
-\TEDIT.PROMPT.PAGEFULLFN 100027 . 101595)) (101832 105804 (TEXTSTREAM.TITLE 101842 . 102467) (
-\TEDIT.ORIGINAL.WINDOW.TITLE 102469 . 104391) (\TEDIT.WINDOW.TITLE 104393 . 105047) (
-\TEXTSTREAM.FILENAME 105049 . 105802)) (105847 147324 (TEDIT.DEACTIVATE.WINDOW 105857 . 112821) (
-\TEDIT.REPAINTFN 112823 . 115671) (\TEDIT.RESHAPEFN 115673 . 120517) (\TEDIT.SCROLLFN 120519 . 147322)
-) (147366 149497 (\TEDIT.PROCIDLEFN 147376 . 148671) (\TEDIT.PROCENTRYFN 148673 . 149118) (
-\TEDIT.PROCEXITFN 149120 . 149495)) (149576 160542 (\EDIT.DOWNCARET 149586 . 150255) (\EDIT.FLIPCARET 
-150257 . 151776) (TEDIT.FLASHCARET 151778 . 153059) (\EDIT.UPCARET 153061 . 153486) (
-TEDIT.NORMALIZECARET 153488 . 159185) (\SETCARET 159187 . 160115) (\TEDIT.CARET 160117 . 160540)) (
-160576 174370 (TEDIT.ADD.MENUITEM 160586 . 162877) (TEDIT.DEFAULT.MENUFN 162879 . 171849) (
-TEDIT.REMOVE.MENUITEM 171851 . 172848) (\TEDIT.CREATEMENU 172850 . 173287) (\TEDIT.MENU.WHENHELDFN 
-173289 . 174055) (\TEDIT.MENU.WHENSELECTEDFN 174057 . 174368)))))
+  (FILEMAP (NIL (7098 90034 (TEDIT.CREATEW 7108 . 9881) (\TEDIT.CREATEW.FROM.REGION 9883 . 10863) (
+TEDIT.CURSORMOVEDFN 10865 . 20764) (TEDIT.CURSOROUTFN 20766 . 21309) (TEDIT.WINDOW.SETUP 21311 . 23136
+) (TEDIT.MINIMAL.WINDOW.SETUP 23138 . 30916) (\TEDIT.ACTIVE.WINDOWP 30918 . 31911) (
+\TEDIT.BUTTONEVENTFN 31913 . 55621) (\TEDIT.WINDOW.OPS 55623 . 58835) (\TEDIT.EXPANDFN 58837 . 59400) 
+(\TEDIT.MAINW 59402 . 60699) (\TEDIT.PRIMARYW 60701 . 61862) (\TEDIT.COPYINSERTFN 61864 . 62660) (
+\TEDIT.NEWREGIONFN 62662 . 65178) (\TEDIT.SET.WINDOW.EXTENT 65180 . 70723) (\TEDIT.SHRINK.ICONCREATE 
+70725 . 72926) (\TEDIT.SHRINKFN 72928 . 73487) (\TEDIT.SPLITW 73489 . 78954) (\TEDIT.UNSPLITW 78956 . 
+83812) (\TEDIT.WINDOW.SETUP 83814 . 89637) (\SAFE.FIRST 89639 . 90032)) (91364 92275 (TEDITWINDOWP 
+91374 . 92273)) (92312 95102 (TEDIT.GETINPUT 92322 . 94382) (\TEDIT.MAKEFILENAME 94384 . 95100)) (
+95151 101579 (TEDIT.PROMPTPRINT 95161 . 98096) (TEDIT.PROMPTFLASH 98098 . 100007) (
+\TEDIT.PROMPT.PAGEFULLFN 100009 . 101577)) (101814 105786 (TEXTSTREAM.TITLE 101824 . 102449) (
+\TEDIT.ORIGINAL.WINDOW.TITLE 102451 . 104373) (\TEDIT.WINDOW.TITLE 104375 . 105029) (
+\TEXTSTREAM.FILENAME 105031 . 105784)) (105829 147611 (TEDIT.DEACTIVATE.WINDOW 105839 . 113108) (
+\TEDIT.REPAINTFN 113110 . 115958) (\TEDIT.RESHAPEFN 115960 . 120804) (\TEDIT.SCROLLFN 120806 . 147609)
+) (147653 149784 (\TEDIT.PROCIDLEFN 147663 . 148958) (\TEDIT.PROCENTRYFN 148960 . 149405) (
+\TEDIT.PROCEXITFN 149407 . 149782)) (149863 160829 (\EDIT.DOWNCARET 149873 . 150542) (\EDIT.FLIPCARET 
+150544 . 152063) (TEDIT.FLASHCARET 152065 . 153346) (\EDIT.UPCARET 153348 . 153773) (
+TEDIT.NORMALIZECARET 153775 . 159472) (\SETCARET 159474 . 160402) (\TEDIT.CARET 160404 . 160827)) (
+160863 174657 (TEDIT.ADD.MENUITEM 160873 . 163164) (TEDIT.DEFAULT.MENUFN 163166 . 172136) (
+TEDIT.REMOVE.MENUITEM 172138 . 173135) (\TEDIT.CREATEMENU 173137 . 173574) (\TEDIT.MENU.WHENHELDFN 
+173576 . 174342) (\TEDIT.MENU.WHENSELECTEDFN 174344 . 174655)))))
 STOP
diff --git a/library/tedit/TEDIT-WINDOW.LCOM b/library/tedit/TEDIT-WINDOW.LCOM
index 4ce1b6a0..192e965a 100644
Binary files a/library/tedit/TEDIT-WINDOW.LCOM and b/library/tedit/TEDIT-WINDOW.LCOM differ
