diff --git a/internal/TEDIT-DEBUG b/internal/TEDIT-DEBUG
index 7b08db5c..fdd9aea6 100644
--- a/internal/TEDIT-DEBUG
+++ b/internal/TEDIT-DEBUG
@@ -1,12 +1,12 @@
-(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
+(DEFINE-FILE-INFO :PACKAGE "INTERLISP" :READTABLE "INTERLISP" :BASE 10 :FORMAT :UTF-8)
 
-(FILECREATED " 7-Feb-2026 17:00:39" {WMEDLEY}<internal>TEDIT-DEBUG.;178 138742 
+(FILECREATED "18-May-2026 10:46:12" {MEDLEY}<internal>TEDIT-DEBUG.;191 139564 
 
       :EDIT-BY rmk
 
       :CHANGES-TO (FNS TEDIT-DEBUG)
 
-      :PREVIOUS-DATE " 7-Feb-2026 10:41:45" {WMEDLEY}<internal>TEDIT-DEBUG.;177)
+      :PREVIOUS-DATE "29-Apr-2026 09:51:30" {MEDLEY}<internal>TEDIT-DEBUG.;190)
 
 
 (PRETTYCOMPRINT TEDIT-DEBUGCOMS)
@@ -31,7 +31,8 @@
               (FNS TEST.TEMPLATE))
         (FNS TESTACTION)
         (COMS                                                (* ; "Inspect")
-              (FNS IPC ILINES ISEL ITS IPANES ITL IHIST IPCTB IMB ICL IPL ICARET INSPECTPIECES))
+              (FNS IPC ILINES ISEL ITS IPANES ITL IHIST IPCTB IMB ICL IPL ICARET INSPECTPIECES 
+                   INSPECTFILEPIECES))
         (COMS                                                (* ; "Show")
               (FNS SP SL SSP SPF SLF SHOWLINE SLL STBYTES SSEL)
               (FNS STL CLEARTHISLINE CHARSLOTP \TLVALIDATE))
@@ -58,7 +59,7 @@
         (VARS (OK.TO.MODIFY.FNS T))
         (FNS OLDWI COMP DFR)
         (FNS DFGV GDIRECTORIES)
-        (COMS (FNS TTEST LTEST THC)
+        (COMS (FNS TTEST LTEST)
               (INITVARS (LASTTTESTFILE))
               (VARS * TTESTREGIONS))
         (COMS (FNS SHOWSAFE)
@@ -446,6 +447,16 @@
          (SETQ W (INSPECT/TOP/LEVEL/LIST PIECES))
          (WINDOWPROP W 'TITLE PIECE)
          PIECE])
+
+(INSPECTFILEPIECES
+  [LAMBDA (FILEPOS N TSTREAM)                                (* ; "Edited 29-Apr-2026 09:51 by rmk")
+                                                             (* ; "Edited 24-Apr-2026 17:07 by rmk")
+
+    (* ;; "Give a file position, inspect the piece that includes its characters, and following pieces. FILEBYTES/TFILEBYTES work in the other way:  given a piece, show the bytes that make it up.")
+
+    (for PC inpieces (\TEDIT.FIRSTPIECE (GTO TSTREAM)) when (<= FILEPOS (PFPOS PC))
+       do (for I from 1 to (OR N 1) as PCI inpieces PC do (INSPECT PCI))
+          (RETURN])
 )
 
 
@@ -653,7 +664,7 @@
                 (PRINTOUT OFILE .FONT '(TERMINAL 8 BOLD)
                        TITLE .FONT '(TERMINAL 8)
                        T)
-                (for TYPE PF (FIRSTPF _ (TEDIT.GET.PAGEFORMAT PAGEREGIONS 'FIRST/DEFAULT))
+                (for TYPE PF (FIRSTPF ← (TEDIT.GET.PAGEFORMAT PAGEREGIONS 'FIRST/DEFAULT))
                    in '(FIRST/DEFAULT LEFT RIGHT)
                    collect (SETQ PF (TEDIT.GET.PAGEFORMAT PAGEREGIONS TYPE))
                          (PRINTOUT OFILE T .FONT '(TERMINAL 8 BOLD)
@@ -696,13 +707,13 @@
                (CL:UNLESS TRAILER
                    (PRINTOUT T FORMATSTREAM " is not a Tedit looks file" T)
                    (RETURN))
-               (for PCNO BYTELEN LTYPE LOOKSMAP PLOOKSMAP LASTCHARLOOKNO (PFPOS _ 0)
-                    (CHNO _ 0)
-                    (TEXTPCNO _ 0)
-                    (START _ (CAR TRAILER))
-                    (TYPETAB _ 13)
-                    (FPOSTAB _ 28)
-                    (BYTESTAB _ 38) from 1 to PCCOUNT
+               (for PCNO BYTELEN LTYPE LOOKSMAP PLOOKSMAP LASTCHARLOOKNO (PFPOS ← 0)
+                    (CHNO ← 0)
+                    (TEXTPCNO ← 0)
+                    (START ← (CAR TRAILER))
+                    (TYPETAB ← 13)
+                    (FPOSTAB ← 28)
+                    (BYTESTAB ← 38) from 1 to PCCOUNT
                   first (PRINTOUT OUTFILE "Starting FILEPTR = " START "   " "PCCOUNT = " PCCOUNT T)
                         (SETFILEPTR FORMATSTREAM START)
                   do (SETQ BYTELEN (\DWIN FORMATSTREAM))
@@ -846,7 +857,7 @@
                                         "l"
                                         "")
                          "dummy" T)
-           else (for CNO C LASTC (TSTREAM _ (TEXTSTREAM TEXTOBJ)) from (GETLD LINE LCHAR1)
+           else (for CNO C LASTC (TSTREAM ← (TEXTSTREAM TEXTOBJ)) from (GETLD LINE LCHAR1)
                    to (GETLD LINE LCHARLAST) first (SETFILEPTR TSTREAM (SUB1 (GETLD LINE LCHAR1)))
                                                    (PRINTOUT FILE " %"") until (EOFP TSTREAM)
                    do (SETQ C (BIN TSTREAM))                 (* ; 
@@ -936,7 +947,8 @@
 (DEFINEQ
 
 (STL
-  [LAMBDA (THISLINE LASTCS LCHAR1 OFILE)                     (* ; "Edited 11-Apr-2025 13:02 by rmk")
+  [LAMBDA (THISLINE LASTCS LCHAR1 OFILE)                     (* ; "Edited 19-Apr-2026 14:39 by rmk")
+                                                             (* ; "Edited 11-Apr-2025 13:02 by rmk")
                                                              (* ; "Edited 29-Mar-2025 22:36 by rmk")
                                                              (* ; "Edited 22-Aug-2024 23:51 by rmk")
                                                              (* ; "Edited  4-Aug-2024 12:08 by rmk")
@@ -962,15 +974,15 @@
                                                NIL
                                                'STL)
                         NIL 80)
-           (for CSLOT EXPANDSPACES CHNO TX LENGTH CHAR CHARW CHARCL (SPACEFACTOR _
+           (for CSLOT EXPANDSPACES CHNO TX LENGTH CHAR CHARW CHARCL (SPACEFACTOR ←
                                                                            (FETCH TLSPACEFACTOR
                                                                               OF THISLINE))
-                (FIRSTSPACESLOT _ (fetch TLFIRSTSPACE of THISLINE))
-                (LINE _ (fetch (THISLINE DESC) of THISLINE))
-                (NSPACES _ 0)
-                (NCHARS _ 0)
-                (SPACETOTAL _ 0)
-                (PSP _ (AND (BOUNDP 'PREVSP)
+                (FIRSTSPACESLOT ← (fetch TLFIRSTSPACE of THISLINE))
+                (LINE ← (fetch (THISLINE DESC) of THISLINE))
+                (NSPACES ← 0)
+                (NCHARS ← 0)
+                (SPACETOTAL ← 0)
+                (PSP ← (AND (BOUNDP 'PREVSP)
                             (NEQ PREVSP (GETATOMVAL 'PREVSP))
                             PREVSP)) incharslots THISLINE as NSLOTS from 0
               first (if (NULL LINE)
@@ -987,14 +999,13 @@
                     (CL:WHEN LCHAR1
                         (SETQ CHNO (OR LCHAR1 1)))
                     (SETQ LENGTH TX)
-                    (printout OFILE 29 "XLIM" T) eachtime (SETQ CHAR (CHAR CSLOT))
-                                                       (SETQ CHARW (CHARW CSLOT))
-                                                       (SETQ CHARCL (CHARCL CSLOT))
-                                                       (CL:UNLESS (CHARSLOTP CSLOT THISLINE)
-                                                              (HELP "THISLINE RUNS OFF THE EDGE" 
-                                                                    THISLINE))
-              repeatuntil [OR (EQ CSLOT (OR LASTCS (LASTCHARSLOT THISLINE]
-              do (printout OFILE .I4 NSLOTS)
+                    (printout OFILE 29 "XLIM" T)
+              do (SETQ CHAR (CHAR CSLOT))
+                 (SETQ CHARW (CHARW CSLOT))
+                 (SETQ CHARCL (CHARCL CSLOT))
+                 (CL:UNLESS (CHARSLOTP CSLOT THISLINE)
+                        (HELP "THISLINE RUNS OFF THE EDGE" THISLINE))
+                 (printout OFILE .I4 NSLOTS)
                  [if (IMAGEOBJP CHAR)
                      then (add NCHARS 1)
                           (printout OFILE " " .I5 CHNO ": ")
@@ -1033,12 +1044,12 @@
                                              (CHARACTER CHAR)))
                                  .FR 28 CHARW " " .I4 TX 35 CHARCL 64 CSLOT)
                           (ADD CHNO 1)
-                   elseif [AND [OR (CHARSLOTP CHAR THISLINE)
+                   elseif [AND [OR (CHARSLOTP CHAR THISLINE)
                                    (AND (NULL CHAR)
                                         (NOT (TYPE? CHARLOOKS CHARW]
                                (OR (EQ CSLOT PSP)
                                    (find CS incharslots (NEXTCHARSLOT CSLOT)
-                                      while (CHARSLOTP CS THISLINE) suchthat (EQ CSLOT CHAR]
+                                      while (CHARSLOTP CS THISLINE) suchthat (EQ CSLOT CHAR]
                      then                                    (* ; "Presumably a PREVSP")
                           (ADD NSPACES 1)
                           (printout OFILE " " .I5 CHNO ":")
@@ -1239,7 +1250,8 @@
 (DEFINEQ
 
 (FILEBYTES
-  [LAMBDA (FILE START NBYTES)                                (* ; "Edited 15-May-2024 10:44 by rmk")
+  [LAMBDA (FILE START NBYTES)                                (* ; "Edited 18-Apr-2026 09:37 by rmk")
+                                                             (* ; "Edited 15-May-2024 10:44 by rmk")
                                                              (* ; "Edited 23-Jan-2024 12:03 by rmk")
                                                              (* ; "Edited 20-Jan-2024 14:13 by rmk")
 
@@ -1255,25 +1267,31 @@
             (SETQ FILE (PCONTENTS FILE))))
     (CL:UNLESS START (SETQ START 0))
     (CL:UNLESS NBYTES (SETQ NBYTES 40))
-    (CL:WITH-OPEN-FILE (STREAM FILE :DIRECTION :INPUT)
-           (SETFILEPTR STREAM START)
-           (SETQ NBYTES (IMIN NBYTES (IDIFFERENCE (GETEOFPTR STREAM)
-                                            START)))
-           (FOR I B FROM START AS J FROM 1 TO NBYTES COLLECT (SETQ B (BIN STREAM)) 
+    (RESETLST
+        [if (STREAMP FILE)
+            then [RESETSAVE NIL `(PROGN (SETFILEPTR ,FILE ,(GETFILEPTR FILE]
+          else (RESETSAVE (SETQ FILE (OPENSTREAM FILE 'INPUT))
+                      '(PROGN (CLOSEF? OLDVALUE]
+        (SETFILEPTR FILE START)
+        (SETQ NBYTES (IMIN NBYTES (IDIFFERENCE (GETEOFPTR FILE)
+                                         START)))
+        (for I B from START as J from 1 TO NBYTES collect (SETQ B (BIN FILE)) 
 
                                           (* ;; "Do CHARACTER of the byte, since we don't know whether START respected FILE's external-format character alignment.")
 
-                                                           (LIST I B (CHARACTER B])
+                                                        (LIST I B (CHARACTER B))))])
 
 (TFILEBYTES
-  [LAMBDA (FILE START NBYTES)                                (* ; "Edited 14-Dec-2024 00:04 by rmk")
+  [LAMBDA (FILE START NBYTES FONT)                           (* ; "Edited 18-Apr-2026 09:36 by rmk")
+                                                             (* ; "Edited 11-Apr-2026 00:32 by rmk")
+                                                             (* ; "Edited 14-Dec-2024 00:04 by rmk")
                                                              (* ; "Edited 23-Nov-2024 15:41 by rmk")
                                                              (* ; "Edited 23-Sep-2024 11:40 by rmk")
-    (LET ((BYTES (FILEBYTES FILE START NBYTES)))
+    (LET [(BYTES (FILEBYTES FILE START (OR NBYTES 200]
          (TEVAL (for B in BYTES first (DSPFONT DEFAULTFONT T)
                    do (printout T .I6 (CAR B)
                              "  " .I3 (CADR B)
-                             "  " .FONT '(MODERN 8)
+                             "  " .FONT (OR FONT '(MODERN 10))
                              (SELCHARQ (CADR B)
                                   (EOL 'EOL)
                                   (LF 'LF)
@@ -1291,8 +1309,8 @@
   [LAMBDA (DY ARG)                                           (* ; "Edited  5-Nov-2024 15:29 by rmk")
     (RELMOVEW (GTW ARG)
            (create POSITION
-                  XCOORD _ 0
-                  YCOORD _ DY])
+                  XCOORD ← 0
+                  YCOORD ← DY])
 
 (TSCROLL
   [LAMBDA (DY ARG)                                           (* ; "Edited  5-Nov-2024 15:30 by rmk")
@@ -1304,7 +1322,7 @@
 
     (* ;; "Repeatedly scrolls up or down by DIST")
 
-    (bind (W _ (GTW ARG)) do (SELECTQ [ASKUSER NIL NIL NIL '((U NIL CONFIRMFLG NIL RETURN
+    (bind (W ← (GTW ARG)) do (SELECTQ [ASKUSER NIL NIL NIL '((U NIL CONFIRMFLG NIL RETURN
                                                                 'UP)
                                                              (D NIL CONFIRMFLG NIL RETURN
                                                                 'DOWN)
@@ -1363,7 +1381,7 @@
 (FIXPARALAST
   [LAMBDA (TSTREAM HELP)                                     (* ; "Edited 16-Mar-2024 10:06 by rmk")
                                                              (* ; "Edited 24-Oct-2022 21:59 by rmk")
-    (for (PC _ (\TEDIT.FIRSTPIECE (TEXTOBJ TSTREAM))) by (NEXTPIECE PC) while PC
+    (for (PC ← (\TEDIT.FIRSTPIECE (TEXTOBJ TSTREAM))) by (NEXTPIECE PC) while PC
        when (PPARALAST PC) unless (MEMB (NTHPIECECHAR PC -1)
                                         (CHARCODE (EOL CR LF)))
        do (replace (PIECE PPARALAST) of PC with NIL])
@@ -1371,7 +1389,9 @@
 (DEFINEQ
 
 (SPPRINT
-  [LAMBDA (P OSTREAM TEXTOBJ NOCR)                           (* ; "Edited 29-Jul-2025 11:42 by rmk")
+  [LAMBDA (P OSTREAM TEXTOBJ NOCR)                           (* ; "Edited  9-Apr-2026 00:07 by rmk")
+                                                             (* ; "Edited 15-Feb-2026 14:35 by rmk")
+                                                             (* ; "Edited 29-Jul-2025 11:42 by rmk")
                                                              (* ; "Edited 24-Apr-2025 16:04 by rmk")
                                                              (* ; "Edited 19-Feb-2025 12:21 by rmk")
                                                              (* ; "Edited  8-Feb-2025 22:41 by rmk")
@@ -1419,8 +1439,6 @@
              (PRINTOUT OSTREAM (SELECTC PTYPE
                                    (THINFILE.PTYPE 
                                         'Thinfile)
-                                   (FATFILE1.PTYPE 
-                                        "Fatfile1")
                                    (FATFILE2.PTYPE 
                                         'Fatfile2)
                                    (THINSTRING.PTYPE 
@@ -1462,7 +1480,7 @@
                                          CLINVISIBLE))
                            (PRIN1 "i " OSTREAM))
                     (PRIN1 "%"" OSTREAM)
-                    (for I C from 1 to PLEN
+                    (for I C from 0 to (SUB1 PLEN)
                        do (SETQ C (\TEDIT.PIECE.NTHCHARCODE P I))
                           (PRIN1 (SELCHARQ C
                                       ((EOL CR) 
@@ -1474,12 +1492,12 @@
                                       (Meta,EOL "[MLB]")
                                       (CHARACTER C))
                                  OSTREAM)
-                          (CL:WHEN (IEQP I PLEN)
+                          (CL:WHEN (IEQP I (SUB1 PLEN))
                               (PRIN1 '%" OSTREAM))
                           (CL:WHEN [AND (NOT NOCR)
                                         (MEMB C (CHARCODE (EOL CR LF FORM]
                               (TERPRI OSTREAM)
-                              (CL:UNLESS (IEQP I PLEN)
+                              (CL:UNLESS (IEQP I (SUB1 PLEN))
                                   (DSPFONT (PROG1 (DSPFONT FONT OSTREAM)
 
                                                (* ;; "Add1 for %"")
@@ -1624,10 +1642,10 @@
 
     (* ;; "Produces a chain of copies of the pieces in PIECES from I to J. The pieces are chained in both directions so a copy can be copied or shortened.")
 
-    (for PC NEWPC [LASTPC _ (NTHPIECE PIECES (IMIN (NPIECES PIECES)
+    (for PC NEWPC [LASTPC ← (NTHPIECE PIECES (IMIN (NPIECES PIECES)
                                                    (OR J (NPIECES PIECES]
        inpieces (NTHPIECE PIECES (IMAX 1 (OR I 1)))
-       do (SETQ NEWPC (create PIECE using PC PREVPIECE _ NEWPC)) repeatuntil (EQ PC LASTPC)
+       do (SETQ NEWPC (create PIECE using PC PREVPIECE ← NEWPC)) repeatuntil (EQ PC LASTPC)
        finally (RETURN (for NPC NEXTPC backpieces NEWPC do (SETPC NPC NEXTPIECE NEXTPC)
                                                            (SETQ NEXTPC NPC)
                           finally (RETURN NPC])
@@ -1679,12 +1697,12 @@
     (CL:UNLESS N (SETQ N 7))
     (CL:UNLESS SPREAD (SETQ SPREAD 4))
     (LET ((TEXTOBJ (GTO)))
-         [for I (POS _ (CL:IF (IGREATERP SPREAD 0)
+         [for I (POS ← (CL:IF (IGREATERP SPREAD 0)
                            0
                            90)) from 1 to 3 do (TEDIT.INSERT TEXTOBJ (CONCAT I)
                                                       (add POS 4)
                                                       '(FACE BOLD]
-         [for I (POS _ 90) from (IDIFFERENCE N 3) to N do (TEDIT.INSERT TEXTOBJ (CONCAT I)
+         [for I (POS ← 90) from (IDIFFERENCE N 3) to N do (TEDIT.INSERT TEXTOBJ (CONCAT I)
                                                                  (add POS -4)
                                                                  '(FACE BOLD]
          (SP TEXTOBJ)
@@ -1703,8 +1721,8 @@
         (SETQ THISLINE (fetch (TEXTOBJ THISLINE) of (GTO THISLINE))))
     (CL:UNLESS (FIXP N)
            (SETQ N MAX.SMALLP))
-    (for (CHARSLOT _ (FIRSTCHARSLOT THISLINE))
-         (LASTSLOT _ (LASTCHARSLOT THISLINE))
+    (for (CHARSLOT ← (FIRSTCHARSLOT THISLINE))
+         (LASTSLOT ← (LASTCHARSLOT THISLINE))
          CHAR CHARW by (NEXTCHARSLOT CHARSLOT) as I from 0 to (SUB1 N) repeatuntil (EQ CHARSLOT 
                                                                                        LASTSLOT)
        do (SETQ CHAR (CHAR CHARSLOT))
@@ -2099,7 +2117,7 @@
                                                              (* ; "Edited 11-Aug-2023 08:30 by rmk")
                                                              (* ; "Edited  8-Aug-2023 22:17 by rmk")
 
-    (* ;; "Makes a copy of FILE except that each each CR is followed by the fileptr of the next byte, and and ^z and \ are also marked with the file position of the nexxt character.  This helps in decoding Bravo files.")
+    (* ;; "Makes a copy of FILE except that each each CR is followed by the fileptr of the next byte, and and ↑z and \ are also marked with the file position of the nexxt character.  This helps in decoding Bravo files.")
 
     (CL:WITH-OPEN-FILE (INSTREAM FILE :DIRECTION :INPUT)
            (STREAMPROP INSTREAM 'ENDOFSTREAMOP (FUNCTION NILL))
@@ -2155,7 +2173,7 @@
                  else (PRINTOUT OUTSTREAM "[" (GETFILEPTR INSTREAM)
                              "]")))
          (TAB (PRINTOUT OUTSTREAM "[TAB]"))
-         (^Z (BOUT OUTSTREAM (CHARCODE ^Z))                  (* ; "Comes out black")
+         (↑Z (BOUT OUTSTREAM (CHARCODE ↑Z))                  (* ; "Comes out black")
              (if SPACELINES
                  then (PRINTOUT OUTSTREAM T .I6 (GETFILEPTR INSTREAM)
                              ": " -5)
@@ -2175,7 +2193,7 @@
 
 (OLDWI
   [LAMBDA (FN)                                               (* ; "Edited 16-May-2023 12:02 by rmk")
-    (for F COMS in TEDITFILES when (AND (SETQ F (DFOV.OLDEST F))
+    (for F COMS in TEDITFILES when (AND (SETQ F (DFOV.OLDEST F))
                                         (INFILECOMS? FN NIL (GETDEF (FILECOMS F)
                                                                    'VARS F))) collect F])
 
@@ -2327,21 +2345,7 @@
                                          LCHAR1)
                           (GTO)))
          (SP LPC)
-         (SPLINES])
-
-(THC
-  [LAMBDA (TSTREAM PRINTER TYPE)                             (* ; "Edited 10-Jul-2023 23:00 by rmk")
-    (CL:UNLESS TYPE (SETQ TYPE DEFAULTPRINTERTYPE))
-    (LET ((TFILE (TXTFILE (GTO TSTREAM)))
-          HCFILE)
-         (CL:UNLESS PRINTER
-             (SETQ HCFILE (OUTFILEP (PACKFILENAME 'EXTENSION TYPE 'VERSION NIL 'NAME
-                                           (PACK* (FILENAMEFIELD TFILE 'NAME)
-                                                  'W)
-                                           'BODY TFILE))))
-         (HARDCOPY.SOMEHOW (WFROMDS (TEXTSTREAM (GTO TSTREAM)))
-                HCFILE TYPE)
-         HCFILE])
+         (SPLINES])
 )
 
 (RPAQ? LASTTTESTFILE )
@@ -2483,7 +2487,9 @@
 (DEFINEQ
 
 (TEDIT-DEBUG
-  [LAMBDA (DONTOVERLOAD)                                     (* ; "Edited  7-Feb-2026 17:00 by rmk")
+  [LAMBDA (DONTOVERLOAD)                                     (* ; "Edited 18-May-2026 10:46 by rmk")
+                                                             (* ; "Edited 24-Feb-2026 00:35 by rmk")
+                                                             (* ; "Edited  7-Feb-2026 17:00 by rmk")
                                                              (* ; "Edited  9-Aug-2024 13:20 by rmk")
                                                              (* ; "Edited 16-Jul-2024 12:37 by rmk")
                                                              (* ; "Edited  6-Jul-2024 21:16 by rmk")
@@ -2497,7 +2503,7 @@
                                                              (* ; "Edited  3-Dec-2023 21:00 by rmk")
                                                              (* ; "Edited 29-Nov-2023 10:49 by rmk")
                                                              (* ; "Edited 24-Nov-2023 12:53 by rmk")
-    (DRIBBLE "TEDIT-DEBUG.DRIBBLE")
+    (DRIBBLE (PSEUDOFILENAME "{LI}TEDIT-DEBUG.DRIBBLE"))
     (CL:WHEN (DIRECTORYNAMEP (MEDLEYDIR "../oldtedit/"))
         (PSEUDOHOST 'OT (MEDLEYDIR "../oldtedit/")))
     (FILESLOAD (NOERROR FROM LOADUPS)
@@ -2585,33 +2591,33 @@
 (ADDTOVAR LAMA )
 )
 (DECLARE%: DONTCOPY
-  (FILEMAP (NIL (5124 7683 (GTO 5134 . 5384) (GTS 5386 . 7157) (GTW 7159 . 7315) (GSEL 7317 . 7681)) (
-7716 8837 (TEST.TEMPLATE 7726 . 8835)) (8838 9773 (TESTACTION 8848 . 9771)) (9798 23613 (IPC 9808 . 
-11312) (ILINES 11314 . 13855) (ISEL 13857 . 14468) (ITS 14470 . 16194) (IPANES 16196 . 16431) (ITL 
-16433 . 16852) (IHIST 16854 . 19516) (IPCTB 19518 . 19944) (IMB 19946 . 20705) (ICL 20707 . 21408) (
-IPL 21410 . 21950) (ICARET 21952 . 22479) (INSPECTPIECES 22481 . 23611)) (23635 52650 (SP 23645 . 
-28760) (SL 28762 . 32764) (SSP 32766 . 34468) (SPF 34470 . 37000) (SLF 37002 . 46135) (SHOWLINE 46137
- . 49808) (SLL 49810 . 50557) (STBYTES 50559 . 52285) (SSEL 52287 . 52648)) (52651 65164 (STL 52661 . 
-61662) (CLEARTHISLINE 61664 . 62144) (CHARSLOTP 62146 . 63465) (\TLVALIDATE 63467 . 65162)) (65165 
-70538 (NTHPIECE 65175 . 66307) (NPIECES 66309 . 67174) (NTHPIECECHAR 67176 . 68484) (SELPIECE 68486 . 
-68928) (PIECENUM 68930 . 69649) (PCBYTES 69651 . 70536)) (70539 73013 (FILEBYTES 70549 . 71973) (
-TFILEBYTES 71975 . 73011)) (73014 74336 (TRELMOVE 73024 . 73267) (TSCROLL 73269 . 73435) (TSCROLL* 
-73437 . 74334)) (74337 77386 (TRY 74347 . 75616) (TEDITCLOSEW 75618 . 75961) (PARALASTWITHOUTEOL 75963
- . 76848) (FIXPARALAST 76850 . 77384)) (77387 92274 (SPPRINT 77397 . 84222) (SPPRINT.CHAR 84224 . 
-85208) (SPPRINT.OBJ 85210 . 88268) (SHOWPIECEBYTES 88270 . 89826) (CHECKPLENGTHS 89828 . 90285) (SBT 
-90287 . 91424) (COPYPCHAIN 91426 . 92272)) (92275 94336 (POSLINE 92285 . 94334)) (94337 95220 (
-PRESPLIT 94347 . 95218)) (95221 96934 (ALLTL 95231 . 96484) (NTHCHARSLOT 96486 . 96932)) (96960 107173
- (PLCHAIN 96970 . 97498) (PRINTLINE 97500 . 100490) (SL.GETLINES 100492 . 103785) (CHECKLINES 103787
- . 104767) (COLLECTLINES 104769 . 105021) (NTHLINE 105023 . 106028) (HEIGHT 106030 . 106318) (LINEBOTS
- 106320 . 107171)) (107174 109622 (IPC.DECODEARGS 107184 . 109620)) (109623 110216 (SPF1 109633 . 
-110214)) (110245 112623 (SLF.FATPLEN 110255 . 111114) (FILEPIECE 111116 . 112621)) (112656 113424 (
-SELTEDIT 112666 . 113422)) (113494 119106 (PPARA 113504 . 113926) (PRUN 113928 . 115404) (
-ADDLINEPOSITIONS 115406 . 116833) (SBR 116835 . 117489) (SBC 117491 . 119104)) (119163 120939 (OLDWI 
-119173 . 119548) (COMP 119550 . 119745) (DFR 119747 . 120937)) (120940 121973 (DFGV 120950 . 121476) (
-GDIRECTORIES 121478 . 121971)) (121974 128539 (TTEST 121984 . 126516) (LTEST 126518 . 127883) (THC 
-127885 . 128537)) (128853 129545 (SHOWSAFE 128863 . 129543)) (129598 130045 (MYH 129608 . 130043)) (
-130290 131385 (DFVENUE 130300 . 131179) (VSEE 131181 . 131383)) (131386 131840 (PTT 131396 . 131838)) 
-(132199 133780 (DEBUGOUTPUT.STREAM 132209 . 133778)) (133781 136256 (TEDIT-DEBUG 133791 . 136254)) (
-136257 136749 (HEXTOHILO 136267 . 136607) (CW 136609 . 136747)) (136750 138486 (TRENAME 136760 . 
-138484)))))
+  (FILEMAP (NIL (5171 7730 (GTO 5181 . 5431) (GTS 5433 . 7204) (GTW 7206 . 7362) (GSEL 7364 . 7728)) (
+7763 8884 (TEST.TEMPLATE 7773 . 8882)) (8885 9820 (TESTACTION 8895 . 9818)) (9845 24326 (IPC 9855 . 
+11359) (ILINES 11361 . 13902) (ISEL 13904 . 14515) (ITS 14517 . 16241) (IPANES 16243 . 16478) (ITL 
+16480 . 16899) (IHIST 16901 . 19563) (IPCTB 19565 . 19991) (IMB 19993 . 20752) (ICL 20754 . 21455) (
+IPL 21457 . 21997) (ICARET 21999 . 22526) (INSPECTPIECES 22528 . 23658) (INSPECTFILEPIECES 23660 . 
+24324)) (24348 53381 (SP 24358 . 29473) (SL 29475 . 33477) (SSP 33479 . 35181) (SPF 35183 . 37715) (
+SLF 37717 . 46864) (SHOWLINE 46866 . 50539) (SLL 50541 . 51288) (STBYTES 51290 . 53016) (SSEL 53018 . 
+53379)) (53382 65734 (STL 53392 . 62232) (CLEARTHISLINE 62234 . 62714) (CHARSLOTP 62716 . 64035) (
+\TLVALIDATE 64037 . 65732)) (65735 71108 (NTHPIECE 65745 . 66877) (NPIECES 66879 . 67744) (
+NTHPIECECHAR 67746 . 69054) (SELPIECE 69056 . 69498) (PIECENUM 69500 . 70219) (PCBYTES 70221 . 71106))
+ (71109 74097 (FILEBYTES 71119 . 72822) (TFILEBYTES 72824 . 74095)) (74098 75426 (TRELMOVE 74108 . 
+74355) (TSCROLL 74357 . 74523) (TSCROLL* 74525 . 75424)) (75427 78478 (TRY 75437 . 76706) (TEDITCLOSEW
+ 76708 . 77051) (PARALASTWITHOUTEOL 77053 . 77938) (FIXPARALAST 77940 . 78476)) (78479 93505 (SPPRINT 
+78489 . 85449) (SPPRINT.CHAR 85451 . 86435) (SPPRINT.OBJ 86437 . 89495) (SHOWPIECEBYTES 89497 . 91053)
+ (CHECKPLENGTHS 91055 . 91512) (SBT 91514 . 92651) (COPYPCHAIN 92653 . 93503)) (93506 95567 (POSLINE 
+93516 . 95565)) (95568 96455 (PRESPLIT 95578 . 96453)) (96456 98173 (ALLTL 96466 . 97723) (NTHCHARSLOT
+ 97725 . 98171)) (98199 108412 (PLCHAIN 98209 . 98737) (PRINTLINE 98739 . 101729) (SL.GETLINES 101731
+ . 105024) (CHECKLINES 105026 . 106006) (COLLECTLINES 106008 . 106260) (NTHLINE 106262 . 107267) (
+HEIGHT 107269 . 107557) (LINEBOTS 107559 . 108410)) (108413 110861 (IPC.DECODEARGS 108423 . 110859)) (
+110862 111455 (SPF1 110872 . 111453)) (111484 113862 (SLF.FATPLEN 111494 . 112353) (FILEPIECE 112355
+ . 113860)) (113895 114663 (SELTEDIT 113905 . 114661)) (114733 120351 (PPARA 114743 . 115165) (PRUN 
+115167 . 116643) (ADDLINEPOSITIONS 116645 . 118074) (SBR 118076 . 118730) (SBC 118732 . 120349)) (
+120408 122180 (OLDWI 120418 . 120789) (COMP 120791 . 120986) (DFR 120988 . 122178)) (122181 123214 (
+DFGV 122191 . 122717) (GDIRECTORIES 122719 . 123212)) (123215 129122 (TTEST 123225 . 127757) (LTEST 
+127759 . 129120)) (129436 130128 (SHOWSAFE 129446 . 130126)) (130181 130628 (MYH 130191 . 130626)) (
+130873 131968 (DFVENUE 130883 . 131762) (VSEE 131764 . 131966)) (131969 132423 (PTT 131979 . 132421)) 
+(132782 134363 (DEBUGOUTPUT.STREAM 132792 . 134361)) (134364 137078 (TEDIT-DEBUG 134374 . 137076)) (
+137079 137571 (HEXTOHILO 137089 . 137429) (CW 137431 . 137569)) (137572 139308 (TRENAME 137582 . 
+139306)))))
 STOP
diff --git a/internal/TEDIT-DEBUG.LCOM b/internal/TEDIT-DEBUG.LCOM
index 7b7aa101..a25a21eb 100644
Binary files a/internal/TEDIT-DEBUG.LCOM and b/internal/TEDIT-DEBUG.LCOM differ
diff --git a/library/tedit/TEDIT-FILE b/library/tedit/TEDIT-FILE
index 2975aeba..f295a5f5 100644
--- a/library/tedit/TEDIT-FILE
+++ b/library/tedit/TEDIT-FILE
@@ -1,12 +1,12 @@
 (DEFINE-FILE-INFO :PACKAGE "INTERLISP" :READTABLE "INTERLISP" :BASE 10)
 
-(FILECREATED "29-Apr-2026 23:49:14" {MEDLEY}<library>tedit>TEDIT-FILE.;684 174888 
+(FILECREATED "10-May-2026 20:54:51" {MEDLEY}<library>TEDIT>TEDIT-FILE.;685 174952 
 
       :EDIT-BY rmk
 
-      :CHANGES-TO (FNS \TEDIT.INTERPRET.MCCS.SHIFTS)
+      :CHANGES-TO (FNS \TEDIT.GET.FORMATTED.FILE)
 
-      :PREVIOUS-DATE "24-Apr-2026 21:09:13" {MEDLEY}<library>tedit>TEDIT-FILE.;683)
+      :PREVIOUS-DATE "29-Apr-2026 23:49:14" {MEDLEY}<library>TEDIT>TEDIT-FILE.;684)
 
 
 (PRETTYCOMPRINT TEDIT-FILECOMS)
@@ -707,7 +707,8 @@
              (\TEDIT.INSERTPIECES PIECES NIL TEXTOBJ)))])
 
 (\TEDIT.GET.FORMATTED.FILE
-  [LAMBDA (TEXT TSTREAM START END PROPS)                     (* ; "Edited 25-Sep-2025 21:27 by rmk")
+  [LAMBDA (TEXT TSTREAM START END PROPS)                     (* ; "Edited 10-May-2026 20:54 by rmk")
+                                                             (* ; "Edited 25-Sep-2025 21:27 by rmk")
                                                              (* ; "Edited  9-Sep-2025 21:45 by rmk")
                                                              (* ; "Edited  7-Sep-2025 12:14 by rmk")
                                                              (* ; "Edited 28-Mar-2025 14:15 by rmk")
@@ -744,8 +745,7 @@
                                                    "Version 1;  obsoleted at INTERMEZZO release 2/85")
                     (\TEDIT.GET.PCTB1 TEXT TSTREAM PCCOUNT START END))
                  (0                                          (* ; "VERSION 0")
-                    (\TEDIT.GET.PCTB0 TEXT TSTREAM (CADR PCCOUNT)
-                           PCCOUNT START END))
+                    (\TEDIT.GET.PCTB0 TEXT TSTREAM PCCOUNT START END))
                  (\TEDIT.THELP "File format version incompatible with this version of TEdit."))
              (CL:WHEN (SETQ PC (\TEDIT.LASTPIECE TEXTOBJ))
                     (FSETPC PC PPARALAST T))
@@ -2706,29 +2706,29 @@
 
 (RPAQ? *TEDIT-FILE-READTABLE* (COPYREADTABLE \ORIGREADTABLE))
 (DECLARE%: DONTCOPY
-  (FILEMAP (NIL (5384 35643 (TEDIT.GET 5394 . 11804) (TEDIT.FORMATTEDFILEP 11806 . 13122) (
-TEDIT.FILEDATE 13124 . 14433) (TEDIT.INCLUDE 14435 . 22464) (TEDIT.RAW.INCLUDE 22466 . 23274) (
-TEDIT.PUT 23276 . 31632) (TEDIT.PUT.STREAM 31634 . 35641)) (35644 56951 (\TEDIT.GET.FOREIGN.FILE 35654
- . 39079) (\TEDIT.GET.UNFORMATTED.FILE 39081 . 43420) (\TEDIT.GET.FORMATTED.FILE 43422 . 47065) (
-\TEDIT.FORMATTEDSTREAMP 47067 . 50198) (\ARBIN 50200 . 50920) (\ATMIN 50922 . 51459) (\DWIN 51461 . 
-51840) (\STRINGIN 51842 . 52550) (\TEDIT.GET.TRAILER 52552 . 55420) (\TEDIT.CACHEFILE 55422 . 56949)) 
-(57117 73044 (\TEDIT.GET.PIECES3 57127 . 68176) (\TEDIT.GET.PROPS3 68178 . 71400) (
-\TEDIT.MAKE.STRINGPIECE 71402 . 73042)) (73045 85841 (\TEDIT.GET.UNFORMATTED.FILE.MCCS 73055 . 78706) 
-(\TEDIT.INTERPRET.MCCS.SHIFTS 78708 . 84304) (\TEDIT.CONVERT.XCCSTOMCCS 84306 . 85238) (
-\TEDIT.RUN.TO.STRINGPIECE 85240 . 85839)) (85863 92124 (\TEDIT.GET.UNFORMATTED.FILE.UTF8 85873 . 92122
-)) (92147 103665 (\TEDIT.GET.CHARLOOKS.LIST 92157 . 92888) (\TEDIT.GET.SINGLE.CHARLOOKS 92890 . 99962)
- (\TEDIT.GET.CHARLOOKS 99964 . 101520) (\TEDIT.GET.PARALOOKS.INDEX 101522 . 102066) (
-\TEDIT.GET.CHARLOOKS.INDEX 102068 . 103663)) (103666 111323 (\TEDIT.GET.PARALOOKS.LIST 103676 . 104298
-) (\TEDIT.GET.SINGLE.PARALOOKS 104300 . 111321)) (111324 115266 (\TEDIT.GET.OBJECT 111334 . 115264)) (
-115331 150489 (\TEDIT.PUT.PCTB 115341 . 125667) (\TEDIT.PUT.PCTB.PIECEDATA 125669 . 128826) (
-\TEDIT.PUT.TRAILER 128828 . 130156) (\TEDIT.PUT.PCTB.MERGEABLE 130158 . 134019) (
-\TEDIT.PUT.UTF8.SPLITPIECES 134021 . 138597) (\TEDIT.PUT.MCCS.SPLITPIECES 138599 . 140177) (
-\TEDIT.PUT.PCTB.NEXTNEW 140179 . 144920) (\TEDIT.INSERT.NEWPIECES 144922 . 148087) (\TEDIT.PUTRESET 
-148089 . 148331) (\ARBOUT 148333 . 149057) (\ATMOUT 149059 . 149664) (\DWOUT 149666 . 149945) (
-\STRINGOUT 149947 . 150487)) (150490 163441 (\TEDIT.PUT.CHARLOOKS.LIST 150500 . 152172) (
-\TEDIT.PUT.SINGLE.CHARLOOKS 152174 . 158454) (\TEDIT.PUT.CHARLOOKS 158456 . 159903) (
-\TEDIT.PUT.CHARLOOKS1 159905 . 160956) (\TEDIT.PUT.OBJECT 160958 . 163439)) (163442 171081 (
-\TEDIT.PUT.PARALOOKS.LIST 163452 . 164354) (\TEDIT.PUT.SINGLE.PARALOOKS 164356 . 169940) (
-\TEDIT.PUT.PARALOOKS 169942 . 171079)) (171176 174581 (TEDITFROMLISPSOURCE 171186 . 173830) (
-SHELLSCRIPTP 173832 . 174061) (TEDITFROMSHELLSCRIPT 174063 . 174579)))))
+  (FILEMAP (NIL (5381 35640 (TEDIT.GET 5391 . 11801) (TEDIT.FORMATTEDFILEP 11803 . 13119) (
+TEDIT.FILEDATE 13121 . 14430) (TEDIT.INCLUDE 14432 . 22461) (TEDIT.RAW.INCLUDE 22463 . 23271) (
+TEDIT.PUT 23273 . 31629) (TEDIT.PUT.STREAM 31631 . 35638)) (35641 57015 (\TEDIT.GET.FOREIGN.FILE 35651
+ . 39076) (\TEDIT.GET.UNFORMATTED.FILE 39078 . 43417) (\TEDIT.GET.FORMATTED.FILE 43419 . 47129) (
+\TEDIT.FORMATTEDSTREAMP 47131 . 50262) (\ARBIN 50264 . 50984) (\ATMIN 50986 . 51523) (\DWIN 51525 . 
+51904) (\STRINGIN 51906 . 52614) (\TEDIT.GET.TRAILER 52616 . 55484) (\TEDIT.CACHEFILE 55486 . 57013)) 
+(57181 73108 (\TEDIT.GET.PIECES3 57191 . 68240) (\TEDIT.GET.PROPS3 68242 . 71464) (
+\TEDIT.MAKE.STRINGPIECE 71466 . 73106)) (73109 85905 (\TEDIT.GET.UNFORMATTED.FILE.MCCS 73119 . 78770) 
+(\TEDIT.INTERPRET.MCCS.SHIFTS 78772 . 84368) (\TEDIT.CONVERT.XCCSTOMCCS 84370 . 85302) (
+\TEDIT.RUN.TO.STRINGPIECE 85304 . 85903)) (85927 92188 (\TEDIT.GET.UNFORMATTED.FILE.UTF8 85937 . 92186
+)) (92211 103729 (\TEDIT.GET.CHARLOOKS.LIST 92221 . 92952) (\TEDIT.GET.SINGLE.CHARLOOKS 92954 . 100026
+) (\TEDIT.GET.CHARLOOKS 100028 . 101584) (\TEDIT.GET.PARALOOKS.INDEX 101586 . 102130) (
+\TEDIT.GET.CHARLOOKS.INDEX 102132 . 103727)) (103730 111387 (\TEDIT.GET.PARALOOKS.LIST 103740 . 104362
+) (\TEDIT.GET.SINGLE.PARALOOKS 104364 . 111385)) (111388 115330 (\TEDIT.GET.OBJECT 111398 . 115328)) (
+115395 150553 (\TEDIT.PUT.PCTB 115405 . 125731) (\TEDIT.PUT.PCTB.PIECEDATA 125733 . 128890) (
+\TEDIT.PUT.TRAILER 128892 . 130220) (\TEDIT.PUT.PCTB.MERGEABLE 130222 . 134083) (
+\TEDIT.PUT.UTF8.SPLITPIECES 134085 . 138661) (\TEDIT.PUT.MCCS.SPLITPIECES 138663 . 140241) (
+\TEDIT.PUT.PCTB.NEXTNEW 140243 . 144984) (\TEDIT.INSERT.NEWPIECES 144986 . 148151) (\TEDIT.PUTRESET 
+148153 . 148395) (\ARBOUT 148397 . 149121) (\ATMOUT 149123 . 149728) (\DWOUT 149730 . 150009) (
+\STRINGOUT 150011 . 150551)) (150554 163505 (\TEDIT.PUT.CHARLOOKS.LIST 150564 . 152236) (
+\TEDIT.PUT.SINGLE.CHARLOOKS 152238 . 158518) (\TEDIT.PUT.CHARLOOKS 158520 . 159967) (
+\TEDIT.PUT.CHARLOOKS1 159969 . 161020) (\TEDIT.PUT.OBJECT 161022 . 163503)) (163506 171145 (
+\TEDIT.PUT.PARALOOKS.LIST 163516 . 164418) (\TEDIT.PUT.SINGLE.PARALOOKS 164420 . 170004) (
+\TEDIT.PUT.PARALOOKS 170006 . 171143)) (171240 174645 (TEDITFROMLISPSOURCE 171250 . 173894) (
+SHELLSCRIPTP 173896 . 174125) (TEDITFROMSHELLSCRIPT 174127 . 174643)))))
 STOP
diff --git a/library/tedit/TEDIT-FILE.LCOM b/library/tedit/TEDIT-FILE.LCOM
index 276477d1..2617d000 100644
Binary files a/library/tedit/TEDIT-FILE.LCOM and b/library/tedit/TEDIT-FILE.LCOM differ
diff --git a/library/tedit/TEDIT-FNKEYS b/library/tedit/TEDIT-FNKEYS
index d4a6abf3..107b533a 100644
--- a/library/tedit/TEDIT-FNKEYS
+++ b/library/tedit/TEDIT-FNKEYS
@@ -1,12 +1,12 @@
-(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
+(DEFINE-FILE-INFO :PACKAGE "INTERLISP" :READTABLE "INTERLISP" :BASE 10)
 
-(FILECREATED " 8-Feb-2026 19:54:41" {WMEDLEY}<library>tedit>TEDIT-FNKEYS.;318 109228 
+(FILECREATED "16-May-2026 22:20:12" {MEDLEY}<library>TEDIT>TEDIT-FNKEYS.;319 109301 
 
       :EDIT-BY rmk
 
-      :CHANGES-TO (VARS TEDIT.BASIC.CHARBINDINGS ORIG.TEDIT.CHARACTIONS)
+      :CHANGES-TO (FNS TEDIT.SETSYNTAX)
 
-      :PREVIOUS-DATE "24-Nov-2025 08:40:56" {WMEDLEY}<library>tedit>TEDIT-FNKEYS.;317)
+      :PREVIOUS-DATE " 8-Feb-2026 19:54:41" {MEDLEY}<library>TEDIT>TEDIT-FNKEYS.;318)
 
 
 (PRETTYCOMPRINT TEDIT-FNKEYSCOMS)
@@ -1354,7 +1354,8 @@
         'FN])
 
 (TEDIT.SETSYNTAX
-  [LAMBDA (CHAR CLASS RDTBL)                                 (* ; "Edited 12-Nov-2025 14:44 by rmk")
+  [LAMBDA (CHAR CLASS RDTBL)                                 (* ; "Edited 16-May-2026 22:19 by rmk")
+                                                             (* ; "Edited 12-Nov-2025 14:44 by rmk")
                                                              (* ; "Edited 13-Mar-2025 21:52 by rmk")
                                                              (* ; "Edited 24-Dec-2023 09:17 by rmk")
                                                              (* ; "Edited 31-Mar-87 10:00 by jds")
@@ -1374,7 +1375,7 @@
     (PROG1 (TEDIT.GETSYNTAX CHAR RDTBL)
         (\SETSYNCODE (fetch READSA of RDTBL)
                CHAR
-               (OR (CADR (ASSOC CLASS \TEDIT.TTCCODES))
+               (OR (CDR (ASSOC CLASS \TEDIT.TTCCODES))
                    (\TEDIT.TTC NONE))))])
 
 (TEDIT.GETFUNCTION
@@ -1989,30 +1990,30 @@
 (RPAQ TEDIT.WORDBOUND.READTABLE (\TEDIT.WORDBOUND.READTABLE))
 )
 (DECLARE%: DONTCOPY
-  (FILEMAP (NIL (5054 23319 (TEDIT.INSTALL.CHARBINDINGS 5064 . 7915) (TEDIT.CLEAR.CHARBINDINGS 7917 . 
-10937) (TEDIT.GET.CHARACTION 10939 . 13720) (TEDIT.GET.CHARBINDING 13722 . 15899) (
-TEDIT.GET.ALL.CHARBINDINGS 15901 . 18400) (TEDIT.CHARBINDINGS.INVERT 18402 . 19681) (
-TEDIT.GET.ALL.CHARACTIONS 19683 . 22005) (TEDIT.CONFLICTING.CHARBINDINGS 22007 . 23317)) (23379 33434 
-(\TEDIT.KEY.CHARLOOKS 23389 . 24581) (\TEDIT.KEY.QUAD 24583 . 26676) (\TEDIT.DEFAULTSSEL 26678 . 27289
-) (\TEDIT.SETDEFAULT.FROM.SEL 27291 . 27968) (\TEDIT.KEY.SIZE 27970 . 29166) (\TEDIT.SUBSCRIPTSEL 
-29168 . 29371) (\TEDIT.SUPERSCRIPTSEL 29373 . 29577) (\TEDIT.KEY.TRANSFORM 29579 . 31576) (
-\TEDIT.KEY.OPENLINE 31578 . 32032) (\TEDIT.KEY.FAMILYN 32034 . 33432)) (33435 33724 (CAP-CASECODE 
-33445 . 33722)) (33758 37190 (\TEDIT.SHOWCARETLOOKS 33768 . 36283) (\TEDIT.DESCRIBEFONT 36285 . 37188)
-) (37221 52194 (\TEDIT.ONECHAR.BACKWARD 37231 . 38378) (\TEDIT.ONECHAR.FORWARD 38380 . 39616) (
-\TEDIT.ONELINE.UP 39618 . 42579) (\TEDIT.ONELINE.DOWN 42581 . 44238) (\TEDIT.ONELINE.MOVE 44240 . 
-46527) (\TEDIT.ONEWORD.BACKWARD 46529 . 47717) (\TEDIT.ONEWORD.FORWARD 47719 . 48906) (
-\TEDIT.LINE.BEGIN 48908 . 49987) (\TEDIT.LINE.END 49989 . 51226) (\TEDIT.DOCUMENT.BEGIN 51228 . 51587)
- (\TEDIT.DOCUMENT.END 51589 . 52192)) (52195 55503 (\TEDIT.LINEDELETE.FORWARD 52205 . 53314) (
-\TEDIT.LINEDELETE.BACKWARD 53316 . 54455) (\TEDIT.LINEDELETE 54457 . 55501)) (55504 58032 (
-\TEDIT.KEY.NEST 55514 . 58030)) (58033 59315 (\TEDIT.KEY.WRAP 58043 . 59313)) (59406 67454 (
-\TEDIT.KEY.FIND 59416 . 64594) (\TEDIT.KEY.FIND.SEARCHSTRING 64596 . 65736) (\TEDIT.GET.TARGET.STRING 
-65738 . 67452)) (67485 70117 (\TEDIT.KEY.SUBSTITUTE 67495 . 67716) (\TEDIT.MANPAGE 67718 . 68965) (
-\TEDIT.CALL.ED 68967 . 69797) (\TEDIT.SELECT.ALL 69799 . 70115)) (70144 75834 (\TEDIT.CLIPBOARD 70154
- . 71909) (\TEDIT.COPYTOCLIPBOARD 71911 . 72691) (\TEDIT.EXTRACTTOCLIPBOARD 72693 . 72888) (
-\TEDIT.WRITE.SEL 72890 . 75832)) (76000 88507 (\TEDIT.READTABLE 76010 . 76946) (
-\TEDIT.WORDBOUND.READTABLE 76948 . 79996) (TEDIT.GETSYNTAX 79998 . 81227) (TEDIT.SETSYNTAX 81229 . 
-82543) (TEDIT.GETFUNCTION 82545 . 84018) (TEDIT.SETFUNCTION 84020 . 86176) (TEDIT.WORDGET 86178 . 
-86439) (TEDIT.WORDSET 86441 . 87181) (TEDIT.ATOMBOUND.READTABLE 87183 . 88505)) (88608 95596 (
-TEDIT.BUTTONS.BUILD 88618 . 93864) (TEDIT.BUTTONBITMAP.FILL 93866 . 95594)) (98061 98649 (
-\TEDIT.TTCCLASS 98071 . 98647)))))
+  (FILEMAP (NIL (5019 23284 (TEDIT.INSTALL.CHARBINDINGS 5029 . 7880) (TEDIT.CLEAR.CHARBINDINGS 7882 . 
+10902) (TEDIT.GET.CHARACTION 10904 . 13685) (TEDIT.GET.CHARBINDING 13687 . 15864) (
+TEDIT.GET.ALL.CHARBINDINGS 15866 . 18365) (TEDIT.CHARBINDINGS.INVERT 18367 . 19646) (
+TEDIT.GET.ALL.CHARACTIONS 19648 . 21970) (TEDIT.CONFLICTING.CHARBINDINGS 21972 . 23282)) (23344 33399 
+(\TEDIT.KEY.CHARLOOKS 23354 . 24546) (\TEDIT.KEY.QUAD 24548 . 26641) (\TEDIT.DEFAULTSSEL 26643 . 27254
+) (\TEDIT.SETDEFAULT.FROM.SEL 27256 . 27933) (\TEDIT.KEY.SIZE 27935 . 29131) (\TEDIT.SUBSCRIPTSEL 
+29133 . 29336) (\TEDIT.SUPERSCRIPTSEL 29338 . 29542) (\TEDIT.KEY.TRANSFORM 29544 . 31541) (
+\TEDIT.KEY.OPENLINE 31543 . 31997) (\TEDIT.KEY.FAMILYN 31999 . 33397)) (33400 33689 (CAP-CASECODE 
+33410 . 33687)) (33723 37155 (\TEDIT.SHOWCARETLOOKS 33733 . 36248) (\TEDIT.DESCRIBEFONT 36250 . 37153)
+) (37186 52159 (\TEDIT.ONECHAR.BACKWARD 37196 . 38343) (\TEDIT.ONECHAR.FORWARD 38345 . 39581) (
+\TEDIT.ONELINE.UP 39583 . 42544) (\TEDIT.ONELINE.DOWN 42546 . 44203) (\TEDIT.ONELINE.MOVE 44205 . 
+46492) (\TEDIT.ONEWORD.BACKWARD 46494 . 47682) (\TEDIT.ONEWORD.FORWARD 47684 . 48871) (
+\TEDIT.LINE.BEGIN 48873 . 49952) (\TEDIT.LINE.END 49954 . 51191) (\TEDIT.DOCUMENT.BEGIN 51193 . 51552)
+ (\TEDIT.DOCUMENT.END 51554 . 52157)) (52160 55468 (\TEDIT.LINEDELETE.FORWARD 52170 . 53279) (
+\TEDIT.LINEDELETE.BACKWARD 53281 . 54420) (\TEDIT.LINEDELETE 54422 . 55466)) (55469 57997 (
+\TEDIT.KEY.NEST 55479 . 57995)) (57998 59280 (\TEDIT.KEY.WRAP 58008 . 59278)) (59371 67419 (
+\TEDIT.KEY.FIND 59381 . 64559) (\TEDIT.KEY.FIND.SEARCHSTRING 64561 . 65701) (\TEDIT.GET.TARGET.STRING 
+65703 . 67417)) (67450 70082 (\TEDIT.KEY.SUBSTITUTE 67460 . 67681) (\TEDIT.MANPAGE 67683 . 68930) (
+\TEDIT.CALL.ED 68932 . 69762) (\TEDIT.SELECT.ALL 69764 . 70080)) (70109 75799 (\TEDIT.CLIPBOARD 70119
+ . 71874) (\TEDIT.COPYTOCLIPBOARD 71876 . 72656) (\TEDIT.EXTRACTTOCLIPBOARD 72658 . 72853) (
+\TEDIT.WRITE.SEL 72855 . 75797)) (75965 88580 (\TEDIT.READTABLE 75975 . 76911) (
+\TEDIT.WORDBOUND.READTABLE 76913 . 79961) (TEDIT.GETSYNTAX 79963 . 81192) (TEDIT.SETSYNTAX 81194 . 
+82616) (TEDIT.GETFUNCTION 82618 . 84091) (TEDIT.SETFUNCTION 84093 . 86249) (TEDIT.WORDGET 86251 . 
+86512) (TEDIT.WORDSET 86514 . 87254) (TEDIT.ATOMBOUND.READTABLE 87256 . 88578)) (88681 95669 (
+TEDIT.BUTTONS.BUILD 88691 . 93937) (TEDIT.BUTTONBITMAP.FILL 93939 . 95667)) (98134 98722 (
+\TEDIT.TTCCLASS 98144 . 98720)))))
 STOP
diff --git a/library/tedit/TEDIT-FNKEYS.LCOM b/library/tedit/TEDIT-FNKEYS.LCOM
index e2989380..257e0202 100644
Binary files a/library/tedit/TEDIT-FNKEYS.LCOM and b/library/tedit/TEDIT-FNKEYS.LCOM differ
diff --git a/library/tedit/TEDIT-HCPY b/library/tedit/TEDIT-HCPY
index 1dafbeaa..94712221 100644
--- a/library/tedit/TEDIT-HCPY
+++ b/library/tedit/TEDIT-HCPY
@@ -1,12 +1,12 @@
-(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
+(DEFINE-FILE-INFO :PACKAGE "INTERLISP" :READTABLE "INTERLISP" :BASE 10)
 
-(FILECREATED "15-Jan-2026 11:08:15" {WMEDLEY}<library>tedit>TEDIT-HCPY.;196 32421  
+(FILECREATED "16-May-2026 09:39:37" {MEDLEY}<library>TEDIT>TEDIT-HCPY.;197 32446  
 
       :EDIT-BY rmk
 
-      :CHANGES-TO (FNS TEDIT.IMAGEFILE.MESSAGE TEDIT.FORMAT.HARDCOPY)
+      :CHANGES-TO (FNS TEDIT-BOOK)
 
-      :PREVIOUS-DATE "24-Dec-2025 11:16:22" {WMEDLEY}<library>tedit>TEDIT-HCPY.;194)
+      :PREVIOUS-DATE "15-Jan-2026 11:08:15" {MEDLEY}<library>TEDIT>TEDIT-HCPY.;196)
 
 
 (PRETTYCOMPRINT TEDIT-HCPYCOMS)
@@ -508,25 +508,26 @@
 (DEFINEQ
 
 (TEDIT-BOOK
-  [LAMBDA (FILES DIRECTORY PRINT-FILE DONT-SEND)             (* ; "Edited 22-Mar-93 23:55 by jds")
+  [LAMBDA (FILES DIRECTORY IMAGEFILE IMAGETYPE)              (* ; "Edited 16-May-2026 09:39 by rmk")
+                                                             (* ; "Edited 22-Mar-93 23:55 by jds")
     (LET ((DOC (OPENTEXTSTREAM (MKATOM (CAR FILES))
                       NIL)))
 
          (* ;; "Gather all the files into one document:")
 
-         (for FILE in (CDR FILES) do (TEDIT.SETSEL DOC 1 (fetch (TEXTOBJ TEXTLEN) of (TEXTOBJ DOC))
-                                            'RIGHT NIL NIL)
-                                     (TEDIT.INCLUDE DOC (PACK* (OR DIRECTORY "")
-                                                               FILE)))
+         (for FILE in (CDR FILES) do (TEDIT.SETSEL DOC 1 (TEDIT.NCHARS DOC)
+                                            'RIGHT)
+                                     (TEDIT.INCLUDE DOC (PACKFILENAME 'BODY FILE 'DIRECTORY DIRECTORY
+                                                               )))
                                                              (* ; "Set page layout")
-         (TEDIT.FORMAT.HARDCOPY DOC PRINT-FILE DONT-SEND NIL NIL NIL NIL NIL)
+         (TEDIT.TO.IMAGEFILE DOC IMAGEFILE IMAGETYPE)
          (CLOSEF DOC])
 )
 (DECLARE%: DONTCOPY
-  (FILEMAP (NIL (2727 29208 (TEDIT.HARDCOPY 2737 . 3995) (TEDIT.FORMAT.HARDCOPY 3997 . 7234) (
-TEDIT.IMAGEFILE.MESSAGE 7236 . 8533) (\TEDIT.PRINT.MENU 8535 . 10938) (\TEDIT.HARDCOPY.DISPLAYLINE 
-10940 . 20163) (\TEDIT.HARDCOPY.FORMATLINE.HEADINGS 20165 . 21894) (\TEDIT.HARDCOPY.MODIFYLOOKS 21896
- . 24077) (\TEDIT.HCPYFMTSPEC 24079 . 27537) (\TEDIT.INTEGER.IMAGEBOX 27539 . 28210) (
-\TEDIT.DISPLAY.DIACRITIC 28212 . 29206)) (29283 30113 (\TEDIT.SCALEREGION 29293 . 30111)) (30405 30978
- (\TEDIT.HARDCOPYFILEFN 30415 . 30976)) (31597 32398 (TEDIT-BOOK 31607 . 32396)))))
+  (FILEMAP (NIL (2690 29171 (TEDIT.HARDCOPY 2700 . 3958) (TEDIT.FORMAT.HARDCOPY 3960 . 7197) (
+TEDIT.IMAGEFILE.MESSAGE 7199 . 8496) (\TEDIT.PRINT.MENU 8498 . 10901) (\TEDIT.HARDCOPY.DISPLAYLINE 
+10903 . 20126) (\TEDIT.HARDCOPY.FORMATLINE.HEADINGS 20128 . 21857) (\TEDIT.HARDCOPY.MODIFYLOOKS 21859
+ . 24040) (\TEDIT.HCPYFMTSPEC 24042 . 27500) (\TEDIT.INTEGER.IMAGEBOX 27502 . 28173) (
+\TEDIT.DISPLAY.DIACRITIC 28175 . 29169)) (29246 30076 (\TEDIT.SCALEREGION 29256 . 30074)) (30368 30941
+ (\TEDIT.HARDCOPYFILEFN 30378 . 30939)) (31560 32423 (TEDIT-BOOK 31570 . 32421)))))
 STOP
diff --git a/library/tedit/TEDIT-HCPY.LCOM b/library/tedit/TEDIT-HCPY.LCOM
index 6455505d..21a2922b 100644
Binary files a/library/tedit/TEDIT-HCPY.LCOM and b/library/tedit/TEDIT-HCPY.LCOM differ
diff --git a/library/tedit/TEDIT-MENU b/library/tedit/TEDIT-MENU
index 931fc43b..95745c31 100644
--- a/library/tedit/TEDIT-MENU
+++ b/library/tedit/TEDIT-MENU
@@ -1,12 +1,12 @@
 (DEFINE-FILE-INFO :PACKAGE "INTERLISP" :READTABLE "INTERLISP" :BASE 10)
 
-(FILECREATED "29-Apr-2026 15:35:33" {MEDLEY}<library>TEDIT>TEDIT-MENU.;512 183159 
+(FILECREATED "10-May-2026 17:15:14" {MEDLEY}<library>tedit>TEDIT-MENU.;513 183190 
 
       :EDIT-BY rmk
 
-      :CHANGES-TO (FNS \TEDIT.SHOW.PAGELOOKS)
+      :CHANGES-TO (FNS \TEDIT.MENU.START)
 
-      :PREVIOUS-DATE " 9-Feb-2026 09:10:43" {MEDLEY}<library>TEDIT>TEDIT-MENU.;510)
+      :PREVIOUS-DATE "29-Apr-2026 15:35:33" {MEDLEY}<library>tedit>TEDIT-MENU.;512)
 
 
 (PRETTYCOMPRINT TEDIT-MENUCOMS)
@@ -1161,7 +1161,8 @@
            TSTREAM])
 
 (\TEDIT.MENU.START
-  [LAMBDA (MENUSTREAM TSTREAM TITLE HEIGHT TYPE)             (* ; "Edited 14-Mar-2025 16:13 by rmk")
+  [LAMBDA (MENUSTREAM TSTREAM TITLE HEIGHT TYPE)             (* ; "Edited 10-May-2026 17:12 by rmk")
+                                                             (* ; "Edited 14-Mar-2025 16:13 by rmk")
                                                              (* ; "Edited 28-Jun-2024 23:08 by rmk")
                                                              (* ; "Edited 19-Apr-2024 10:53 by rmk")
                                                              (* ; "Edited 10-Apr-2024 23:04 by rmk")
@@ -1195,7 +1196,6 @@
                                          WIDTH _ (fetch (REGION WIDTH) of WREG)
                                          HEIGHT _ (OR HEIGHT 133))
                                 TITLE))
-             (WINDOWADDPROP MENUW 'CLOSEFN (FUNCTION FREEATTACHEDWINDOW))
              (WINDOWPROP MENUW 'TEDITMENU (OR TITLE "TEdit Menu"))
                                                              (* ; "Mark this as a TEDIT MENU window")
              (ATTACHWINDOW MENUW MAINWINDOW 'TOP 'JUSTIFY 'LOCALCLOSE)
@@ -2899,32 +2899,32 @@
 (ADDTOVAR LAMA )
 )
 (DECLARE%: DONTCOPY
-  (FILEMAP (NIL (4933 16571 (TEDIT.ADD.MENUITEM 4943 . 7060) (TEDIT.DEFAULT.MENUFN 7062 . 13783) (
-TEDIT.REMOVE.MENUITEM 13785 . 14782) (\TEDIT.CREATEMENU 14784 . 15349) (\TEDIT.MENU.WHENHELDFN 15351
- . 16256) (\TEDIT.MENU.WHENSELECTEDFN 16258 . 16569)) (17385 65420 (DRAWMARGINSCALE 17395 . 20854) (
-MARGINBAR 20856 . 27981) (MARGINBAR.CREATE 27983 . 32181) (MB.MARGINBAR.BUTTONEVENTINFN 32183 . 39985)
- (MB.MARGINBAR.SELFN.TABS 39987 . 45227) (MB.MARGINBAR.SELFN.TABS.KIND 45229 . 46164) (
-MARGINBAR.GETSTATEFN 46166 . 50153) (MARGINBAR.SETSTATEFN 50155 . 50365) (MARGINBAR.NEUTRALIZE 50367
- . 51042) (MARGINBAR.LOOKS 51044 . 54150) (MB.MARGINBAR.SIZEFN 54152 . 54938) (MB.MARGINBAR.DISPLAYFN 
-54940 . 58001) (MDESCALE 58003 . 58543) (MSCALE 58545 . 58875) (MB.MARGINBAR.SHOWTAB 58877 . 61200) (
-MB.MARGINBAR.TABTRACK 61202 . 62587) (MARGINBAR.INIT 62589 . 63982) (\TEDIT.PARALOOKS.TO.MARBAR 63984
- . 65418)) (66245 73527 (TEDIT.MENUSTREAM 66255 . 67255) (TEDITMENUP 67257 . 68226) (\TEDIT.MENU.START
- 68228 . 72575) (\TEDIT.MENU.OPEN? 72577 . 72951) (\TEDIT.MENU.BUTTONEVENTFN 72953 . 73525)) (73846 
-81897 (\TEDIT.MENU.CREATE 73856 . 75796) (\TEDIT.MENU.PARSE 75798 . 79487) (\TEDIT.MENU.NEUTRALIZE 
-79489 . 81560) (\TEDITMENU.RECORD.UNFORMATTED 81562 . 81895)) (81963 101365 (
-\TEDIT.EXPANDEDMENU.CREATE 81973 . 87651) (\TEDIT.EXPANDEDMENU.START 87653 . 89277) (
-\TEDIT.EXPANDEDMENU.FN 89279 . 92534) (\TEDIT.EXPANDEDMENU.ACTIONFN 92536 . 101363)) (101427 120852 (
-\TEDIT.PARAMENU.CREATE 101437 . 110168) (\TEDIT.PARAMENU.START 110170 . 111424) (
-\TEDIT.APPLY.PARALOOKS 111426 . 112478) (\TEDIT.SHOW.PARALOOKS 112480 . 115197) (
-\TEDIT.PARAMENU.FILLIN 115199 . 119948) (\TEDIT.PARAMENU.RESHAPEFN 119950 . 120850)) (121046 147888 (
-\TEDIT.CHARMENU.CREATE 121056 . 123660) (\TEDIT.CHARMENU.START 123662 . 124952) (\TEDIT.CHARMENU.SPEC 
-124954 . 129637) (\TEDIT.CHARMENU.PARSE 129639 . 132807) (\TEDIT.CHARMENU.FILLIN 132809 . 137439) (
-\TEDIT.SHOW.CHARLOOKS 137441 . 140986) (\TEDIT.APPLY.CHARLOOKS 140988 . 142149) (
-\TEDIT.OFFSETTYPE.STATEFN 142151 . 144114) (\TEDIT.OTHER.STATECHANGEFN 144116 . 145761) (
-\TEDIT.OTHER.SELECTFN 145763 . 147886)) (147950 177199 (\TEDIT.PAGEMENU.CREATE 147960 . 156481) (
-\TEDIT.PAGEMENU.START 156483 . 156834) (\TEDIT.SHOW.PAGELOOKS 156836 . 158857) (\TEDIT.PAGEMENU.FILLIN
- 158859 . 160409) (\TEDIT.PAGEREGION.UNPARSE 160411 . 169810) (\TEDIT.APPLY.PAGELOOKS 169812 . 171739)
- (\TEDIT.CHANGE.PAGELOOKS 171741 . 176355) (\TEDIT.PAGEMENU.CHARLOOKS.STATEFN 176357 . 177197)) (
-177200 183003 (\TEDIT.PAGEMENU.CREATE.HEADINGS 177210 . 180022) (\TEDIT.PAGEMENU.HEADINGS.SETSTATEFN 
-180024 . 181449) (\TEDIT.PAGEMENU.HEADINGS.STATEFN 181451 . 183001)))))
+  (FILEMAP (NIL (4929 16567 (TEDIT.ADD.MENUITEM 4939 . 7056) (TEDIT.DEFAULT.MENUFN 7058 . 13779) (
+TEDIT.REMOVE.MENUITEM 13781 . 14778) (\TEDIT.CREATEMENU 14780 . 15345) (\TEDIT.MENU.WHENHELDFN 15347
+ . 16252) (\TEDIT.MENU.WHENSELECTEDFN 16254 . 16565)) (17381 65416 (DRAWMARGINSCALE 17391 . 20850) (
+MARGINBAR 20852 . 27977) (MARGINBAR.CREATE 27979 . 32177) (MB.MARGINBAR.BUTTONEVENTINFN 32179 . 39981)
+ (MB.MARGINBAR.SELFN.TABS 39983 . 45223) (MB.MARGINBAR.SELFN.TABS.KIND 45225 . 46160) (
+MARGINBAR.GETSTATEFN 46162 . 50149) (MARGINBAR.SETSTATEFN 50151 . 50361) (MARGINBAR.NEUTRALIZE 50363
+ . 51038) (MARGINBAR.LOOKS 51040 . 54146) (MB.MARGINBAR.SIZEFN 54148 . 54934) (MB.MARGINBAR.DISPLAYFN 
+54936 . 57997) (MDESCALE 57999 . 58539) (MSCALE 58541 . 58871) (MB.MARGINBAR.SHOWTAB 58873 . 61196) (
+MB.MARGINBAR.TABTRACK 61198 . 62583) (MARGINBAR.INIT 62585 . 63978) (\TEDIT.PARALOOKS.TO.MARBAR 63980
+ . 65414)) (66241 73558 (TEDIT.MENUSTREAM 66251 . 67251) (TEDITMENUP 67253 . 68222) (\TEDIT.MENU.START
+ 68224 . 72606) (\TEDIT.MENU.OPEN? 72608 . 72982) (\TEDIT.MENU.BUTTONEVENTFN 72984 . 73556)) (73877 
+81928 (\TEDIT.MENU.CREATE 73887 . 75827) (\TEDIT.MENU.PARSE 75829 . 79518) (\TEDIT.MENU.NEUTRALIZE 
+79520 . 81591) (\TEDITMENU.RECORD.UNFORMATTED 81593 . 81926)) (81994 101396 (
+\TEDIT.EXPANDEDMENU.CREATE 82004 . 87682) (\TEDIT.EXPANDEDMENU.START 87684 . 89308) (
+\TEDIT.EXPANDEDMENU.FN 89310 . 92565) (\TEDIT.EXPANDEDMENU.ACTIONFN 92567 . 101394)) (101458 120883 (
+\TEDIT.PARAMENU.CREATE 101468 . 110199) (\TEDIT.PARAMENU.START 110201 . 111455) (
+\TEDIT.APPLY.PARALOOKS 111457 . 112509) (\TEDIT.SHOW.PARALOOKS 112511 . 115228) (
+\TEDIT.PARAMENU.FILLIN 115230 . 119979) (\TEDIT.PARAMENU.RESHAPEFN 119981 . 120881)) (121077 147919 (
+\TEDIT.CHARMENU.CREATE 121087 . 123691) (\TEDIT.CHARMENU.START 123693 . 124983) (\TEDIT.CHARMENU.SPEC 
+124985 . 129668) (\TEDIT.CHARMENU.PARSE 129670 . 132838) (\TEDIT.CHARMENU.FILLIN 132840 . 137470) (
+\TEDIT.SHOW.CHARLOOKS 137472 . 141017) (\TEDIT.APPLY.CHARLOOKS 141019 . 142180) (
+\TEDIT.OFFSETTYPE.STATEFN 142182 . 144145) (\TEDIT.OTHER.STATECHANGEFN 144147 . 145792) (
+\TEDIT.OTHER.SELECTFN 145794 . 147917)) (147981 177230 (\TEDIT.PAGEMENU.CREATE 147991 . 156512) (
+\TEDIT.PAGEMENU.START 156514 . 156865) (\TEDIT.SHOW.PAGELOOKS 156867 . 158888) (\TEDIT.PAGEMENU.FILLIN
+ 158890 . 160440) (\TEDIT.PAGEREGION.UNPARSE 160442 . 169841) (\TEDIT.APPLY.PAGELOOKS 169843 . 171770)
+ (\TEDIT.CHANGE.PAGELOOKS 171772 . 176386) (\TEDIT.PAGEMENU.CHARLOOKS.STATEFN 176388 . 177228)) (
+177231 183034 (\TEDIT.PAGEMENU.CREATE.HEADINGS 177241 . 180053) (\TEDIT.PAGEMENU.HEADINGS.SETSTATEFN 
+180055 . 181480) (\TEDIT.PAGEMENU.HEADINGS.STATEFN 181482 . 183032)))))
 STOP
diff --git a/library/tedit/TEDIT-MENU.LCOM b/library/tedit/TEDIT-MENU.LCOM
index d3c531af..095cbe6c 100644
Binary files a/library/tedit/TEDIT-MENU.LCOM and b/library/tedit/TEDIT-MENU.LCOM differ
diff --git a/library/tedit/TEDIT-SELECTION b/library/tedit/TEDIT-SELECTION
index cd619a01..6db9d430 100644
--- a/library/tedit/TEDIT-SELECTION
+++ b/library/tedit/TEDIT-SELECTION
@@ -1,12 +1,13 @@
 (DEFINE-FILE-INFO :PACKAGE "INTERLISP" :READTABLE "INTERLISP" :BASE 10)
 
-(FILECREATED "16-Apr-2026 09:27:41" {WMEDLEY}<library>TEDIT>TEDIT-SELECTION.;741 161623 
+(FILECREATED "15-May-2026 10:48:32" {MEDLEY}<library>TEDIT>TEDIT-SELECTION.;743 162591 
 
       :EDIT-BY rmk
 
-      :CHANGES-TO (FNS \TEDIT.SELPIECES.FROM.STRING)
+      :CHANGES-TO (FNS \TEDIT.XYTOSEL \TEDIT.REGIONTYPE \TEDIT.SEL.OFF \TEDIT.SECONDARYSEL.OFF)
+                  (VARS TEDIT-SELECTIONCOMS)
 
-      :PREVIOUS-DATE "10-Apr-2026 09:31:20" {WMEDLEY}<library>TEDIT>TEDIT-SELECTION.;740)
+      :PREVIOUS-DATE "16-Apr-2026 09:27:41" {MEDLEY}<library>tedit>TEDIT-SELECTION.;741)
 
 
 (PRETTYCOMPRINT TEDIT-SELECTIONCOMS)
@@ -41,9 +42,9 @@
               (FNS \TEDIT.RESET.EXTEND.PENDING.DELETE \TEDIT.SET.SEL.LOOKS)
               (DECLARE%: EVAL@COMPILE DONTCOPY (EXPORT (MACROS \TEDIT.NOSEL \TEDIT.SEL.ON 
                                                               \TEDIT.SEL.OFF)))
-              (FNS \TEDIT.SHOWSEL \TEDIT.NOSEL \TEDIT.SEL.OFF \TEDIT.SEL.ON \TEDIT.SHOWSEL.HILIGHT 
-                   \TEDIT.UPDATE.SEL \TEDIT.CARETLINE \TEDIT.SEL.L1 \TEDIT.SEL.LN 
-                   \TEDIT.SEL.DELETEDCHARS)
+              (FNS \TEDIT.SHOWSEL \TEDIT.NOSEL \TEDIT.SEL.OFF \TEDIT.SECONDARYSEL.OFF \TEDIT.SEL.ON 
+                   \TEDIT.SHOWSEL.HILIGHT \TEDIT.UPDATE.SEL \TEDIT.CARETLINE \TEDIT.SEL.L1 
+                   \TEDIT.SEL.LN \TEDIT.SEL.DELETEDCHARS)
               (FNS \TEDIT.COPYSEL \TEDIT.SEL.CHANGED?))
         (COMS                                                (* ; "Image objects")
               (FNS \TEDIT.SELECT.OBJECT \TEDIT.SHOWSEL.OBJECT \TEDIT.CLIP.OBJECT 
@@ -821,6 +822,7 @@
 
 (\TEDIT.XYTOSEL
   [LAMBDA (X Y NEWSEL TSTREAM SELOPERATION PANE BUTTON CURSEL REGIONTYPE)
+                                                             (* ; "Edited 15-May-2026 09:48 by rmk")
                                                              (* ; "Edited 21-Apr-2025 20:33 by rmk")
                                                              (* ; "Edited  6-Apr-2025 18:57 by rmk")
                                                              (* ; "Edited 13-Feb-2025 11:03 by rmk")
@@ -848,7 +850,7 @@
            LINE PARAFIRSTCHNO PARALASTCHNO SELFN)
           (CL:UNLESS (SETQ LINE (\TEDIT.XYTOSEL.LINE X Y PANE TEXTOBJ))
                  (RETURN))
-          (SELECTQ (\TEDIT.REGIONTYPE BUTTON CURSEL TEXTOBJ REGIONTYPE)
+          (SELECTQ REGIONTYPE
               ((TEXT PANE)                                   (* ; 
                                                    "We're in the regular text area, which character?")
                    (CL:WHEN (AND (IGREATERP (GETLD LINE LCHARLIM)
@@ -933,24 +935,28 @@
           (RETURN NEWSEL])
 
 (\TEDIT.REGIONTYPE
-  [LAMBDA (BUTTON CURSEL TEXTOBJ REGIONTYPE)                 (* ; "Edited  6-Dec-2024 12:50 by rmk")
+  [LAMBDA (CURSEL TEXTOBJ)                                   (* ; "Edited 15-May-2026 10:43 by rmk")
+                                                             (* ; "Edited  6-Dec-2024 12:50 by rmk")
 
     (* ;; "Coerces the mouse region according to the button and current selection.")
 
-    (CL:UNLESS REGIONTYPE
-        (SETQ REGIONTYPE (FGETTOBJ TEXTOBJ MOUSEREGION)))
-    (SELECTQ BUTTON
-        (MIDDLE (CL:WHEN (AND (EQ REGIONTYPE 'LINE)
-                              (FGETTOBJ TEXTOBJ PARABREAKCHARS))
+    (LET ((MOUSEREGION (FGETTOBJ TEXTOBJ MOUSEREGION)))
+         (if (NEQ MOUSEREGION 'LINE)
+             then 'TEXT
+           elseif (\TEDIT.MOUSESTATE MIDDLE)
+             then 
+                  (* ;; "A middle-button selection in the line region means the line-containing paragraph.  If there are no PARABREAKCHARS, we assume heuristically that there are no paragraphs, and a line is just a line.  Otherwise, a middle click in such a document will select the whole thing, not very useful.")
 
-                    (* ;; "A middle-button selection in the line region means the line-containing paragraph.  If there are no PARABREAKCHARS, we assume heuristically that there are no paragraphs, and a line is just a line.  Otherwise, a middle click in such a document will select the whole thing, not very useful.")
-
-                    (SETQ REGIONTYPE 'PARA)))
-        (RIGHT (SETQ REGIONTYPE (OR [CAR (MEMB (FGETSEL CURSEL SELKIND)
-                                               '(LINE PARA]
-                                    'TEXT)))
-        NIL)
-    REGIONTYPE])
+                  (CL:IF (FGETTOBJ TEXTOBJ PARABREAKCHARS)
+                      'PARA
+                      'LINE)
+           elseif (\TEDIT.MOUSESTATE RIGHT)
+             then                                            (* ; "Extending previous t ype")
+                  (OR [AND CURSEL (CAR (MEMB (FGETSEL CURSEL SELKIND)
+                                             '(LINE PARA]
+                      'LINE)
+           else                                              (* ; "No button or left button")
+                'LINE])
 
 (\TEDIT.XYTOSEL.INLINEP
   [LAMBDA (X Y PANE TEXTOBJ)                                 (* ; "Edited 30-Nov-2024 15:46 by rmk")
@@ -1360,6 +1366,16 @@
 
     (\TEDIT.SHOWSEL SEL NIL TSTREAM ONLYPANE])
 
+(\TEDIT.SECONDARYSEL.OFF
+  [LAMBDA (TSTREAM)                                          (* ; "Edited 13-May-2026 09:36 by rmk")
+
+    (* ;; "Turns off and removes the secondary selection.")
+
+    (LET ((TOBJ (FGETTSTR TSTREAM TEXTOBJ)))
+         (CL:WHEN (FGETTOBJ TOBJ SECONDARYSEL)
+             (\TEDIT.SEL.OFF TSTREAM (FGETTOBJ TOBJ SECONDARYSEL))
+             (FSETTOBJ TOBJ SECONDARYSEL NIL))])
+
 (\TEDIT.SEL.ON
   [LAMBDA (TSTREAM SEL ONLYPANE DONTFIX)                     (* ; "Edited  5-May-2025 23:21 by rmk")
                                                              (* ; "Edited 15-Apr-2025 15:20 by rmk")
@@ -2561,26 +2577,26 @@
 (ADDTOVAR LAMA TEDIT.SELPROP)
 )
 (DECLARE%: DONTCOPY
-  (FILEMAP (NIL (15886 17707 (\TEDIT.SELECTION.DEFPRINT 15896 . 17705)) (17744 19249 (
-\TEDIT.SET.GLOBAL.SELECTIONS 17754 . 19247)) (19250 25471 (\TEDIT.SELECTED.PIECES 19260 . 20899) (
-\TEDIT.FIND.PROTECTED.END 20901 . 22695) (\TEDIT.FIND.PROTECTED.START 22697 . 24680) (
-\TEDIT.WORD.BOUND 24682 . 25469)) (25605 59712 (\TEDIT.EXTEND.SEL 25615 . 32855) (\TEDIT.SCAN.LINE 
-32857 . 44530) (\TEDIT.SCAN.LINE.WORD 44532 . 49525) (\TEDIT.XYTOSEL 49527 . 56865) (\TEDIT.REGIONTYPE
- 56867 . 57886) (\TEDIT.XYTOSEL.INLINEP 57888 . 58343) (\TEDIT.XYTOSEL.LINE 58345 . 59710)) (59713 
-73258 (\TEDIT.FIXSEL 59723 . 69100) (\TEDIT.CHTOLINEX 69102 . 73256)) (73259 77463 (
-\TEDIT.RESET.EXTEND.PENDING.DELETE 73269 . 74547) (\TEDIT.SET.SEL.LOOKS 74549 . 77461)) (78400 99553 (
-\TEDIT.SHOWSEL 78410 . 83386) (\TEDIT.NOSEL 83388 . 83689) (\TEDIT.SEL.OFF 83691 . 84102) (
-\TEDIT.SEL.ON 84104 . 84520) (\TEDIT.SHOWSEL.HILIGHT 84522 . 89143) (\TEDIT.UPDATE.SEL 89145 . 93747) 
-(\TEDIT.CARETLINE 93749 . 94463) (\TEDIT.SEL.L1 94465 . 95148) (\TEDIT.SEL.LN 95150 . 95833) (
-\TEDIT.SEL.DELETEDCHARS 95835 . 99551)) (99554 104436 (\TEDIT.COPYSEL 99564 . 102206) (
-\TEDIT.SEL.CHANGED? 102208 . 104434)) (104467 118126 (\TEDIT.SELECT.OBJECT 104477 . 109430) (
-\TEDIT.SHOWSEL.OBJECT 109432 . 111663) (\TEDIT.CLIP.OBJECT 111665 . 113669) (\TEDIT.OPERATE.OBJECT 
-113671 . 118124)) (118154 137453 (\TEDIT.SELPIECES 118164 . 122445) (\TEDIT.SELPIECES.COPY 122447 . 
-124936) (\TEDIT.SELPIECES.CONCAT 124938 . 126817) (\TEDIT.SELPIECES.CHARTRANSFORM 126819 . 130189) (
-\TEDIT.SELPIECES.FROM.STRING 130191 . 135088) (\TEDIT.SELPIECES.TO.STRING 135090 . 137451)) (137506 
-161454 (TEDIT.XYTOCH 137516 . 140092) (TEDIT.SELPROP 140094 . 144371) (TEDIT.GETPOINT 144373 . 146293)
- (TEDIT.GETSEL 146295 . 147171) (TEDIT.GETSEL.PARA 147173 . 148122) (TEDIT.SCANSEL 148124 . 149072) (
-TEDIT.SET.SEL.LOOKS 149074 . 150559) (TEDIT.SETSEL 150561 . 155479) (TEDIT.SHOWSEL 155481 . 157345) (
-TEDIT.SEL.AS.STRING 157347 . 159832) (TEDIT.SEL.AS.SEXPR 159834 . 161120) (TEDIT.SELECTALL 161122 . 
-161452)))))
+  (FILEMAP (NIL (15996 17817 (\TEDIT.SELECTION.DEFPRINT 16006 . 17815)) (17854 19359 (
+\TEDIT.SET.GLOBAL.SELECTIONS 17864 . 19357)) (19360 25581 (\TEDIT.SELECTED.PIECES 19370 . 21009) (
+\TEDIT.FIND.PROTECTED.END 21011 . 22805) (\TEDIT.FIND.PROTECTED.START 22807 . 24790) (
+\TEDIT.WORD.BOUND 24792 . 25579)) (25715 60263 (\TEDIT.EXTEND.SEL 25725 . 32965) (\TEDIT.SCAN.LINE 
+32967 . 44640) (\TEDIT.SCAN.LINE.WORD 44642 . 49635) (\TEDIT.XYTOSEL 49637 . 57038) (\TEDIT.REGIONTYPE
+ 57040 . 58437) (\TEDIT.XYTOSEL.INLINEP 58439 . 58894) (\TEDIT.XYTOSEL.LINE 58896 . 60261)) (60264 
+73809 (\TEDIT.FIXSEL 60274 . 69651) (\TEDIT.CHTOLINEX 69653 . 73807)) (73810 78014 (
+\TEDIT.RESET.EXTEND.PENDING.DELETE 73820 . 75098) (\TEDIT.SET.SEL.LOOKS 75100 . 78012)) (78951 100521 
+(\TEDIT.SHOWSEL 78961 . 83937) (\TEDIT.NOSEL 83939 . 84240) (\TEDIT.SEL.OFF 84242 . 84653) (
+\TEDIT.SECONDARYSEL.OFF 84655 . 85070) (\TEDIT.SEL.ON 85072 . 85488) (\TEDIT.SHOWSEL.HILIGHT 85490 . 
+90111) (\TEDIT.UPDATE.SEL 90113 . 94715) (\TEDIT.CARETLINE 94717 . 95431) (\TEDIT.SEL.L1 95433 . 96116
+) (\TEDIT.SEL.LN 96118 . 96801) (\TEDIT.SEL.DELETEDCHARS 96803 . 100519)) (100522 105404 (
+\TEDIT.COPYSEL 100532 . 103174) (\TEDIT.SEL.CHANGED? 103176 . 105402)) (105435 119094 (
+\TEDIT.SELECT.OBJECT 105445 . 110398) (\TEDIT.SHOWSEL.OBJECT 110400 . 112631) (\TEDIT.CLIP.OBJECT 
+112633 . 114637) (\TEDIT.OPERATE.OBJECT 114639 . 119092)) (119122 138421 (\TEDIT.SELPIECES 119132 . 
+123413) (\TEDIT.SELPIECES.COPY 123415 . 125904) (\TEDIT.SELPIECES.CONCAT 125906 . 127785) (
+\TEDIT.SELPIECES.CHARTRANSFORM 127787 . 131157) (\TEDIT.SELPIECES.FROM.STRING 131159 . 136056) (
+\TEDIT.SELPIECES.TO.STRING 136058 . 138419)) (138474 162422 (TEDIT.XYTOCH 138484 . 141060) (
+TEDIT.SELPROP 141062 . 145339) (TEDIT.GETPOINT 145341 . 147261) (TEDIT.GETSEL 147263 . 148139) (
+TEDIT.GETSEL.PARA 148141 . 149090) (TEDIT.SCANSEL 149092 . 150040) (TEDIT.SET.SEL.LOOKS 150042 . 
+151527) (TEDIT.SETSEL 151529 . 156447) (TEDIT.SHOWSEL 156449 . 158313) (TEDIT.SEL.AS.STRING 158315 . 
+160800) (TEDIT.SEL.AS.SEXPR 160802 . 162088) (TEDIT.SELECTALL 162090 . 162420)))))
 STOP
diff --git a/library/tedit/TEDIT-SELECTION.LCOM b/library/tedit/TEDIT-SELECTION.LCOM
index ff537247..56be8c44 100644
Binary files a/library/tedit/TEDIT-SELECTION.LCOM and b/library/tedit/TEDIT-SELECTION.LCOM differ
diff --git a/library/tedit/TEDIT-WINDOW b/library/tedit/TEDIT-WINDOW
index d675e84a..1350bd75 100644
--- a/library/tedit/TEDIT-WINDOW
+++ b/library/tedit/TEDIT-WINDOW
@@ -1,12 +1,12 @@
-(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
+(DEFINE-FILE-INFO :PACKAGE "INTERLISP" :READTABLE "INTERLISP" :BASE 10)
 
-(FILECREATED " 7-Feb-2026 18:53:22" {WMEDLEY}<library>TEDIT>TEDIT-WINDOW.;896 234678 
+(FILECREATED "17-May-2026 13:04:08" {MEDLEY}<library>tedit>TEDIT-WINDOW.;912 236525 
 
       :EDIT-BY rmk
 
-      :CHANGES-TO (FNS TEDIT.PROMPTPRINT)
+      :CHANGES-TO (FNS \TEDIT.BUTTONEVENTFN)
 
-      :PREVIOUS-DATE " 5-Feb-2026 08:24:23" {WMEDLEY}<library>TEDIT>TEDIT-WINDOW.;895)
+      :PREVIOUS-DATE "17-May-2026 12:46:44" {MEDLEY}<library>tedit>TEDIT-WINDOW.;911)
 
 
 (PRETTYCOMPRINT TEDIT-WINDOWCOMS)
@@ -26,9 +26,10 @@
         (FNS TEDIT.DEFER.UPDATES)
         (FNS \TEDIT.WINDOW.CREATE \TEDIT.WINDOW.GETREGION \TEDIT.WINDOW.SETUP 
              \TEDIT.MINIMAL.WINDOW.SETUP \TEDIT.CLEARPANE \TEDIT.FILL.PANES)
-        (FNS \TEDIT.CURSORMOVEDFN \TEDIT.CURSOROUTFN \TEDIT.ACTIVE.WINDOWP \TEDIT.EXPANDFN 
-             \TEDIT.MAINW \TEDIT.MAINSTREAM \TEDIT.PRIMARYPANE \TEDIT.PANELIST \TEDIT.NEWREGIONFN 
-             \TEDIT.SET.WINDOW.EXTENT \TEDIT.SHRINK.ICONCREATE \TEDIT.SHRINKFN \TEDIT.PANEREGION)
+        (FNS \TEDIT.CURSORMOVEDFN \TEDIT.CURSOROUTFN \TEDIT.CURSORINFN \TEDIT.ACTIVE.WINDOWP 
+             \TEDIT.EXPANDFN \TEDIT.MAINW \TEDIT.MAINSTREAM \TEDIT.PRIMARYPANE \TEDIT.PANELIST 
+             \TEDIT.NEWREGIONFN \TEDIT.SET.WINDOW.EXTENT \TEDIT.SHRINK.ICONCREATE \TEDIT.SHRINKFN 
+             \TEDIT.PANEREGION)
         
         (* ;; "Button events")
 
@@ -458,7 +459,8 @@
          WINDOW])
 
 (\TEDIT.WINDOW.GETREGION
-  [LAMBDA (TSTREAM REGIONTYPE PHEIGHT)                       (* ; "Edited  5-Feb-2026 08:24 by rmk")
+  [LAMBDA (TSTREAM REGIONTYPE PHEIGHT)                       (* ; "Edited 10-May-2026 16:32 by rmk")
+                                                             (* ; "Edited  5-Feb-2026 08:24 by rmk")
                                                              (* ; "Edited 27-Jan-2026 15:30 by rmk")
                                                              (* ; "Edited 25-Jan-2026 20:09 by rmk")
                                                              (* ; "Edited 25-Oct-2025 10:27 by rmk")
@@ -552,7 +554,7 @@
                  (CL:WHEN (TXTFILE TSTREAM)
                      (printout PROMPTWINDOW " for " 2 (GETTEXTPROP TSTREAM 'FILENAME)))
                  (TERPRI PROMPTWINDOW)
-                 (GETBOXREGION WIDTH HEIGHT])
+                 (GETREGION WIDTH HEIGHT])
 
 (\TEDIT.WINDOW.SETUP
   [LAMBDA (PANE TSTREAM PROPS AFTERPANE LCHAR1)              (* ; "Edited 15-Jan-2026 10:35 by rmk")
@@ -619,7 +621,8 @@
           (\TEDIT.SET.WINDOW.EXTENT TEXTOBJ PANE])
 
 (\TEDIT.MINIMAL.WINDOW.SETUP
-  [LAMBDA (PANEWINDOW TSTREAM PROPS)                         (* ; "Edited 23-Dec-2025 23:41 by rmk")
+  [LAMBDA (PANEWINDOW TSTREAM PROPS)                         (* ; "Edited 14-May-2026 17:30 by rmk")
+                                                             (* ; "Edited 23-Dec-2025 23:41 by rmk")
                                                              (* ; "Edited 20-Dec-2025 23:04 by rmk")
                                                              (* ; "Edited 19-Oct-2025 14:55 by rmk")
                                                              (* ; "Edited 20-Apr-2025 15:19 by rmk")
@@ -632,14 +635,15 @@
                                                              (* ; "Edited 30-Jun-2024 08:55 by rmk")
                                                              (* ; "Edited 25-Jun-2024 00:04 by rmk")
                                                              (* ; "Edited 13-Jun-2024 21:51 by rmk")
-                                                             (* ; "Edited 20-Mar-2024 11:22 by rmk")
-                                                             (* ; "Edited 22-Feb-2024 23:14 by rmk")
-                                                             (* ; "Edited 26-Jan-2024 13:14 by rmk")
-                                                             (* ; "Edited  2-Jan-2024 17:27 by rmk")
-                                                             (* ; "Edited 21-Dec-2023 17:19 by rmk")
-                                                             (* ; "Edited 20-Nov-2023 10:40 by rmk")
-                                                             (* ; "Edited  4-Oct-2023 09:48 by rmk")
-                                                             (* ; "Edited 18-Sep-2023 23:44 by rmk")
+                                                             (* ; "Edited 20-Mar-2024 11:22 by rmk")
+                                                             (* ; 
+                                                            "CURSORINEdited 22-Feb-2024 23:14 by rmk")
+                                                             (* ; "Edited 26-Jan-2024 13:14 by rmk")
+                                                             (* ; "Edited  2-Jan-2024 17:27 by rmk")
+                                                             (* ; "Edited 21-Dec-2023 17:19 by rmk")
+                                                             (* ; "Edited 20-Nov-2023 10:40 by rmk")
+                                                             (* ; "Edited  4-Oct-2023 09:48 by rmk")
+                                                             (* ; "Edited 18-Sep-2023 23:44 by rmk")
                                                              (* ; "Edited 30-May-91 23:33 by jds")
 
     (* ;; "Do the minimum setup so that the window PANEWINDOW becomes the window of a pane of TSTREAM and TSTREAM and PANE know about each other.  Does NOT include mouse interface or scrolling/lines.")
@@ -698,6 +702,7 @@
 
          (WINDOWPROP PANEWINDOW 'CURSORMOVEDFN (FUNCTION \TEDIT.CURSORMOVEDFN))
          (WINDOWPROP PANEWINDOW 'CURSOROUTFN (FUNCTION \TEDIT.CURSOROUTFN))
+         (WINDOWPROP PANEWINDOW 'CURSORINFN (FUNCTION \TEDIT.CURSORINFN))
          (WINDOWPROP PANEWINDOW 'BUTTONEVENTFN (FUNCTION \TEDIT.BUTTONEVENTFN))
          (WINDOWPROP PANEWINDOW 'RIGHTBUTTONFN (FUNCTION \TEDIT.BUTTONEVENTFN))
          (WINDOWPROP PANEWINDOW 'IMAGETYPE 'TEDIT)           (* ; "For hardcopy")
@@ -878,6 +883,23 @@
                MOUSEREGION
                'TEXT))])
 
+(\TEDIT.CURSORINFN
+  [LAMBDA (PANE)                                             (* ; "Edited 16-May-2026 10:05 by rmk")
+                                                             (* ; "Edited 14-May-2026 22:47 by rmk")
+
+    (* ;; "This runs when the mouse comes into a Tedit window from outside.  The mouse may have gone outside while it was being tracked by \TEDIT.BUTTONEVENTFN while there was a secondary selection in the stream and on the screen.  If the window still has (or somehow regained) the TTY (because it wasn't given to anybody else when the mouse was outside) and the mode keys are the same (or were regained) for that secondary selection, then we want to set things up so the mouse tracker is in the state it was when it exited.  But if those conditions don't hold, we at least consistently flush that secondary selection and wait for a click to tell us what to do.")
+
+    (CL:WHEN (PANETEXTSTREAM PANE)
+        [LET ((TEXTOBJ (PANETEXTOBJ PANE))
+              SECSEL)
+             (if [AND (EQ (WINDOWPROP PANE 'PROCESS)
+                          (TTY.PROCESS))
+                      (SETQ SECSEL (FGETTOBJ TEXTOBJ SECONDARYSEL))
+                      (EQ (GETSEL SECSEL SELOPERATION)
+                          (\TEDIT.BUTTONEVENTFN.GETOPERATION (FGETTOBJ TEXTOBJ TXTREADONLY]
+                 then (\TEDIT.BUTTONEVENTFN PANE)
+               else (\TEDIT.SECONDARYSEL.OFF (PANETEXTSTREAM PANE])])
+
 (\TEDIT.ACTIVE.WINDOWP
   [LAMBDA (W)                                                (* ; "Edited 27-Apr-2025 13:07 by rmk")
                                                              (* ; "Edited 20-Mar-2024 09:38 by rmk")
@@ -1156,7 +1178,10 @@
 (DEFINEQ
 
 (\TEDIT.BUTTONEVENTFN
-  [LAMBDA (PANE)                                             (* ; "Edited 15-Jan-2026 00:39 by rmk")
+  [LAMBDA (PANE)                                             (* ; "Edited 17-May-2026 13:03 by rmk")
+                                                             (* ; "Edited 15-May-2026 12:31 by rmk")
+                                                             (* ; "Edited 13-May-2026 13:26 by rmk")
+                                                             (* ; "Edited 15-Jan-2026 00:39 by rmk")
                                                              (* ; "Edited 11-Jan-2026 08:30 by rmk")
                                                              (* ; "Edited  6-May-2025 20:35 by rmk")
                                                              (* ; "Edited 21-Apr-2025 20:19 by rmk")
@@ -1184,164 +1209,157 @@
     (* ;; "Handle mouse buttons that are clicked in a TEdit pane.  ")
 
     (TOTOPW PANE)
-    (CL:WHEN (MOUSESTATE (OR LEFT MIDDLE RIGHT))
-
-        (* ;; "If no button is down, we got control on button-up transition, so ignore it.")
-
-        (RESETLST                                            (* ; 
-                                                      "Getting TTYPROC here allows HELP in debugging")
-            (bind (TTYPROC _ (TTY.PROCESS))
-                  (TSTREAM _ (PANETEXTSTREAM PANE))
-                  (X _ (LASTMOUSEX PANE))
-                  (Y _ (LASTMOUSEY PANE))
-                  (DS _ (WINDOWPROP PANE 'DSP))
-                  (OLDX _ MIN.SMALLP)
-                  (OLDY _ MIN.SMALLP)
-                  (PREG _ (PANEREGION PANE))
-                  TEXTOBJ CURSEL NEWSEL CUROPERATION NEWOPERATION PENDINGDEL READONLY SECSEL
-               declare (SPECVARS CURSEL) first 
+    (RESETLST                                                (* ; 
+                             "Getting TTYPROC here allows HELP in debugging.  It's the Tedit process")
+        (bind (TTYPROC _ (TTY.PROCESS))
+              (TSTREAM _ (PANETEXTSTREAM PANE))
+              (X _ (LASTMOUSEX PANE))
+              (Y _ (LASTMOUSEY PANE))
+              (DS _ (WINDOWPROP PANE 'DSP))
+              (OLDX _ MIN.SMALLP)
+              (OLDY _ MIN.SMALLP)
+              (PREG _ (PANEREGION PANE))
+              TEXTOBJ CURSEL NEWSEL CUROPERATION NEWOPERATION PENDINGDEL READONLY SECSEL REGIONTYPE
+           declare (SPECVARS CURSEL) first 
 
                                       (* ;; "Pick off and return from a bunch of peripheral situations, then fall through to the complexities of normal text selection.")
 
-                                               (CL:UNLESS TSTREAM (RETURN))
-                                               (SETQ TEXTOBJ (TEXTOBJ! (FGETTSTR TSTREAM TEXTOBJ)))
-                                               (CL:WHEN (OR (\TEDIT.BUTTONEVENTFN.INTITLE Y PANE 
-                                                                   TEXTOBJ)
-                                                            (\TEDIT.BUTTONEVENTFN.INACTIVE TEXTOBJ 
-                                                                   PANE)
-                                                            (\TEDIT.PANE.SPLIT TEXTOBJ PANE))
-                                                      (RETURN)) 
+                                           (CL:UNLESS TSTREAM (RETURN))
+                                           (SETQ TEXTOBJ (TEXTOBJ! (FGETTSTR TSTREAM TEXTOBJ)))
+                                           (CL:WHEN (FGETTOBJ TEXTOBJ EDITFINISHEDFLG)
+                                                  (RETURN))
+                                           (CL:WHEN (OR (\TEDIT.BUTTONEVENTFN.INTITLE Y PANE TEXTOBJ)
+                                                        (\TEDIT.BUTTONEVENTFN.INACTIVE TEXTOBJ PANE)
+                                                        (\TEDIT.PANE.SPLIT TEXTOBJ PANE))
+                                                  (RETURN)) 
 
-                                               (* ;; "")
+                                           (* ;; "")
 
-                                               (* ;; 
+                                           (* ;; 
               "The usual case -- a valid click in this pane.  And there's nothing else going on now.")
 
                                          (* ;; "Make sure the caret isn't being displayed, then change to the special tall one so it is easier to see during typein")
 
-                                               (\CARET.DOWN)
-                                               [RESETSAVE (\TEDIT.CARET TEXTOBJ BXHICARET)
-                                                      `(\TEDIT.CARET ,TEXTOBJ ,BXCARET] 
+                                           (\CARET.DOWN)
+                                           [RESETSAVE (\TEDIT.CARET TEXTOBJ BXHICARET)
+                                                  `(\TEDIT.CARET ,TEXTOBJ ,BXCARET] 
 
-                                               (* ;; "")
+                                           (* ;; "")
 
-                                               (SETQ READONLY (FGETTOBJ TEXTOBJ TXTREADONLY))
-                                               (SETQ NEWOPERATION (\TEDIT.BUTTONEVENTFN.GETOPERATION
-                                                                   READONLY NIL)) 
+                                           (SETQ READONLY (FGETTOBJ TEXTOBJ TXTREADONLY))
+                                           (SETQ NEWOPERATION (\TEDIT.BUTTONEVENTFN.GETOPERATION
+                                                               READONLY NIL)) 
 
-                                               (* ;; "")
+                                           (* ;; "")
 
-                                               (if (SETQ CURSEL (FGETTOBJ TEXTOBJ SECONDARYSEL))
-                                                   then      (* ; 
+                                           (if (SETQ CURSEL (FGETTOBJ TEXTOBJ SECONDARYSEL))
+                                               then          (* ; 
                                                        "Mouse moved out and came back...and clicked.")
-                                                        (SETQ CUROPERATION (FGETSEL CURSEL 
-                                                                                  SELOPERATION))
-                                                        (SETQ PENDINGDEL (EQ CUROPERATION
-                                                                             'PENDINGDEL))
-                                                        (CL:UNLESS (EQ NEWOPERATION CUROPERATION)
+                                                    (SETQ CUROPERATION (FGETSEL CURSEL SELOPERATION))
+                                                             (* ; "Shift keys of secondary selection")
+                                                    (SETQ PENDINGDEL (EQ CUROPERATION 'PENDINGDEL))
+                                                    (CL:UNLESS (EQ NEWOPERATION CUROPERATION)
                                                              (* ; 
-                                                    "Shift keys have changed, turn off old secondary")
-                                                            (\TEDIT.SEL.OFF TSTREAM CURSEL))
-                                                        (CL:WHEN (EQ NEWOPERATION 'NORMAL)
-                                                             (* ; "")
-                                                            (CL:UNLESS (SETQ CURSEL (
+                                                 "If shift keys have changed, turn off old secondary")
+                                                        (\TEDIT.SECONDARYSEL.OFF TSTREAM))
+                                                    (CL:WHEN (EQ NEWOPERATION 'NORMAL)
+                                                             (* ; "Go back to normalpicik FILES?")
+                                                        (CL:UNLESS (SETQ CURSEL (
                                                                      \TEDIT.BUTTONEVENTFN.CURSEL.INIT
-                                                                                     NEWOPERATION 
-                                                                                     TSTREAM))
-                                                                   (RETURN)))
-                                                 elseif (SETQ CURSEL (
-                                                                     \TEDIT.BUTTONEVENTFN.CURSEL.INIT
-                                                                      NEWOPERATION TSTREAM))
-                                                   then (SETQ CUROPERATION 'NORMAL)
-                                                 else (RETURN))
-                                               (SETQ NEWSEL (\TEDIT.COPYSEL CURSEL)) 
+                                                                                 'NORMAL TSTREAM))
+                                                               (RETURN)))
+                                             elseif (SETQ CURSEL (\TEDIT.BUTTONEVENTFN.CURSEL.INIT
+                                                                  NEWOPERATION TSTREAM))
+                                               then (SETQ CUROPERATION (FGETSEL CURSEL SELOPERATION))
+                                             else (RETURN))
+                                           (SETQ NEWSEL (\TEDIT.COPYSEL CURSEL)) 
                                                              (* ; 
                                                       "Gets line-chains and consistent initial looks")
-                                               (FSETTOBJ TEXTOBJ LASTARROWX NIL)
-               eachtime (BLOCK)                              (* ; "Give other processes a chance")
-                     (GETMOUSESTATE)                         (* ; 
+                                           (FSETTOBJ TEXTOBJ LASTARROWX NIL)
+                                           (SETQ REGIONTYPE (\TEDIT.REGIONTYPE CURSEL TEXTOBJ))
+           eachtime (BLOCK)                                  (* ; "Give other processes a chance")
+                 (GETMOUSESTATE)                             (* ; 
                                                              "And get the new mouse and key info")
-                     (\TEDIT.CURSORMOVEDFN PANE)
-                     (SETQ NEWOPERATION (\TEDIT.BUTTONEVENTFN.GETOPERATION READONLY CUROPERATION))
-                     (FSETTOBJ TEXTOBJ SECONDARYSEL CURSEL) 
+                 (\TEDIT.CURSORMOVEDFN PANE)
+                 (SETQ NEWOPERATION (\TEDIT.BUTTONEVENTFN.GETOPERATION READONLY CUROPERATION))
+                 (FSETTOBJ TEXTOBJ SECONDARYSEL CURSEL) 
 
-                     (* ;; "We're done if keys and buttons are up")
+                 (* ;; "We're done if keys and buttons are up")
  until (AND (EQ NEWOPERATION 'NORMAL)
             (ALLBUTTONSUP)) unless (AND (IEQP OLDX (SETQ X (LASTMOUSEX DS)))
                                         (IEQP OLDY (SETQ Y (LASTMOUSEY DS)))
                                         (EQ CUROPERATION NEWOPERATION))
-               do (CL:UNLESS (INSIDEP (PANEREGION PANE PREG)
-                                    X Y)                     (* ; 
-                                                     "Left the window, stay in the loop if scrolling")
-                      (CL:UNLESS (IN/SCROLL/BAR? PANE LASTMOUSEX LASTMOUSEY)
-                             (RETURN))
-                      (SCROLL.HANDLER PANE)) 
+           do (CL:UNLESS (INSIDEP (PANEREGION PANE PREG)
+                                X Y)                         (* ; 
+                   "Left the window, relinquish control until a button click or cursor comes back in")
+                  (RETURN)) 
 
-                  (* ;; "")
+              (* ;; "")
 
-                  (* ;; "Polling loop, track the mouse until the buttons and modifier keys come up, i.e. NORMAL Nothing to do until the mouse moves or the operation changes. .")
+              (* ;; "Polling loop, track the mouse until the buttons and modifier keys come up, i.e. NORMAL Nothing to do until the mouse moves or the operation changes. .")
 
-                  (* ;; "First and always: CURSEL is ON at this point and matches the display. NEWSEL may not be well-defined.")
+              (* ;; "First and always: CURSEL is ON at this point and matches the display. NEWSEL may not be well-defined.")
 
-                  (* ;; "Ready to track the selection.")
+              (* ;; "Ready to track the selection.")
 
-                  (SETQ OLDX X)
-                  (SETQ OLDY Y)
-                  (CL:UNLESS (EQ NEWOPERATION CUROPERATION)  (* ; "Keys changed ")
-                      (\TEDIT.SEL.OFF TSTREAM CURSEL)        (* ; "Switch to new highlighting")
-                      (\TEDIT.SET.SEL.LOOKS CURSEL NEWOPERATION)
-                      (\TEDIT.SET.SEL.LOOKS NEWSEL NEWOPERATION)
-                      (CL:WHEN (EQ NEWOPERATION 'NORMAL)
+              (SETQ OLDX X)
+              (SETQ OLDY Y)
+              (CL:UNLESS (EQ NEWOPERATION CUROPERATION)      (* ; "Keys changed ")
+                  (\TEDIT.SEL.OFF TSTREAM CURSEL)            (* ; "Switch to new highlighting")
+                  (\TEDIT.SET.SEL.LOOKS CURSEL NEWOPERATION)
+                  (\TEDIT.SET.SEL.LOOKS NEWSEL NEWOPERATION)
+                  (CL:WHEN (EQ NEWOPERATION 'NORMAL)
 
-                          (* ;; "Switching from e.g. COPY to NORMAL with button down. Since we didn't start out NORMAL, the original normal selection is still on the screen.  We take it down here, and establish the current (off) CURSEL as the new restoration selection")
+                      (* ;; "Switching from e.g. COPY to NORMAL with button down. Since we didn't start out NORMAL, the original normal selection is still on the screen.  We take it down here, and establish the current (off) CURSEL as the new restoration selection")
 
-                          (\TEDIT.SEL.OFF TSTREAM CURSEL)
-                          (\TEDIT.COPYSEL CURSEL (TEXTSEL TEXTOBJ)))
-                      (\TEDIT.SEL.ON TSTREAM CURSEL)
-                      (SETQ CUROPERATION NEWOPERATION)) 
+                      (\TEDIT.SEL.OFF TSTREAM CURSEL)
+                      (\TEDIT.COPYSEL CURSEL (TEXTSEL TEXTOBJ)))
+                  (\TEDIT.SEL.ON TSTREAM CURSEL)
+                  (SETQ CUROPERATION NEWOPERATION)) 
 
-                  (* ;; "Update NEWSEL each time around. Note that \TEDIT.XYTOSEL fixes but doesn't show the selection, we do that here. MOUSEREGION is set by \TEDITCURSORMOVEDFN, below.")
+              (* ;; "Update NEWSEL each time around. Note that \TEDIT.XYTOSEL fixes but doesn't show the selection, we do that here. MOUSEREGION is set by \TEDITCURSORMOVEDFN, below.")
 
-                  (if (\TEDIT.MOUSESTATE RIGHT)
-                      then                                   (* ; 
+              (if (\TEDIT.MOUSESTATE RIGHT)
+                  then                                       (* ; 
                                                            "Right button: NEWSEL extends last CURSEL")
-                           (\TEDIT.XYTOSEL X Y NEWSEL TSTREAM CUROPERATION PANE 'RIGHT CURSEL)
-                           (CL:WHEN (FGETSEL NEWSEL SET)
-                               (CL:WHEN (AND TEDIT.EXTEND.PENDING.DELETE (NOT PENDINGDEL)
-                                             (EQ CUROPERATION 'NORMAL)
-                                             (NOT (FGETTOBJ TEXTOBJ TXTREADONLY)))
+                       (\TEDIT.XYTOSEL X Y NEWSEL TSTREAM CUROPERATION PANE 'RIGHT CURSEL REGIONTYPE)
+                       (CL:WHEN (FGETSEL NEWSEL SET)
+                           (CL:WHEN (AND TEDIT.EXTEND.PENDING.DELETE (NOT PENDINGDEL)
+                                         (EQ CUROPERATION 'NORMAL)
+                                         (NOT (FGETTOBJ TEXTOBJ TXTREADONLY)))
 
-                                 (* ;; "Switch to simulation of Laurel bluependingdelete: Black, deletes on type-in. Coerce CURSEL and display for pending looks.  Otherwise, CURSEL is already BPD and stays on to avoid flicker in extending")
+                               (* ;; "Switch to simulation of Laurel bluependingdelete: Black, deletes on type-in. Coerce CURSEL and display for pending looks.  Otherwise, CURSEL is already BPD and stays on to avoid flicker in extending")
 
-                                   (\TEDIT.SEL.OFF TSTREAM CURSEL)
+                               (\TEDIT.SEL.OFF TSTREAM CURSEL)
                                                              (* ; 
                                                              "Take down old looks, change, re-show")
-                                   (\TEDIT.SET.SEL.LOOKS CURSEL 'PENDINGDEL)
-                                   (\TEDIT.SET.SEL.LOOKS NEWSEL 'PENDINGDEL)
-                                   (\TEDIT.SEL.ON TSTREAM CURSEL)
-                                   (SETQ PENDINGDEL T))
-                               [\TEDIT.EXTEND.SEL NEWSEL CURSEL TSTREAM (MEMB CUROPERATION
-                                                                              '(COPY COPYLOOKS]) 
+                               (\TEDIT.SET.SEL.LOOKS CURSEL 'PENDINGDEL)
+                               (\TEDIT.SET.SEL.LOOKS NEWSEL 'PENDINGDEL)
+                               (\TEDIT.SEL.ON TSTREAM CURSEL)
+                               (SETQ PENDINGDEL T))
+                           [\TEDIT.EXTEND.SEL NEWSEL CURSEL TSTREAM (MEMB CUROPERATION
+                                                                          '(COPY COPYLOOKS]) 
                                                              (* ; "No valid selection, go to cleanup")
-                    else (if (\TEDIT.MOUSESTATE LEFT)
-                             then                            (* ; "Left selects char/point. ")
-                                  (\TEDIT.XYTOSEL X Y NEWSEL TSTREAM CUROPERATION PANE 'LEFT CURSEL)
-                           elseif (\TEDIT.MOUSESTATE MIDDLE)
-                             then                            (* ; "Middle selects word/line")
-                                  (\TEDIT.XYTOSEL X Y NEWSEL TSTREAM CUROPERATION PANE 'MIDDLE CURSEL
-                                         ))
-                         (CL:WHEN (AND (FGETSEL NEWSEL SET)
-                                       (\TEDIT.SEL.CHANGED? NEWSEL CURSEL)
-                                       (OR (NOT (ALLBUTTONSUP))
-                                           (FGETSEL NEWSEL SELOBJ)))
+                else (if (\TEDIT.MOUSESTATE LEFT)
+                         then                                (* ; "Left selects char/point. ")
+                              (\TEDIT.XYTOSEL X Y NEWSEL TSTREAM CUROPERATION PANE 'LEFT CURSEL 
+                                     REGIONTYPE)
+                       elseif (\TEDIT.MOUSESTATE MIDDLE)
+                         then                                (* ; "Middle selects word/line")
+                              (\TEDIT.XYTOSEL X Y NEWSEL TSTREAM CUROPERATION PANE 'MIDDLE CURSEL 
+                                     REGIONTYPE))
+                     (CL:WHEN (AND (FGETSEL NEWSEL SET)
+                                   (\TEDIT.SEL.CHANGED? NEWSEL CURSEL)
+                                   (OR (NOT (ALLBUTTONSUP))
+                                       (FGETSEL NEWSEL SELOBJ)))
 
-                             (* ;; "Selection has changed while at least one button is down. Take down current CURSEL highlighting, switch to NEWSEL.  If the mouse condition is removed, the secondary selection can be lost if the mouse moves while the operation keys are still down.  But if the copy isn't done when NEWSEL picks out an object, the object will be lost. ")
+                         (* ;; "Selection has changed while at least one button is down. Take down current CURSEL highlighting, switch to NEWSEL.  If the mouse condition is removed, the secondary selection can be lost if the mouse moves while the operation keys are still down.  But if the copy isn't done when NEWSEL picks out an object, the object will be lost. ")
 
-                             (\TEDIT.SEL.OFF TSTREAM CURSEL)
-                             (\TEDIT.COPYSEL NEWSEL CURSEL)
-                             (\TEDIT.SEL.ON TSTREAM CURSEL))) 
+                         (\TEDIT.SEL.OFF TSTREAM CURSEL)
+                         (\TEDIT.COPYSEL NEWSEL CURSEL)
+                         (\TEDIT.SEL.ON TSTREAM CURSEL))) 
 
-                  (* ;; "CURSEL now matches the display and CUROPERATION.")
+              (* ;; "CURSEL now matches the display and CUROPERATION.")
  finally 
 
        (* ;; "Out of Polling loop")
@@ -1358,7 +1376,7 @@
                   'NORMAL)                                   (* ; "Restore TEXTSEL")
            (\TEDIT.SEL.ON TSTREAM)
            (RETURN))
-       (\TEDIT.BUTTONEVENTFN.DOOPERATION CURSEL CUROPERATION TSTREAM PANE PENDINGDEL TTYPROC))))])
+       (\TEDIT.BUTTONEVENTFN.DOOPERATION CURSEL CUROPERATION TSTREAM PANE PENDINGDEL TTYPROC)))])
 
 (\TEDIT.BUTTONEVENTFN.DOOPERATION
   [LAMBDA (CURSEL CUROPERATION TSTREAM PANE PENDINGDEL TTYPROC)
@@ -2393,7 +2411,8 @@
 (DEFINEQ
 
 (TEDIT.DEACTIVATE.WINDOW
-  [LAMBDA (PANE)                                             (* ; "Edited 30-May-2025 12:54 by rmk")
+  [LAMBDA (PANE)                                             (* ; "Edited 10-May-2026 18:03 by rmk")
+                                                             (* ; "Edited 30-May-2025 12:54 by rmk")
                                                              (* ; "Edited  9-May-2025 14:54 by rmk")
                                                              (* ; "Edited  6-May-2025 15:57 by rmk")
                                                              (* ; "Edited  4-May-2025 21:45 by rmk")
@@ -2455,7 +2474,10 @@
                                                        "Close the file that this window was open on.")
                (CL:UNLESS (fetch (TEXTWINDOW CLOSINGFILE) of PANEWINDOW)
                    (replace (TEXTWINDOW CLOSINGFILE) of PANEWINDOW with T)
-                   (CLOSEF? (FGETTOBJ TEXTOBJ TXTFILE))))    (* ; "Close any open menus")
+                   (CLOSEF? (FGETTOBJ TEXTOBJ TXTFILE))))
+           (CL:WHEN (FGETTOBJ TEXTOBJ MENUFLG)               (* ; 
+                                                  "This is a menu, detach it so that space closes up")
+               (FREEATTACHEDWINDOW PANEWINDOW))              (* ; " Close any open menus")
            (for MENUW MTEXTOBJ in (ATTACHEDWINDOWS PANE) when (AND (SETQ MTEXTOBJ (TEXTOBJ MENUW T))
                                                                    (FGETTOBJ MTEXTOBJ MENUFLG))
               do 
@@ -2463,12 +2485,9 @@
 
                  (FSETTOBJ MTEXTOBJ EDITFINISHEDFLG T)
                  (WINDOWPROP MENUW 'TEDITMENU NIL)
-                 (GIVE.TTY.PROCESS MENUW))
-           (\TEDIT.CLOSEPANE PANE T)                         (* ; "We're already closing")
-
-     (* ;; "Let it kill itself")
-
-           (GIVE.TTY.PROCESS PANE])
+                 (TEDIT.KILL MTEXTOBJ))
+           (\TEDIT.CLOSEPANE PANE T)
+           (TEDIT.KILL TSTREAM])
 
 (\TEDIT.RESHAPEFN
   [LAMBDA (PANE BITS OLDREGION)                              (* ; "Edited 20-Apr-2025 12:55 by rmk")
@@ -2549,7 +2568,8 @@
                else (WINDOWPROP PRIMARYPANE 'SAVED-TYPED-REGION WHOLEREGION)))])
 
 (\TEDIT.CLOSEPANE
-  [LAMBDA (PANE DONTCLOSEW)                                  (* ; "Edited  9-May-2025 00:22 by rmk")
+  [LAMBDA (PANE DONTCLOSEW)                                  (* ; "Edited 16-May-2026 13:42 by rmk")
+                                                             (* ; "Edited  9-May-2025 00:22 by rmk")
                                                              (* ; "Edited  6-May-2025 16:04 by rmk")
 
     (* ;; "This removes all of the TEdit triggers on PANE, closes its window unless DONTCLOSEW.")
@@ -2557,14 +2577,12 @@
     (LET* ((TEXTOBJ (TEXTOBJ PANE))
            (PANEWINDOW (PANEWINDOW PANE))
            (SEL (TEXTSEL TEXTOBJ)))
-          (\TEDIT.SETCARET SEL PANE TEXTOBJ 'OFF)
-          (WINDOWPROP PANEWINDOW 'PROCESS.EXITFN NIL)
-          (WINDOWPROP PANEWINDOW 'PROCESS.IDLEFN NIL)        (* ; "Restore any disarmed interrupts.")
+          (\TEDIT.SETCARET SEL PANE TEXTOBJ 'OFF)            (* ; "Restore any disarmed interrupts.")
           (DETACHWINDOW PANEWINDOW)
           (\TEDIT.UNLINKPANE PANE)
-          (for PROP in '(CURSOROUTFN CURSORMOVEDFN BUTTONEVENTFN RIGHTBUTTONFN SCROLLFN AFTERMOVEFN 
-                               REPAINTFN WINDOWENTRYFN NEWREGIONFN)
-             do (WINDOWPROP PANEWINDOW PROP NIL))
+          (for PROP in '(PROCESS.EXITFN PROCESS.IDLEFN CURSOROUTFN CURSORINFN CURSORMOVEDFN 
+                               BUTTONEVENTFN RIGHTBUTTONFN SCROLLFN AFTERMOVEFN REPAINTFN 
+                               WINDOWENTRYFN NEWREGIONFN) do (WINDOWPROP PANEWINDOW PROP NIL))
           (for PROP in '(CLOSEFN RESHAPEFN) do (WINDOWDELPROP PANEWINDOW 'CLOSEFN
                                                       (FUNCTION TEDIT.DEACTIVATE.WINDOW))
                                                (WINDOWDELPROP PANEWINDOW 'RESHAPEFN
@@ -3698,36 +3716,36 @@
 (RPAQ? TEDIT.TITLED.ICON.TEMPLATE (create TITLEDICON ICON _ TEDITICON MASK _ TEDITMASK TITLEREG _ 
                                          TEDIT.ICON.TITLE.REGION))
 (DECLARE%: DONTCOPY
-  (FILEMAP (NIL (17097 17993 (TEDIT.DEFER.UPDATES 17107 . 17991)) (17994 46195 (\TEDIT.WINDOW.CREATE 
-18004 . 24867) (\TEDIT.WINDOW.GETREGION 24869 . 30356) (\TEDIT.WINDOW.SETUP 30358 . 34865) (
-\TEDIT.MINIMAL.WINDOW.SETUP 34867 . 42827) (\TEDIT.CLEARPANE 42829 . 43546) (\TEDIT.FILL.PANES 43548
- . 46193)) (46196 69923 (\TEDIT.CURSORMOVEDFN 46206 . 51733) (\TEDIT.CURSOROUTFN 51735 . 52532) (
-\TEDIT.ACTIVE.WINDOWP 52534 . 53604) (\TEDIT.EXPANDFN 53606 . 54169) (\TEDIT.MAINW 54171 . 55451) (
-\TEDIT.MAINSTREAM 55453 . 55787) (\TEDIT.PRIMARYPANE 55789 . 56559) (\TEDIT.PANELIST 56561 . 57057) (
-\TEDIT.NEWREGIONFN 57059 . 59575) (\TEDIT.SET.WINDOW.EXTENT 59577 . 64559) (\TEDIT.SHRINK.ICONCREATE 
-64561 . 67294) (\TEDIT.SHRINKFN 67296 . 67705) (\TEDIT.PANEREGION 67707 . 69921)) (69955 105080 (
-\TEDIT.BUTTONEVENTFN 69965 . 84672) (\TEDIT.BUTTONEVENTFN.DOOPERATION 84674 . 92145) (
-\TEDIT.BUTTONEVENTFN.GETOPERATION 92147 . 93989) (\TEDIT.BUTTONEVENTFN.CURSEL.INIT 93991 . 97661) (
-\TEDIT.BUTTONEVENTFN.INACTIVE 97663 . 100093) (\TEDIT.BUTTONEVENTFN.INTITLE 100095 . 101930) (
-\TEDIT.COPYINSERTFN 101932 . 103064) (\TEDIT.FOREIGN.COPY 103066 . 105078)) (105081 122644 (
-\TEDIT.PANE.SPLIT 105091 . 109039) (\TEDIT.SPLITW 109041 . 117100) (\TEDIT.UNSPLITW 117102 . 121301) (
-\TEDIT.LINKPANES 121303 . 122066) (\TEDIT.UNLINKPANE 122068 . 122642)) (124078 124969 (TEDITWINDOWP 
-124088 . 124967)) (125006 128109 (TEDIT.GETINPUT 125016 . 127459) (\TEDIT.MAKEFILENAME 127461 . 128107
-)) (128158 136241 (TEDIT.PROMPTWINDOW 128168 . 128482) (TEDIT.PROMPTPRINT 128484 . 131451) (
-TEDIT.PROMPTCLEAR 131453 . 133288) (TEDIT.PROMPTFLASH 133290 . 134548) (\TEDIT.PROMPT.PAGEFULLFN 
-134550 . 136239)) (136479 147057 (\TEDIT.FILENAME 136489 . 137261) (\TEDIT.DEFAULT.TITLE 137263 . 
-139642) (\TEDIT.WINDOW.TITLE 139644 . 141813) (\TEDIT.LIKELY.FILENAME 141815 . 144539) (
-\TEDIT.UPDATE.TITLE 144541 . 147055)) (147100 159584 (TEDIT.DEACTIVATE.WINDOW 147110 . 152683) (
-\TEDIT.RESHAPEFN 152685 . 154770) (\TEDIT.REPAINTFN 154772 . 154996) (\TEDIT.CLOSESPLITS 154998 . 
-157443) (\TEDIT.CLOSEPANE 157445 . 159582)) (159585 202384 (\TEDIT.SCROLLFN 159595 . 161826) (
-\TEDIT.SCROLLCH.TOP 161828 . 163939) (\TEDIT.SCROLLCH.BOTTOM 163941 . 168271) (\TEDIT.SCROLLUP 168273
- . 173999) (\TEDIT.TOPLINE.YTOP 174001 . 175670) (\TEDIT.SCROLLDOWN 175672 . 182711) (
-\TEDIT.SCROLL.CARET 182713 . 185551) (\TEDIT.VISIBLECARETP 185553 . 187847) (\TEDIT.VISIBLECHARP 
-187849 . 188940) (\TEDIT.BITMAPLINES 188942 . 192862) (\TEDIT.SETPANE.TOPLINE 192864 . 193476) (
-\TEDIT.SHIFTLINES 193478 . 202382)) (202385 213254 (\TEDIT.ONSCREEN? 202395 . 206946) (
-\TEDIT.ONSCREEN.REGION 206948 . 210599) (\TEDIT.AFTERMOVEFN 210601 . 211498) (OFFSCREENP 211500 . 
-213252)) (213296 216110 (\TEDIT.PROCIDLEFN 213306 . 214966) (\TEDIT.PROCENTRYFN 214968 . 215413) (
-\TEDIT.PROCEXITFN 215415 . 216108)) (216189 229414 (\TEDIT.DOWNCARET 216199 . 216992) (
-\TEDIT.FLASHCARET 216994 . 219105) (\TEDIT.UPCARET 219107 . 220211) (TEDIT.NORMALIZECARET 220213 . 
-223431) (\TEDIT.SETCARET 223433 . 228784) (\TEDIT.CARET 228786 . 229412)))))
+  (FILEMAP (NIL (17130 18026 (TEDIT.DEFER.UPDATES 17140 . 18024)) (18027 46558 (\TEDIT.WINDOW.CREATE 
+18037 . 24900) (\TEDIT.WINDOW.GETREGION 24902 . 30495) (\TEDIT.WINDOW.SETUP 30497 . 35004) (
+\TEDIT.MINIMAL.WINDOW.SETUP 35006 . 43190) (\TEDIT.CLEARPANE 43192 . 43909) (\TEDIT.FILL.PANES 43911
+ . 46556)) (46559 71747 (\TEDIT.CURSORMOVEDFN 46569 . 52096) (\TEDIT.CURSOROUTFN 52098 . 52895) (
+\TEDIT.CURSORINFN 52897 . 54356) (\TEDIT.ACTIVE.WINDOWP 54358 . 55428) (\TEDIT.EXPANDFN 55430 . 55993)
+ (\TEDIT.MAINW 55995 . 57275) (\TEDIT.MAINSTREAM 57277 . 57611) (\TEDIT.PRIMARYPANE 57613 . 58383) (
+\TEDIT.PANELIST 58385 . 58881) (\TEDIT.NEWREGIONFN 58883 . 61399) (\TEDIT.SET.WINDOW.EXTENT 61401 . 
+66383) (\TEDIT.SHRINK.ICONCREATE 66385 . 69118) (\TEDIT.SHRINKFN 69120 . 69529) (\TEDIT.PANEREGION 
+69531 . 71745)) (71779 106619 (\TEDIT.BUTTONEVENTFN 71789 . 86211) (\TEDIT.BUTTONEVENTFN.DOOPERATION 
+86213 . 93684) (\TEDIT.BUTTONEVENTFN.GETOPERATION 93686 . 95528) (\TEDIT.BUTTONEVENTFN.CURSEL.INIT 
+95530 . 99200) (\TEDIT.BUTTONEVENTFN.INACTIVE 99202 . 101632) (\TEDIT.BUTTONEVENTFN.INTITLE 101634 . 
+103469) (\TEDIT.COPYINSERTFN 103471 . 104603) (\TEDIT.FOREIGN.COPY 104605 . 106617)) (106620 124183 (
+\TEDIT.PANE.SPLIT 106630 . 110578) (\TEDIT.SPLITW 110580 . 118639) (\TEDIT.UNSPLITW 118641 . 122840) (
+\TEDIT.LINKPANES 122842 . 123605) (\TEDIT.UNLINKPANE 123607 . 124181)) (125617 126508 (TEDITWINDOWP 
+125627 . 126506)) (126545 129648 (TEDIT.GETINPUT 126555 . 128998) (\TEDIT.MAKEFILENAME 129000 . 129646
+)) (129697 137780 (TEDIT.PROMPTWINDOW 129707 . 130021) (TEDIT.PROMPTPRINT 130023 . 132990) (
+TEDIT.PROMPTCLEAR 132992 . 134827) (TEDIT.PROMPTFLASH 134829 . 136087) (\TEDIT.PROMPT.PAGEFULLFN 
+136089 . 137778)) (138018 148596 (\TEDIT.FILENAME 138028 . 138800) (\TEDIT.DEFAULT.TITLE 138802 . 
+141181) (\TEDIT.WINDOW.TITLE 141183 . 143352) (\TEDIT.LIKELY.FILENAME 143354 . 146078) (
+\TEDIT.UPDATE.TITLE 146080 . 148594)) (148639 161431 (TEDIT.DEACTIVATE.WINDOW 148649 . 154465) (
+\TEDIT.RESHAPEFN 154467 . 156552) (\TEDIT.REPAINTFN 156554 . 156778) (\TEDIT.CLOSESPLITS 156780 . 
+159225) (\TEDIT.CLOSEPANE 159227 . 161429)) (161432 204231 (\TEDIT.SCROLLFN 161442 . 163673) (
+\TEDIT.SCROLLCH.TOP 163675 . 165786) (\TEDIT.SCROLLCH.BOTTOM 165788 . 170118) (\TEDIT.SCROLLUP 170120
+ . 175846) (\TEDIT.TOPLINE.YTOP 175848 . 177517) (\TEDIT.SCROLLDOWN 177519 . 184558) (
+\TEDIT.SCROLL.CARET 184560 . 187398) (\TEDIT.VISIBLECARETP 187400 . 189694) (\TEDIT.VISIBLECHARP 
+189696 . 190787) (\TEDIT.BITMAPLINES 190789 . 194709) (\TEDIT.SETPANE.TOPLINE 194711 . 195323) (
+\TEDIT.SHIFTLINES 195325 . 204229)) (204232 215101 (\TEDIT.ONSCREEN? 204242 . 208793) (
+\TEDIT.ONSCREEN.REGION 208795 . 212446) (\TEDIT.AFTERMOVEFN 212448 . 213345) (OFFSCREENP 213347 . 
+215099)) (215143 217957 (\TEDIT.PROCIDLEFN 215153 . 216813) (\TEDIT.PROCENTRYFN 216815 . 217260) (
+\TEDIT.PROCEXITFN 217262 . 217955)) (218036 231261 (\TEDIT.DOWNCARET 218046 . 218839) (
+\TEDIT.FLASHCARET 218841 . 220952) (\TEDIT.UPCARET 220954 . 222058) (TEDIT.NORMALIZECARET 222060 . 
+225278) (\TEDIT.SETCARET 225280 . 230631) (\TEDIT.CARET 230633 . 231259)))))
 STOP
diff --git a/library/tedit/TEDIT-WINDOW.LCOM b/library/tedit/TEDIT-WINDOW.LCOM
index a8581c7f..5c271aa0 100644
Binary files a/library/tedit/TEDIT-WINDOW.LCOM and b/library/tedit/TEDIT-WINDOW.LCOM differ
