diff --git a/library/tedit/TEDIT-BUTTONS b/library/tedit/TEDIT-BUTTONS
index 2f00fe35..f015ff00 100644
--- a/library/tedit/TEDIT-BUTTONS
+++ b/library/tedit/TEDIT-BUTTONS
@@ -1,12 +1,12 @@
 (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
 
-(FILECREATED "30-Apr-2025 14:09:18" {WMEDLEY}<library>tedit>TEDIT-BUTTONS.;228 125393 
+(FILECREATED "19-Oct-2025 10:44:18" {WMEDLEY}<library>TEDIT>TEDIT-BUTTONS.;229 125526 
 
       :EDIT-BY rmk
 
-      :CHANGES-TO (FNS MB.NWAY.ADDITEM MB.NWAY.CREATE MB.NWAY.SETSTATEFN MB.NWAY.SELECT)
+      :CHANGES-TO (FNS MB.ADD)
 
-      :PREVIOUS-DATE "14-Apr-2025 23:50:23" {WMEDLEY}<library>tedit>TEDIT-BUTTONS.;226)
+      :PREVIOUS-DATE "30-Apr-2025 14:09:18" {WMEDLEY}<library>TEDIT>TEDIT-BUTTONS.;228)
 
 
 (PRETTYCOMPRINT TEDIT-BUTTONSCOMS)
@@ -67,14 +67,16 @@
 (DEFINEQ
 
 (MB.ADD
-  [LAMBDA (MENUDESC MENUTSTREAM WHERE INCREMENTALUPDATES)    (* ; "Edited  6-Apr-2025 14:35 by rmk")
+  [LAMBDA (MENUDESC MENUTSTREAM WHERE INCREMENTALUPDATES MAINTSTREAM)
+                                                             (* ; "Edited 19-Oct-2025 10:22 by rmk")
+                                                             (* ; "Edited  6-Apr-2025 14:35 by rmk")
                                                              (* ; "Edited  5-Jan-2025 11:36 by rmk")
                                                              (* ; "Edited 22-Oct-2024 09:16 by rmk")
                                                              (* ; "Edited 21-Oct-2024 00:26 by rmk")
                                                              (* ; "Edited 18-Oct-2024 13:49 by rmk")
                                                              (* ; "Edited  6-Oct-2024 15:25 by rmk")
                                                              (* ; "Edited 24-Aug-2024 21:08 by rmk")
-    (DECLARE (SPECVARS MENUTSTREAM))
+    (DECLARE (SPECVARS MENUTSTREAM MAINTSTREAM))
     (SETQ MENUTSTREAM (TEXTSTREAM MENUTSTREAM))              (* ; "Edited 22-Aug-2024 11:10 by rmk")
 
     (* ;; "MENUDESC is a Tedit menu specification, a list of items describing one or more elements to be inserted in TSTREAM after WHERE. ")
@@ -1969,25 +1971,25 @@
 (MB.FIELD.INIT)
 )
 (DECLARE%: DONTCOPY
-  (FILEMAP (NIL (3279 19224 (MB.ADD 3289 . 9810) (MB.DELETE 9812 . 10186) (MB.GET 10188 . 16958) (
-MB.GET.MBARG 16960 . 18629) (TEDIT.BACKTOMAIN 18631 . 19222)) (19268 39204 (MB.BUTTONEVENTINFN 19278
- . 20846) (MB.DISPLAYFN 20848 . 22907) (MB.SETIMAGE 22909 . 24077) (MB.SIZEFN 24079 . 25627) (
-MB.WHENOPERATEDONFN 25629 . 27578) (MB.COPYFN 27580 . 28038) (MB.GETFN 28040 . 29001) (MB.PUTFN 29003
- . 30103) (MB.SHOWSELFN 30105 . 31614) (MB.CREATE 31616 . 35639) (MB.CHANGENAME 35641 . 36123) (
-MB.INIT 36125 . 37586) (MB.TRACK.UNTIL 37588 . 38283) (MB.DON'T 38285 . 38581) (MB.SPEC.REMAINDER 
-38583 . 39202)) (39366 49371 (MB.3STATE.CREATE 39376 . 40240) (MB.3STATE.DISPLAYFN 40242 . 41228) (
-MB.3STATE.SHOWSELFN 41230 . 43541) (MB.3STATE.INIT 43543 . 44954) (MB.3STATE.SETSTATEFN 44956 . 45614)
- (MB.3STATE.BUTTONEVENTINFN 45616 . 49369)) (49526 80622 (MB.NWAY.CREATE 49536 . 55719) (
-MB.NWAY.DISPLAYFN 55721 . 56584) (MB.NWAY.WHENOPERATEDONFN 56586 . 58776) (MB.NWAY.SIZEFN 58778 . 
-62714) (MB.NWAY.SELECT 62716 . 66286) (MB.NWAY.BUTTONEVENTINFN 66288 . 69500) (MB.NWAY.NEWMENUBUTTON 
-69502 . 70214) (MB.NWAY.COPYFN 70216 . 71183) (MB.NWAY.INIT 71185 . 72676) (MB.NWAY.ARRANGEBUTTONS 
-72678 . 74649) (MB.NWAY.ADDITEM 74651 . 78800) (MB.NWAY.FINDSUBOBJ 78802 . 79316) (MB.NWAY.SETSTATEFN 
-79318 . 80620)) (80701 92700 (MB.TOGGLE.CREATE 80711 . 81706) (MB.TOGGLE.DISPLAYFN 81708 . 83191) (
-MB.TOGGLE.INIT 83193 . 84992) (MB.SET.TOGGLE 84994 . 86195) (MB.TOGGLE.SETSTATEFN 86197 . 87037) (
-MB.TOGGLE.BUTTONEVENTINFN 87039 . 91355) (MB.TOGGLE.WHENOPERATEDONFN 91357 . 92698)) (92781 125314 (
-MB.FIELD.CREATE 92791 . 98242) (MB.FIELD.DISPLAYFN 98244 . 99035) (MB.FIELD.IMAGEBOXFN 99037 . 100519)
- (MB.FIELD.PREFIXCREATE 100521 . 104457) (MB.FIELD.SUFFIXCREATE 104459 . 106119) (MB.FIELD.INIT 106121
- . 107888) (MB.FIELD.WHENOPERATEDONFN 107890 . 109161) (MB.FIELD.GETSTATEFN 109163 . 113097) (
-MB.FIELD.SETSTATEFN 113099 . 117903) (MB.FIELD.BUTTONEVENTINFN 117905 . 120210) (MB.FIELD.SIZEFN 
-120212 . 120452) (MB.FIELD.INSURETYPE 120454 . 125312)))))
+  (FILEMAP (NIL (3221 19357 (MB.ADD 3231 . 9943) (MB.DELETE 9945 . 10319) (MB.GET 10321 . 17091) (
+MB.GET.MBARG 17093 . 18762) (TEDIT.BACKTOMAIN 18764 . 19355)) (19401 39337 (MB.BUTTONEVENTINFN 19411
+ . 20979) (MB.DISPLAYFN 20981 . 23040) (MB.SETIMAGE 23042 . 24210) (MB.SIZEFN 24212 . 25760) (
+MB.WHENOPERATEDONFN 25762 . 27711) (MB.COPYFN 27713 . 28171) (MB.GETFN 28173 . 29134) (MB.PUTFN 29136
+ . 30236) (MB.SHOWSELFN 30238 . 31747) (MB.CREATE 31749 . 35772) (MB.CHANGENAME 35774 . 36256) (
+MB.INIT 36258 . 37719) (MB.TRACK.UNTIL 37721 . 38416) (MB.DON'T 38418 . 38714) (MB.SPEC.REMAINDER 
+38716 . 39335)) (39499 49504 (MB.3STATE.CREATE 39509 . 40373) (MB.3STATE.DISPLAYFN 40375 . 41361) (
+MB.3STATE.SHOWSELFN 41363 . 43674) (MB.3STATE.INIT 43676 . 45087) (MB.3STATE.SETSTATEFN 45089 . 45747)
+ (MB.3STATE.BUTTONEVENTINFN 45749 . 49502)) (49659 80755 (MB.NWAY.CREATE 49669 . 55852) (
+MB.NWAY.DISPLAYFN 55854 . 56717) (MB.NWAY.WHENOPERATEDONFN 56719 . 58909) (MB.NWAY.SIZEFN 58911 . 
+62847) (MB.NWAY.SELECT 62849 . 66419) (MB.NWAY.BUTTONEVENTINFN 66421 . 69633) (MB.NWAY.NEWMENUBUTTON 
+69635 . 70347) (MB.NWAY.COPYFN 70349 . 71316) (MB.NWAY.INIT 71318 . 72809) (MB.NWAY.ARRANGEBUTTONS 
+72811 . 74782) (MB.NWAY.ADDITEM 74784 . 78933) (MB.NWAY.FINDSUBOBJ 78935 . 79449) (MB.NWAY.SETSTATEFN 
+79451 . 80753)) (80834 92833 (MB.TOGGLE.CREATE 80844 . 81839) (MB.TOGGLE.DISPLAYFN 81841 . 83324) (
+MB.TOGGLE.INIT 83326 . 85125) (MB.SET.TOGGLE 85127 . 86328) (MB.TOGGLE.SETSTATEFN 86330 . 87170) (
+MB.TOGGLE.BUTTONEVENTINFN 87172 . 91488) (MB.TOGGLE.WHENOPERATEDONFN 91490 . 92831)) (92914 125447 (
+MB.FIELD.CREATE 92924 . 98375) (MB.FIELD.DISPLAYFN 98377 . 99168) (MB.FIELD.IMAGEBOXFN 99170 . 100652)
+ (MB.FIELD.PREFIXCREATE 100654 . 104590) (MB.FIELD.SUFFIXCREATE 104592 . 106252) (MB.FIELD.INIT 106254
+ . 108021) (MB.FIELD.WHENOPERATEDONFN 108023 . 109294) (MB.FIELD.GETSTATEFN 109296 . 113230) (
+MB.FIELD.SETSTATEFN 113232 . 118036) (MB.FIELD.BUTTONEVENTINFN 118038 . 120343) (MB.FIELD.SIZEFN 
+120345 . 120585) (MB.FIELD.INSURETYPE 120587 . 125445)))))
 STOP
diff --git a/library/tedit/TEDIT-BUTTONS.LCOM b/library/tedit/TEDIT-BUTTONS.LCOM
index 3b2a83e0..5fd32581 100644
Binary files a/library/tedit/TEDIT-BUTTONS.LCOM and b/library/tedit/TEDIT-BUTTONS.LCOM differ
diff --git a/library/tedit/TEDIT-MENU b/library/tedit/TEDIT-MENU
index f6075e5d..cc340649 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 "10-Sep-2025 17:08:43" {WMEDLEY}<library>TEDIT>TEDIT-MENU.;492 178438 
+(FILECREATED "22-Oct-2025 12:55:36" {WMEDLEY}<library>TEDIT>TEDIT-MENU.;498 183397 
 
       :EDIT-BY rmk
 
-      :CHANGES-TO (VARS TEDIT-MENUCOMS)
+      :CHANGES-TO (FNS MARGINBAR.NEUTRALIZE \TEDIT.PARALOOKS.TO.MARBAR)
 
-      :PREVIOUS-DATE "28-Jul-2025 23:26:01" {WMEDLEY}<library>TEDIT>TEDIT-MENU.;491)
+      :PREVIOUS-DATE "19-Oct-2025 15:14:00" {WMEDLEY}<library>TEDIT>TEDIT-MENU.;496)
 
 
 (PRETTYCOMPRINT TEDIT-MENUCOMS)
@@ -59,7 +59,7 @@
 
                                                              (* ; "PARAMENU")
         (FNS \TEDIT.PARAMENU.CREATE \TEDIT.PARAMENU.START \TEDIT.APPLY.PARALOOKS 
-             \TEDIT.SHOW.PARALOOKS \TEDIT.PARAMENU.FILLIN)
+             \TEDIT.SHOW.PARALOOKS \TEDIT.PARAMENU.FILLIN \TEDIT.PARAMENU.RESHAPEFN)
         
         (* ;; "")
 
@@ -95,7 +95,7 @@
 (DECLARE%: DOEVAL@COMPILE DONTCOPY 
 (DECLARE%: EVAL@COMPILE
 
-(RECORD MARGINBAR (MARL1 MARLN MARR MARTABS MARUNIT MARTABTYPE)
+(RECORD MARGINBAR (MARL1 MARLN MARR MARTABS MARUNIT MARTABTYPE MARBARWIDTH)
                   [TYPE? (AND (IMAGEOBJP DATUM)
                               (EQ (IMAGEOBJPROP DATUM 'DISPLAYFN)
                                   'MB.MARGINBAR.DISPLAYFN])
@@ -511,7 +511,9 @@
                                     (MB.MARGINBAR.SHOWTAB W TAB UNIT 'PAINT])
 
 (MARGINBAR.CREATE
-  [LAMBDA (MARL1 MARLN MARR MARTABS MARUNIT MARTABTYPE)      (* ; "Edited 29-Sep-2024 12:53 by rmk")
+  [LAMBDA (MARL1 MARLN MARR MARTABS MARUNIT MARTABTYPE MAINTSTREAM/WIDTH)
+                                                             (* ; "Edited 19-Oct-2025 15:13 by rmk")
+                                                             (* ; "Edited 29-Sep-2024 12:53 by rmk")
                                                              (* ; "Edited  4-Aug-2024 22:36 by rmk")
                                                              (* ; "Edited 29-Jul-2024 10:13 by rmk")
                                                              (* ; "Edited 28-Jul-2024 09:18 by rmk")
@@ -519,10 +521,16 @@
                                                              (* ; "Edited 22-Jul-2024 11:54 by rmk")
                                                             (* ; "Edited 12-Jun-90 18:59 by mitani")
 
-    (* ;; "Create an instance of the margin-setting ruler for TEdit's use.")
+    (* ;; "Create an instance of the margin-setting ruler for TEdit's use. ")
 
     (PROG ((BOX (create IMAGEBOX
-                       XSIZE _ 1008
+                       XSIZE _ (IDIFFERENCE (OR (FIXP MAINTSTREAM/WIDTH)
+                                                (AND MAINTSTREAM/WIDTH (\TEDIT.PRIMARYPANE 
+                                                                              MAINTSTREAM/WIDTH)
+                                                     (PANEWIDTH (\TEDIT.PRIMARYPANE MAINTSTREAM/WIDTH
+                                                                       )))
+                                                SCREENWIDTH)
+                                      18)
                        YSIZE _ 62
                        YDESC _ 0
                        XKERN _ 4))
@@ -535,7 +543,8 @@
                                    MARR _ MARR
                                    MARTABS _ MARTABS
                                    MARUNIT _ MARUNIT
-                                   MARTABTYPE _ MARTABTYPE))
+                                   MARTABTYPE _ MARTABTYPE
+                                   MARBARWIDTH _ (fetch (IMAGEBOX XSIZE) of BOX)))
                   MARGINBARIMAGEFNS))                        (* ; 
                "Create an IMAGEOBJ, containing an instance of the record to hold margin and tab info")
           (SETQ BITMAP (BITMAPCREATE (fetch XSIZE of BOX)
@@ -850,13 +859,15 @@
     PC])
 
 (MARGINBAR.NEUTRALIZE
-  [LAMBDA (OBJ)                                              (* ; "Edited 29-Jul-2024 12:14 by rmk")
+  [LAMBDA (OBJ)                                              (* ; "Edited 22-Oct-2025 12:55 by rmk")
+                                                             (* ; "Edited 29-Jul-2024 12:14 by rmk")
 
     (* ;; "Neutralizes the settings of the marginbar")
 
     (create MARGINBAR smashing (IMAGEOBJPROP OBJ 'OBJECTDATUM)
                             MARL1 _ -0.5 MARLN _ -0.5 MARR _ -39.5 MARTABS _ 'NEUTRAL MARUNIT _ 12 
-                            MARTABTYPE _ NIL])
+                            MARTABTYPE _ NIL MARBARWIDTH _ (fetch (MARGINBAR MARBARWIDTH)
+                                                              of (IMAGEOBJPROP OBJ 'OBJECTDATUM])
 
 (MARGINBAR.LOOKS
   [LAMBDA (OBJ DOTTEDLEADER)                                 (* ; "Edited 20-Oct-2024 15:27 by rmk")
@@ -913,13 +924,14 @@
           LOOKS])
 
 (MB.MARGINBAR.SIZEFN
-  [LAMBDA (OBJ)                                              (* ; "Edited  3-Dec-2024 20:03 by rmk")
+  [LAMBDA (OBJ)                                              (* ; "Edited 19-Oct-2025 09:47 by rmk")
+                                                             (* ; "Edited  3-Dec-2024 20:03 by rmk")
                                                              (* jds " 5-Sep-84 14:10")
 
     (* ;; "YDESC is 2 so that selecting the bar and highlighting doesn't wipe out the bottom line. Although you shouldn't be able to select it")
 
     (LET ((BOX (create IMAGEBOX
-                      XSIZE _ 1008
+                      XSIZE _ (fetch (MARGINBAR MARBARWIDTH) of (IMAGEOBJPROP OBJ 'OBJECTDATUM))
                       YSIZE _ 62
                       YDESC _ 2
                       XKERN _ 4)))
@@ -1070,7 +1082,8 @@
                                    'MarginRuler])
 
 (\TEDIT.PARALOOKS.TO.MARBAR
-  [LAMBDA (PARALOOKS UNIT)                                   (* ; "Edited 19-Feb-2025 13:25 by rmk")
+  [LAMBDA (PARALOOKS UNIT)                                   (* ; "Edited 22-Oct-2025 12:29 by rmk")
+                                                             (* ; "Edited 19-Feb-2025 13:25 by rmk")
                                                              (* ; "Edited  8-Feb-2025 21:08 by rmk")
                                                              (* ; "Edited  4-Aug-2024 22:50 by rmk")
 
@@ -1088,7 +1101,8 @@
            MARUNIT _ UNIT
            MARTABS _ (for TAB in (FGETPLOOKS PARALOOKS FMTTABS)
                         collect (create TAB using TAB TABX _ (QUOTIENT (fetch (TAB TABX) of TAB)
-                                                                    UNIT])
+                                                                    UNIT)))
+           MARBARWIDTH _ (FGETPLOOKS PARALOOKS RIGHTMAR])
 )
 
 (RPAQQ \TEDIT.LEFTTAB #*(10 8)B@@@B@@@G@@@JH@@B@@@B@@@CN@@@@@@)
@@ -1247,7 +1261,8 @@
 (DEFINEQ
 
 (\TEDIT.MENU.CREATE
-  [LAMBDA (MENUDESC MENUPROPS)                               (* ; "Edited 17-Dec-2024 08:53 by rmk")
+  [LAMBDA (MENUDESC MENUPROPS MAINTSTREAM)                   (* ; "Edited 19-Oct-2025 10:36 by rmk")
+                                                             (* ; "Edited 17-Dec-2024 08:53 by rmk")
                                                              (* ; "Edited 22-Aug-2024 11:09 by rmk")
                                                              (* ; "Edited 21-Aug-2024 09:54 by rmk")
                                                              (* ; "Edited 14-Aug-2024 09:40 by rmk")
@@ -1263,7 +1278,7 @@
     (* ;; "Create the TEXTSTREAM for a menu, given a menu description.  That stream is marked as a menu and passed to \TEDIT.MENU.START to get the menu up on screen")
 
     (LET [(MENUTSTREAM (OPENTEXTSTREAM NIL NIL NIL NIL (OR MENUPROPS '(FONT (MODERN 10]
-         (MB.ADD MENUDESC MENUTSTREAM)
+         (MB.ADD MENUDESC MENUTSTREAM NIL NIL MAINTSTREAM)
          (SETSEL (TEXTSEL (GETTSTR MENUTSTREAM TEXTOBJ))
                 SET NIL)
          (SETTOBJ (GETTSTR MENUTSTREAM TEXTOBJ)
@@ -1663,7 +1678,8 @@
 (DEFINEQ
 
 (\TEDIT.PARAMENU.CREATE
-  [LAMBDA NIL                                                (* ; "Edited 13-Jul-2025 22:35 by rmk")
+  [LAMBDA (MAINTSTREAM)                                      (* ; "Edited 19-Oct-2025 15:12 by rmk")
+                                                             (* ; "Edited 13-Jul-2025 22:35 by rmk")
                                                              (* ; "Edited  7-Jan-2025 15:48 by rmk")
                                                              (* ; "Edited  8-Nov-2024 08:35 by rmk")
                                                              (* ; "Edited 20-Oct-2024 23:46 by rmk")
@@ -1680,7 +1696,7 @@
                                                              (* ; "Edited 27-Jul-2024 10:18 by rmk")
                                                              (* jds " 2-Aug-84 15:32")
 
-    (* ;; "Creates the TEdit Expanded Paragraph Menu. (PROGN to suppress %"value of comment used? compile-time messages.)")
+    (* ;; "Creates the TEdit Expanded Paragraph Menu for MAINTSTREAM. (PROGN to suppress %"value of comment used? compile-time messages.)")
 
     (PROGN 
            (* ;; "Hack so Masterscope knows that these otherwise quoted functions are here.")
@@ -1689,88 +1705,97 @@
            (FUNCTION \TEDIT.SHOW.PARALOOKS)
            (FUNCTION \TEDIT.MENU.NEUTRALIZE)
            (FUNCTION \TEDIT.TABTYPE.SET)
-           (FUNCTION PRINTERTYPE))
-    (\TEDIT.MENU.CREATE `((ACTION (LABEL APPLY)
-                                 (IGNORE T)
-                                 (SELECTFN \TEDIT.APPLY.PARALOOKS))
-                          3
-                          (ACTION (LABEL SHOW)
-                                 (IGNORE T)
-                                 (SELECTFN \TEDIT.SHOW.PARALOOKS))
-                          3
-                          (ACTION (LABEL NEUTRAL)
-                                 (IGNORE T)
-                                 (SELECTFN \TEDIT.MENU.NEUTRALIZE))
-                          EOL
-                          (NWAY (IDENTIFIER QUAD)
-                                (BUTTONS (Left Right Centered Justified))
-                                (INITSTATE OFF))
-                          TAB
-                          (3STATE (IDENTIFIER TYPE)
-                                 (LABEL "Page Heading"))
-                          2
-                          (FIELD (IDENTIFIER SUBTYPE)
-                                 (PRELABEL "type")
-                                 (FIELDTYPE SYMBOL))
-                          EOL
-                          (FIELD (IDENTIFIER LINELEADING)
-                                 (PRELABEL "Line leading")
-                                 (POSTLABEL "pts")
-                                 (FIELDTYPE NUMBER)
-                                 (LABELFONT (HELVETICA 8)))
-                          (FIELD (PRELABEL "   Para leading")
-                                 (POSTLABEL "pts")
-                                 (IDENTIFIER PARALEADING)
-                                 (FIELDTYPE NUMBER)
-                                 (LABELFONT (HELVETICA 8)))
-                          (FIELD (IDENTIFIER SPECIALX)
-                                 (PRELABEL "    Special Locn: X")
-                                 (POSTLABEL "picas")
-                                 (FIELDTYPE PICAS)
-                                 (LABELFONT (HELVETICA 8)))
-                          (FIELD (IDENTIFIER SPECIALY)
-                                 (PRELABEL "  Y")
-                                 (POSTLABEL "picas")
-                                 (FIELDTYPE PICAS)
-                                 (LABELFONT (HELVETICA 8)))
-                          EOL
-                          (TEXT (STRING "New Page:  ")
-                                (FONT (HELVETICA 8)))
-                          (3STATE (IDENTIFIER NEWPAGEBEFORE)
-                                 (LABEL "Before"))
-                          2
-                          (3STATE (IDENTIFIER NEWPAGEAFTER)
-                                 (LABEL "After"))
-                          4
-                          (3STATE (IDENTIFIER HEADINGKEEP)
-                                 (LABEL "Keep heading"))
-                          (TEXT (STRING "      Display mode: ")
-                                (FONT (HELVETICA 8)))
-                          (3STATE (LABEL "Hardcopy"))        (* (FIELD (IDENTIFIER PRINTFILETYPE)
+           (FUNCTION PRINTERTYPE)
+           (FUNCTION \TEDIT.PARAMENU.RESHAPEFN))
+    (LET (MENUTSTREAM)
+         (SETQ MENUTSTREAM (\TEDIT.MENU.CREATE `((ACTION (LABEL APPLY)
+                                                        (IGNORE T)
+                                                        (SELECTFN \TEDIT.APPLY.PARALOOKS))
+                                                 3
+                                                 (ACTION (LABEL SHOW)
+                                                        (IGNORE T)
+                                                        (SELECTFN \TEDIT.SHOW.PARALOOKS))
+                                                 3
+                                                 (ACTION (LABEL NEUTRAL)
+                                                        (IGNORE T)
+                                                        (SELECTFN \TEDIT.MENU.NEUTRALIZE))
+                                                 EOL
+                                                 (NWAY (IDENTIFIER QUAD)
+                                                       (BUTTONS (Left Right Centered Justified))
+                                                       (INITSTATE OFF))
+                                                 TAB
+                                                 (3STATE (IDENTIFIER TYPE)
+                                                        (LABEL "Page Heading"))
+                                                 2
+                                                 (FIELD (IDENTIFIER SUBTYPE)
+                                                        (PRELABEL "type")
+                                                        (FIELDTYPE SYMBOL))
+                                                 EOL
+                                                 (FIELD (IDENTIFIER LINELEADING)
+                                                        (PRELABEL "Line leading")
+                                                        (POSTLABEL "pts")
+                                                        (FIELDTYPE NUMBER)
+                                                        (LABELFONT (HELVETICA 8)))
+                                                 (FIELD (PRELABEL "   Para leading")
+                                                        (POSTLABEL "pts")
+                                                        (IDENTIFIER PARALEADING)
+                                                        (FIELDTYPE NUMBER)
+                                                        (LABELFONT (HELVETICA 8)))
+                                                 (FIELD (IDENTIFIER SPECIALX)
+                                                        (PRELABEL "    Special Locn: X")
+                                                        (POSTLABEL "picas")
+                                                        (FIELDTYPE PICAS)
+                                                        (LABELFONT (HELVETICA 8)))
+                                                 (FIELD (IDENTIFIER SPECIALY)
+                                                        (PRELABEL "  Y")
+                                                        (POSTLABEL "picas")
+                                                        (FIELDTYPE PICAS)
+                                                        (LABELFONT (HELVETICA 8)))
+                                                 EOL
+                                                 (TEXT (STRING "New Page:  ")
+                                                       (FONT (HELVETICA 8)))
+                                                 (3STATE (IDENTIFIER NEWPAGEBEFORE)
+                                                        (LABEL "Before"))
+                                                 2
+                                                 (3STATE (IDENTIFIER NEWPAGEAFTER)
+                                                        (LABEL "After"))
+                                                 4
+                                                 (3STATE (IDENTIFIER HEADINGKEEP)
+                                                        (LABEL "Keep heading"))
+                                                 (TEXT (STRING "      Display mode: ")
+                                                       (FONT (HELVETICA 8)))
+                                                 (3STATE (LABEL "Hardcopy"))
+                                                             (* (FIELD (IDENTIFIER PRINTFILETYPE)
                                                              (FIELDTYPE SYMBOL) (INITSTATE
                                                              (\, (PRINTERTYPE)))))
-                          4 EOL (TEXT (STRING "Tab Type:  ")
-                                      (FONT (HELVETICA 8)))
-                          (NWAY (IDENTIFIER TABTYPE)
-                                (BUTTONS (Left Right Centered Decimal))
-                                (IGNORE T))
-                          3
-                          (TOGGLE (IDENTIFIER DOTTEDLEADER)
-                                 (LABEL "Dotted Leader")
-                                 (IGNORE T))
-                          (FIELD (IDENTIFIER DEFAULTTAB)
-                                 (PRELABEL "     Default Tab:")
-                                 (POSTLABEL "pts")
-                                 (FIELDTYPE NUMBER)
-                                 (LABELFONT (HELVETICA 8)))
-                          EOL
-                          ((PROGN (TEDIT.INSERT.OBJECT (MARGINBAR.CREATE -0.5 -0.5 -39.5 NIL 12)
-                                         MENUTSTREAM CH# '(PROTECTED OFF))
-                                  1))
-                          EOL])
+                                                 4 EOL (TEXT (STRING "Tab Type:  ")
+                                                             (FONT (HELVETICA 8)))
+                                                 (NWAY (IDENTIFIER TABTYPE)
+                                                       (BUTTONS (Left Right Centered Decimal))
+                                                       (IGNORE T))
+                                                 3
+                                                 (TOGGLE (IDENTIFIER DOTTEDLEADER)
+                                                        (LABEL "Dotted Leader")
+                                                        (IGNORE T))
+                                                 (FIELD (IDENTIFIER DEFAULTTAB)
+                                                        (PRELABEL "     Default Tab:")
+                                                        (POSTLABEL "pts")
+                                                        (FIELDTYPE NUMBER)
+                                                        (LABELFONT (HELVETICA 8)))
+                                                 EOL
+                                                 ((PROGN (TEDIT.INSERT.OBJECT (MARGINBAR.CREATE
+                                                                               -0.5 -0.5 -39.5 NIL 12
+                                                                               NIL MAINTSTREAM)
+                                                                MENUTSTREAM CH# '(PROTECTED OFF))
+                                                         1))
+                                                 EOL)
+                                  NIL MAINTSTREAM))
+         [PUTTEXTPROP MENUTSTREAM 'WINDOWPROPS `(RESHAPEFN (\TEDIT.PARAMENU.RESHAPEFN]
+         MENUTSTREAM])
 
 (\TEDIT.PARAMENU.START
-  [LAMBDA (TSTREAM)                                          (* ; "Edited 28-May-2025 23:45 by rmk")
+  [LAMBDA (MAINTSTREAM)                                      (* ; "Edited 19-Oct-2025 10:29 by rmk")
+                                                             (* ; "Edited 28-May-2025 23:45 by rmk")
                                                              (* ; "Edited 14-Mar-2025 15:42 by rmk")
                                                              (* ; "Edited  7-Jan-2025 15:36 by rmk")
                                                              (* ; "Edited 27-Jul-2024 00:06 by rmk")
@@ -1778,9 +1803,9 @@
                                                              (* ; "Edited 27-Feb-2024 07:53 by rmk")
                                                              (* ; "Edited 19-Sep-2023 08:51 by rmk")
                                                              (* ; "Edited 20-Aug-87 16:51 by jds")
-    (CL:UNLESS (\TEDIT.MENU.OPEN? "Paragraph-Looks Menu" TSTREAM)
-        (\TEDIT.MENU.START (\TEDIT.PARAMENU.CREATE)
-               TSTREAM "Paragraph-Looks Menu" (HEIGHTIFWINDOW 141 T)
+    (CL:UNLESS (\TEDIT.MENU.OPEN? "Paragraph-Looks Menu" MAINTSTREAM)
+        (\TEDIT.MENU.START (\TEDIT.PARAMENU.CREATE MAINTSTREAM)
+               MAINTSTREAM "Paragraph-Looks Menu" (HEIGHTIFWINDOW 141 T)
                'PARALOOKS))])
 
 (\TEDIT.APPLY.PARALOOKS
@@ -1895,6 +1920,21 @@
           (CL:WHEN SETSTATEFN
               (SETQ PC (APPLY* SETSTATEFN PC VAL MENUSTREAM))
               (TEDIT.OBJECT.CHANGED MENUSTREAM OBJ))])
+
+(\TEDIT.PARAMENU.RESHAPEFN
+  [LAMBDA (PANE BITS OLDREGION)                              (* ; "Edited 19-Oct-2025 14:18 by rmk")
+
+    (* ;; "The marginbar's width may change when the parawindow is reshaped.  If PANE is wider than the previous width, extend the margin bar.")
+
+    (LET [(PC (MB.GET 'MARGINBAR PANE 'STARTPC]
+         (CL:WHEN [AND PC (IGREATERP (PANEWIDTH PANE)
+                                 (fetch (MARGINBAR MARBARWIDTH) of (IMAGEOBJPROP (POBJ PC)
+                                                                          'OBJECTDATUM]
+             [WITH MARGINBAR (IMAGEOBJPROP (POBJ PC)
+                                    'OBJECTDATUM)
+                   (FSETPC PC POBJ (MARGINBAR.CREATE MARL1 MARLN MARR MARTABS MARUNIT MARTABTYPE
+                                          (PANEWIDTH PANE])
+         (\TEDIT.RESHAPEFN PANE BITS OLDREGION])
 )
 
 
@@ -2867,32 +2907,32 @@
 (ADDTOVAR LAMA )
 )
 (DECLARE%: DONTCOPY
-  (FILEMAP (NIL (4902 16540 (TEDIT.ADD.MENUITEM 4912 . 7029) (TEDIT.DEFAULT.MENUFN 7031 . 13752) (
-TEDIT.REMOVE.MENUITEM 13754 . 14751) (\TEDIT.CREATEMENU 14753 . 15318) (\TEDIT.MENU.WHENHELDFN 15320
- . 16225) (\TEDIT.MENU.WHENSELECTEDFN 16227 . 16538)) (17354 63997 (DRAWMARGINSCALE 17364 . 20823) (
-MARGINBAR 20825 . 27950) (MARGINBAR.CREATE 27952 . 31371) (MB.MARGINBAR.BUTTONEVENTINFN 31373 . 39175)
- (MB.MARGINBAR.SELFN.TABS 39177 . 44417) (MB.MARGINBAR.SELFN.TABS.KIND 44419 . 45354) (
-MARGINBAR.GETSTATEFN 45356 . 49343) (MARGINBAR.SETSTATEFN 49345 . 49555) (MARGINBAR.NEUTRALIZE 49557
- . 49970) (MARGINBAR.LOOKS 49972 . 53078) (MB.MARGINBAR.SIZEFN 53080 . 53683) (MB.MARGINBAR.DISPLAYFN 
-53685 . 56746) (MDESCALE 56748 . 57288) (MSCALE 57290 . 57620) (MB.MARGINBAR.SHOWTAB 57622 . 59945) (
-MB.MARGINBAR.TABTRACK 59947 . 61332) (MARGINBAR.INIT 61334 . 62727) (\TEDIT.PARALOOKS.TO.MARBAR 62729
- . 63995)) (64822 72104 (TEDIT.MENUSTREAM 64832 . 65832) (TEDITMENUP 65834 . 66803) (\TEDIT.MENU.START
- 66805 . 71152) (\TEDIT.MENU.OPEN? 71154 . 71528) (\TEDIT.MENU.BUTTONEVENTFN 71530 . 72102)) (72423 
-80345 (\TEDIT.MENU.CREATE 72433 . 74244) (\TEDIT.MENU.PARSE 74246 . 77935) (\TEDIT.MENU.NEUTRALIZE 
-77937 . 80008) (\TEDITMENU.RECORD.UNFORMATTED 80010 . 80343)) (80411 100192 (
-\TEDIT.EXPANDEDMENU.CREATE 80421 . 85888) (\TEDIT.EXPANDEDMENU.START 85890 . 87514) (
-\TEDIT.EXPANDEDMENU.FN 87516 . 90771) (\TEDIT.EXPANDEDMENU.ACTIONFN 90773 . 100190)) (100254 116311 (
-\TEDIT.PARAMENU.CREATE 100264 . 106658) (\TEDIT.PARAMENU.START 106660 . 107785) (
-\TEDIT.APPLY.PARALOOKS 107787 . 108839) (\TEDIT.SHOW.PARALOOKS 108841 . 111558) (
-\TEDIT.PARAMENU.FILLIN 111560 . 116309)) (116516 143358 (\TEDIT.CHARMENU.CREATE 116526 . 119130) (
-\TEDIT.CHARMENU.START 119132 . 120422) (\TEDIT.CHARMENU.SPEC 120424 . 125107) (\TEDIT.CHARMENU.PARSE 
-125109 . 128277) (\TEDIT.CHARMENU.FILLIN 128279 . 132909) (\TEDIT.SHOW.CHARLOOKS 132911 . 136456) (
-\TEDIT.APPLY.CHARLOOKS 136458 . 137619) (\TEDIT.OFFSETTYPE.STATEFN 137621 . 139584) (
-\TEDIT.OTHER.STATECHANGEFN 139586 . 141231) (\TEDIT.OTHER.SELECTFN 141233 . 143356)) (143420 172478 (
-\TEDIT.PAGEMENU.CREATE 143430 . 151942) (\TEDIT.PAGEMENU.START 151944 . 152295) (\TEDIT.SHOW.PAGELOOKS
- 152297 . 154183) (\TEDIT.PAGEMENU.FILLIN 154185 . 155735) (\TEDIT.PAGEREGION.UNPARSE 155737 . 165136)
- (\TEDIT.APPLY.PAGELOOKS 165138 . 167065) (\TEDIT.CHANGE.PAGELOOKS 167067 . 171634) (
-\TEDIT.PAGEMENU.CHARLOOKS.STATEFN 171636 . 172476)) (172479 178282 (\TEDIT.PAGEMENU.CREATE.HEADINGS 
-172489 . 175301) (\TEDIT.PAGEMENU.HEADINGS.SETSTATEFN 175303 . 176728) (
-\TEDIT.PAGEMENU.HEADINGS.STATEFN 176730 . 178280)))))
+  (FILEMAP (NIL (4972 16610 (TEDIT.ADD.MENUITEM 4982 . 7099) (TEDIT.DEFAULT.MENUFN 7101 . 13822) (
+TEDIT.REMOVE.MENUITEM 13824 . 14821) (\TEDIT.CREATEMENU 14823 . 15388) (\TEDIT.MENU.WHENHELDFN 15390
+ . 16295) (\TEDIT.MENU.WHENSELECTEDFN 16297 . 16608)) (17424 65459 (DRAWMARGINSCALE 17434 . 20893) (
+MARGINBAR 20895 . 28020) (MARGINBAR.CREATE 28022 . 32220) (MB.MARGINBAR.BUTTONEVENTINFN 32222 . 40024)
+ (MB.MARGINBAR.SELFN.TABS 40026 . 45266) (MB.MARGINBAR.SELFN.TABS.KIND 45268 . 46203) (
+MARGINBAR.GETSTATEFN 46205 . 50192) (MARGINBAR.SETSTATEFN 50194 . 50404) (MARGINBAR.NEUTRALIZE 50406
+ . 51081) (MARGINBAR.LOOKS 51083 . 54189) (MB.MARGINBAR.SIZEFN 54191 . 54977) (MB.MARGINBAR.DISPLAYFN 
+54979 . 58040) (MDESCALE 58042 . 58582) (MSCALE 58584 . 58914) (MB.MARGINBAR.SHOWTAB 58916 . 61239) (
+MB.MARGINBAR.TABTRACK 61241 . 62626) (MARGINBAR.INIT 62628 . 64021) (\TEDIT.PARALOOKS.TO.MARBAR 64023
+ . 65457)) (66284 73566 (TEDIT.MENUSTREAM 66294 . 67294) (TEDITMENUP 67296 . 68265) (\TEDIT.MENU.START
+ 68267 . 72614) (\TEDIT.MENU.OPEN? 72616 . 72990) (\TEDIT.MENU.BUTTONEVENTFN 72992 . 73564)) (73885 
+81936 (\TEDIT.MENU.CREATE 73895 . 75835) (\TEDIT.MENU.PARSE 75837 . 79526) (\TEDIT.MENU.NEUTRALIZE 
+79528 . 81599) (\TEDITMENU.RECORD.UNFORMATTED 81601 . 81934)) (82002 101783 (
+\TEDIT.EXPANDEDMENU.CREATE 82012 . 87479) (\TEDIT.EXPANDEDMENU.START 87481 . 89105) (
+\TEDIT.EXPANDEDMENU.FN 89107 . 92362) (\TEDIT.EXPANDEDMENU.ACTIONFN 92364 . 101781)) (101845 121270 (
+\TEDIT.PARAMENU.CREATE 101855 . 110586) (\TEDIT.PARAMENU.START 110588 . 111842) (
+\TEDIT.APPLY.PARALOOKS 111844 . 112896) (\TEDIT.SHOW.PARALOOKS 112898 . 115615) (
+\TEDIT.PARAMENU.FILLIN 115617 . 120366) (\TEDIT.PARAMENU.RESHAPEFN 120368 . 121268)) (121475 148317 (
+\TEDIT.CHARMENU.CREATE 121485 . 124089) (\TEDIT.CHARMENU.START 124091 . 125381) (\TEDIT.CHARMENU.SPEC 
+125383 . 130066) (\TEDIT.CHARMENU.PARSE 130068 . 133236) (\TEDIT.CHARMENU.FILLIN 133238 . 137868) (
+\TEDIT.SHOW.CHARLOOKS 137870 . 141415) (\TEDIT.APPLY.CHARLOOKS 141417 . 142578) (
+\TEDIT.OFFSETTYPE.STATEFN 142580 . 144543) (\TEDIT.OTHER.STATECHANGEFN 144545 . 146190) (
+\TEDIT.OTHER.SELECTFN 146192 . 148315)) (148379 177437 (\TEDIT.PAGEMENU.CREATE 148389 . 156901) (
+\TEDIT.PAGEMENU.START 156903 . 157254) (\TEDIT.SHOW.PAGELOOKS 157256 . 159142) (\TEDIT.PAGEMENU.FILLIN
+ 159144 . 160694) (\TEDIT.PAGEREGION.UNPARSE 160696 . 170095) (\TEDIT.APPLY.PAGELOOKS 170097 . 172024)
+ (\TEDIT.CHANGE.PAGELOOKS 172026 . 176593) (\TEDIT.PAGEMENU.CHARLOOKS.STATEFN 176595 . 177435)) (
+177438 183241 (\TEDIT.PAGEMENU.CREATE.HEADINGS 177448 . 180260) (\TEDIT.PAGEMENU.HEADINGS.SETSTATEFN 
+180262 . 181687) (\TEDIT.PAGEMENU.HEADINGS.STATEFN 181689 . 183239)))))
 STOP
diff --git a/library/tedit/TEDIT-MENU.LCOM b/library/tedit/TEDIT-MENU.LCOM
index 80237952..7be47f74 100644
Binary files a/library/tedit/TEDIT-MENU.LCOM and b/library/tedit/TEDIT-MENU.LCOM differ
diff --git a/library/tedit/TEDIT-SCREEN b/library/tedit/TEDIT-SCREEN
index dbb6599d..c6bc2df1 100644
--- a/library/tedit/TEDIT-SCREEN
+++ b/library/tedit/TEDIT-SCREEN
@@ -1,13 +1,12 @@
 (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
 
-(FILECREATED " 7-Aug-2025 12:51:00" {WMEDLEY}<library>tedit>TEDIT-SCREEN.;909 186327 
+(FILECREATED "19-Oct-2025 00:07:29" {WMEDLEY}<library>TEDIT>TEDIT-SCREEN.;910 186445 
 
       :EDIT-BY rmk
 
-      :CHANGES-TO (VARS TEDIT-SCREENCOMS)
-                  (FNS \TEDIT.FORMATLINE)
+      :CHANGES-TO (FNS \TEDIT.FORMATLINE.HORIZONTAL)
 
-      :PREVIOUS-DATE "28-Jul-2025 23:23:33" {WMEDLEY}<library>tedit>TEDIT-SCREEN.;908)
+      :PREVIOUS-DATE " 7-Aug-2025 12:51:00" {WMEDLEY}<library>TEDIT>TEDIT-SCREEN.;909)
 
 
 (PRETTYCOMPRINT TEDIT-SCREENCOMS)
@@ -1294,7 +1293,8 @@
          IMAGESTREAM])
 
 (\TEDIT.FORMATLINE.HORIZONTAL
-  [LAMBDA (LINE THISLINE PREVSP SPACELEFT OVERHANG LINETYPE) (* ; "Edited 29-May-2025 15:15 by rmk")
+  [LAMBDA (LINE THISLINE PREVSP SPACELEFT OVERHANG LINETYPE) (* ; "Edited 18-Oct-2025 20:05 by rmk")
+                                                             (* ; "Edited 29-May-2025 15:15 by rmk")
                                                              (* ; "Edited 19-Feb-2025 13:35 by rmk")
                                                              (* ; "Edited  8-Feb-2025 23:37 by rmk")
                                                              (* ; "Edited 15-Mar-2024 19:35 by rmk")
@@ -1318,6 +1318,8 @@
 
     (* ;; "")
 
+    (SETQ SPACELEFT (MAX SPACELEFT 0))
+
     (* ;; "Also for HARDCOPYDISPLAY the horizontal positions (margins and character widths) are in hardcopy units.  At the end we scale them back to screen points.  ")
 
     (LET* ((PARALOOKS (FGETLD LINE LPARALOOKS))
@@ -2861,21 +2863,21 @@
                  (\TEDIT.LINE.TALLP LINE PHEIGHT))))])
 )
 (DECLARE%: DONTCOPY
-  (FILEMAP (NIL (26256 28472 (\TEDIT.LINEDESCRIPTOR.DEFPRINT 26266 . 28470)) (35926 119762 (
-\TEDIT.FORMATLINE 35936 . 71423) (\TEDIT.FORMATLINE.SETUP.PARA 71425 . 76591) (
-\TEDIT.FORMATLINE.HORIZONTAL 76593 . 81261) (\TEDIT.FORMATLINE.VERTICAL 81263 . 83714) (
-\TEDIT.FORMATLINE.JUSTIFY 83716 . 89737) (\TEDIT.FORMATLINE.TABS 89739 . 97767) (\TEDIT.SCALE.TABS 
-97769 . 98560) (\TEDIT.FORMATLINE.PURGE.SPACES 98562 . 99989) (\TEDIT.FORMATLINE.FLUSH.SOFTHYPHEN 
-99991 . 101068) (\TEDIT.FORMATLINE.EMPTY 101070 . 105890) (\TEDIT.FORMATLINE.UPDATELOOKS 105892 . 
-112073) (\TEDIT.FORMATLINE.LASTLEGAL 112075 . 115525) (\TEDIT.LINES.ABOVE 115527 . 119138) (
-\TEDIT.CHNO.TO.YTOP 119140 . 119760)) (120039 140619 (\TEDIT.DISPLAYLINE 120049 . 132559) (
-\TEDIT.DISPLAYLINE.TABS 132561 . 135365) (\TEDIT.LINECACHE 135367 . 136095) (\TEDIT.CREATE.LINECACHE 
-136097 . 136933) (\TEDIT.BLTCHAR 136935 . 139562) (\TEDIT.DIACRITIC.SHIFT 139564 . 140617)) (141234 
-186304 (\TEDIT.BACKFORMAT 141244 . 143798) (\TEDIT.PREVIOUS.LINEBREAK 143800 . 146603) (
-\TEDIT.UPDATE.LINES 146605 . 152320) (\TEDIT.PANE.CREATELINES 152322 . 154612) (
-\TEDIT.SUFFIXLINE.CREATE 154614 . 156229) (\TEDIT.LINES.BELOW 156231 . 160841) (\TEDIT.MEASURED.LINES 
-160843 . 162852) (\TEDIT.VALID.LASTCHNOS 162854 . 166630) (\TEDIT.VALID.NEXTCHNOS 166632 . 170106) (
-\TEDIT.LASTVALIDLINE 170108 . 174779) (\TEDIT.NEXTVALIDLINE 174781 . 177751) (
-\TEDIT.CLEARPANE.BELOW.LINE 177753 . 179859) (\TEDIT.INSERTLINE 179861 . 181247) (\TEDIT.LINE.BOTTOM 
-181249 . 184479) (\TEDIT.SHOW.AT.BOTTOMP 184481 . 185591) (\TEDIT.SHOW.AT.TOPP 185593 . 186302)))))
+  (FILEMAP (NIL (26225 28441 (\TEDIT.LINEDESCRIPTOR.DEFPRINT 26235 . 28439)) (35895 119880 (
+\TEDIT.FORMATLINE 35905 . 71392) (\TEDIT.FORMATLINE.SETUP.PARA 71394 . 76560) (
+\TEDIT.FORMATLINE.HORIZONTAL 76562 . 81379) (\TEDIT.FORMATLINE.VERTICAL 81381 . 83832) (
+\TEDIT.FORMATLINE.JUSTIFY 83834 . 89855) (\TEDIT.FORMATLINE.TABS 89857 . 97885) (\TEDIT.SCALE.TABS 
+97887 . 98678) (\TEDIT.FORMATLINE.PURGE.SPACES 98680 . 100107) (\TEDIT.FORMATLINE.FLUSH.SOFTHYPHEN 
+100109 . 101186) (\TEDIT.FORMATLINE.EMPTY 101188 . 106008) (\TEDIT.FORMATLINE.UPDATELOOKS 106010 . 
+112191) (\TEDIT.FORMATLINE.LASTLEGAL 112193 . 115643) (\TEDIT.LINES.ABOVE 115645 . 119256) (
+\TEDIT.CHNO.TO.YTOP 119258 . 119878)) (120157 140737 (\TEDIT.DISPLAYLINE 120167 . 132677) (
+\TEDIT.DISPLAYLINE.TABS 132679 . 135483) (\TEDIT.LINECACHE 135485 . 136213) (\TEDIT.CREATE.LINECACHE 
+136215 . 137051) (\TEDIT.BLTCHAR 137053 . 139680) (\TEDIT.DIACRITIC.SHIFT 139682 . 140735)) (141352 
+186422 (\TEDIT.BACKFORMAT 141362 . 143916) (\TEDIT.PREVIOUS.LINEBREAK 143918 . 146721) (
+\TEDIT.UPDATE.LINES 146723 . 152438) (\TEDIT.PANE.CREATELINES 152440 . 154730) (
+\TEDIT.SUFFIXLINE.CREATE 154732 . 156347) (\TEDIT.LINES.BELOW 156349 . 160959) (\TEDIT.MEASURED.LINES 
+160961 . 162970) (\TEDIT.VALID.LASTCHNOS 162972 . 166748) (\TEDIT.VALID.NEXTCHNOS 166750 . 170224) (
+\TEDIT.LASTVALIDLINE 170226 . 174897) (\TEDIT.NEXTVALIDLINE 174899 . 177869) (
+\TEDIT.CLEARPANE.BELOW.LINE 177871 . 179977) (\TEDIT.INSERTLINE 179979 . 181365) (\TEDIT.LINE.BOTTOM 
+181367 . 184597) (\TEDIT.SHOW.AT.BOTTOMP 184599 . 185709) (\TEDIT.SHOW.AT.TOPP 185711 . 186420)))))
 STOP
diff --git a/library/tedit/TEDIT-SCREEN.LCOM b/library/tedit/TEDIT-SCREEN.LCOM
index 904473e7..12e95a86 100644
Binary files a/library/tedit/TEDIT-SCREEN.LCOM and b/library/tedit/TEDIT-SCREEN.LCOM differ
diff --git a/library/tedit/TEDIT-WINDOW b/library/tedit/TEDIT-WINDOW
index f1dfb7d3..9ce843a2 100644
--- a/library/tedit/TEDIT-WINDOW
+++ b/library/tedit/TEDIT-WINDOW
@@ -1,12 +1,12 @@
 (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
 
-(FILECREATED " 5-Oct-2025 10:56:19" {WMEDLEY}<library>TEDIT>TEDIT-WINDOW.;867 229880 
+(FILECREATED "25-Oct-2025 10:33:08" {WMEDLEY}<library>TEDIT>TEDIT-WINDOW.;878 230780 
 
       :EDIT-BY rmk
 
-      :CHANGES-TO (FNS \TEDIT.SPLITW)
+      :CHANGES-TO (FNS \TEDIT.WINDOW.GETREGION)
 
-      :PREVIOUS-DATE "18-Sep-2025 23:09:24" {WMEDLEY}<library>TEDIT>TEDIT-WINDOW.;864)
+      :PREVIOUS-DATE "24-Oct-2025 09:11:52" {WMEDLEY}<library>tedit>TEDIT-WINDOW.;874)
 
 
 (PRETTYCOMPRINT TEDIT-WINDOWCOMS)
@@ -354,25 +354,19 @@
 (DEFINEQ
 
 (\TEDIT.WINDOW.CREATE
-  [LAMBDA (WINDOW TSTREAM PROPS)                             (* ; "Edited 21-Jul-2025 11:55 by rmk")
+  [LAMBDA (WINDOW TSTREAM PROPS)                             (* ; "Edited 23-Oct-2025 18:22 by rmk")
+                                                             (* ; "Edited 21-Jul-2025 11:55 by rmk")
                                                              (* ; "Edited  9-May-2025 12:11 by rmk")
                                                              (* ; "Edited 25-Apr-2025 21:24 by rmk")
-                                                             (* ; "Edited 20-Apr-2025 15:21 by rmk")
                                                              (* ; "Edited 18-Feb-2025 09:49 by rmk")
                                                              (* ; "Edited  1-Jul-2024 22:55 by rmk")
-                                                             (* ; "Edited 29-Jun-2024 23:16 by rmk")
                                                              (* ; "Edited  5-May-2024 21:54 by rmk")
                                                              (* ; "Edited 20-Mar-2024 09:57 by rmk")
                                                              (* ; "Edited 14-Jan-2024 22:13 by rmk")
                                                              (* ; "Edited 18-Dec-2023 23:01 by rmk")
                                                              (* ; "Edited 25-Nov-2023 10:37 by rmk")
                                                              (* ; "Edited 23-Oct-2023 22:11 by rmk")
-                                                             (* ; "Edited 21-Oct-2023 12:20 by rmk")
-                                                             (* ; "Edited 18-Oct-2023 09:56 by rmk")
-                                                             (* ; "Edited  1-Jan-2022 23:54 by rmk")
-                                                             (* ; "Edited 30-Dec-2021 23:00 by rmk")
-                                                             (* ; "Edited 29-Dec-2021 16:35 by rmk")
-                                                             (* ; "Edited 24-Dec-2021 19:21 by rmk")
+                                                             (* ; "Edited  1-Jan-2022 23:54 by rmk")
                                                              (* jds "23-May-85 15:19")
                                                              (* ; "Edited 27-Oct-2021 12:25 by rmk:")
 
@@ -420,7 +414,6 @@
              (SETQ REGION (if (REGIONP WINDOW)
                               then (PROG1 (COPY WINDOW)
                                           (SETQ WINDOW NIL))
-                            elseif (GRAB-TYPED-REGION REGIONTYPE)
                             else (SETQ REGION (\TEDIT.WINDOW.GETREGION TSTREAM REGIONTYPE PHEIGHT)) 
                                                              (* ; 
                                                         "We don't want the default to keep shrinking")
@@ -462,56 +455,92 @@
          WINDOW])
 
 (\TEDIT.WINDOW.GETREGION
-  [LAMBDA (TSTREAM REGIONTYPE PHEIGHT)                       (* ; "Edited 14-Apr-2025 00:05 by rmk")
+  [LAMBDA (TSTREAM REGIONTYPE PHEIGHT)                       (* ; "Edited 25-Oct-2025 10:27 by rmk")
+                                                             (* ; "Edited 19-Oct-2025 01:05 by rmk")
+                                                             (* ; "Edited 14-Apr-2025 00:05 by rmk")
                                                              (* ; "Edited 31-Mar-2025 22:43 by rmk")
                                                              (* ; "Edited 24-Mar-2025 11:29 by rmk")
                                                              (* ; "Edited 18-Mar-2025 21:52 by rmk")
                                                              (* ; "Edited 19-Feb-2025 16:48 by rmk")
                                                              (* ; "Edited 18-Feb-2025 10:09 by rmk")
     (LET ((TEXTOBJ (GETTSTR TSTREAM TEXTOBJ))
+          [WIDTHOVERHEAD (IPLUS \TEDIT.LINEREGION.WIDTH (TIMES 2 WBorder)
+                                (if (FGETTOBJ TEXTOBJ TXTNOTSPLITTABLE)
+                                    then 0
+                                  elseif (ILEQ \TEDIT.OP.WIDTH 0)
+                                    then 
+                                         (* ;; "On both sides, for symmetry")
+
+                                         \TEDIT.LINEREGION.WIDTH
+                                  else 
+                                       (* ;; 
+                       "36 to allow for some spacing between the text and the OPS area on the right.")
+
+                                       (IPLUS \TEDIT.OP.WIDTH 36]
+          [HEIGHTOVERHEAD (IPLUS PHEIGHT (ADD1 (TIMES 2 WBorder))
+                                 (FONTPROP WindowTitleDisplayStream 'HEIGHT]
           WIDTH HEIGHT)
-         (CLRPROMPT)                                         (* ; "System promptwindow")
-         (printout PROMPTWINDOW "Please specify a " (OR REGIONTYPE "Tedit")
-                " window region")
-         (CL:WHEN (TXTFILE TSTREAM)
-             (printout PROMPTWINDOW " for " 2 (GETTEXTPROP TSTREAM 'FILENAME)))
-         (TERPRI PROMPTWINDOW)
-         (if (IGREATERP (TEXTLEN TEXTOBJ)
-                    0)
-             then 
-                  (* ;; "Explict user properties covers content")
 
-                  [SETQ WIDTH (OR (GETTEXTPROP TEXTOBJ 'OPENWIDTH)
-                                  (for PARALOOKS in (FGETTOBJ TEXTOBJ TXTPARALOOKSLIST)
-                                     largest (GETPLOOKS PARALOOKS RIGHTMAR)
-                                     finally (CL:UNLESS (AND $$EXTREME (IGREATERP $$EXTREME 0))
-                                                 (SETQ $$EXTREME (TIMES 6 PTSPERINCH)))
-                                           (RETURN $$EXTREME] 
+         (* ;; "Explict properties cover content")
 
-                  (* ;; "Allow for extra stuff.  36 to allow for some spacing.")
+         [SETQ WIDTH (OR (GETTEXTPROP TEXTOBJ 'OPENWIDTH)
+                         (for PARALOOKS in (FGETTOBJ TEXTOBJ TXTPARALOOKSLIST)
+                            when (IGREATERP (GETPLOOKS PARALOOKS RIGHTMAR)
+                                        0) largest (GETPLOOKS PARALOOKS RIGHTMAR)
+                            finally (RETURN $$EXTREME]
+         (SETQ HEIGHT (GETTEXTPROP TEXTOBJ 'OPENHEIGHT))
 
-                  [add WIDTH (IPLUS \TEDIT.LINEREGION.WIDTH (ADD1 (TIMES 2 WBorder)
-                                                                  1)
-                                    (CL:IF (FGETTOBJ TEXTOBJ TXTNOTSPLITTABLE)
-                                        0
-                                        (CL:IF (EQ 0 \TEDIT.OP.WIDTH)
-                                            \TEDIT.LINEREGION.WIDTH
-                                            (IPLUS \TEDIT.OP.WIDTH 36)))]
-                  [SETQ HEIGHT (if (GETTEXTPROP TEXTOBJ 'OPENHEIGHT)
-                                 elseif (ZEROP (TEXTLEN TEXTOBJ))
-                                   then 50
-                                 else (for I L (TEXTLEN _ (TEXTLEN TEXTOBJ))
-                                           (CHNO _ 1) from 1 to 20 while (ILEQ CHNO TEXTLEN)
-                                         sum (SETQ L (\TEDIT.FORMATLINE TSTREAM CHNO))
-                                             (SETQ CHNO (FGETLD L LCHARLIM))
-                                             (FGETLD L LHEIGHT)
-                                         finally (RETURN (IPLUS $$VAL PHEIGHT (ADD1 (TIMES 2 WBorder)
-                                                                                    )
-                                                                (FONTPROP WindowTitleDisplayStream
-                                                                       'HEIGHT]
-                  (GETBOXREGION WIDTH HEIGHT)
-           else (GETREGION (IMAX 200 (ADD1 (TIMES 2 WBorder)))
-                       (IMAX 100 (ADD1 (TIMES 2 WBorder])
+         (* ;; "If still no WIDTH or HEIGHT, look at the first 20 lines")
+
+         (CL:UNLESS (AND HEIGHT WIDTH)
+             (for I L (TEXTLEN _ (TEXTLEN TEXTOBJ))
+                  (REG _ (CREATEREGION 0 0 (IDIFFERENCE SCREENWIDTH WIDTHOVERHEAD)
+                                (IDIFFERENCE SCREENHEIGHT HEIGHTOVERHEAD)))
+                  (W _ 0)
+                  (H _ 0)
+                  (CHNO _ 1) from 1 to 20 while (ILEQ CHNO TEXTLEN)
+                do 
+                   (* ;; 
+            "But we start by saying that the right margin is infinite, so we can find the true width")
+
+                   (SETQ L (\TEDIT.FORMATLINE TSTREAM CHNO NIL REG))
+                   (SETQ CHNO (FGETLD L LCHARLIM))
+                   (add H (FGETLD L LHEIGHT))
+                   (CL:UNLESS WIDTH
+                       (CL:WHEN (EQ 'LEFT (FGETPLOOKS (FGETLD L LPARALOOKS)
+                                                 QUAD))
+
+                           (* ;; 
+                           "JUSTIFIED, RIGHT and CENTERED involve right margin, which we don't know")
+
+                           (SETQ W (IMAX W (FGETLD L LXLIM)))))
+                finally (CL:UNLESS (OR WIDTH (EQ W 0))       (* ; "Maybe no lefts?")
+                            (SETQ WIDTH W))
+                      (CL:UNLESS (OR HEIGHT (EQ H 0))
+                             (SETQ HEIGHT H))))
+
+         (* ;; "Minimum sizes")
+
+         (SETQ WIDTH (IMAX 200 (OR WIDTH 0)))
+         (SETQ HEIGHT (IMAX 100 (OR HEIGHT 0)))
+
+         (* ;; "Allow for the extra stuff")
+
+         (add WIDTH WIDTHOVERHEAD)
+         (add HEIGHT HEIGHTOVERHEAD)
+         (if (GRAB-TYPED-REGION REGIONTYPE WIDTH HEIGHT 1.1)
+           else 
+                (* ;; "Maximum new sizes")
+
+                [SETQ WIDTH (IMIN WIDTH (FIXR (FTIMES SCREENWIDTH 0.9]
+                [SETQ HEIGHT (IMIN HEIGHT (FIXR (FTIMES SCREENHEIGHT 0.9]
+                (CLRPROMPT)                                  (* ; "System promptwindow")
+                (printout PROMPTWINDOW "Please specify a " (OR REGIONTYPE "Tedit")
+                       " region")
+                (CL:WHEN (TXTFILE TSTREAM)
+                    (printout PROMPTWINDOW " for " 2 (GETTEXTPROP TSTREAM 'FILENAME)))
+                (TERPRI PROMPTWINDOW)
+                (GETBOXREGION WIDTH HEIGHT])
 
 (\TEDIT.WINDOW.SETUP
   [LAMBDA (PANE TSTREAM PROPS AFTERPANE LCHAR1)              (* ; "Edited  6-May-2025 11:44 by rmk")
@@ -576,7 +605,8 @@
           (\TEDIT.SET.WINDOW.EXTENT TEXTOBJ PANE])
 
 (\TEDIT.MINIMAL.WINDOW.SETUP
-  [LAMBDA (PANEWINDOW TSTREAM PROPS)                         (* ; "Edited 20-Apr-2025 15:19 by rmk")
+  [LAMBDA (PANEWINDOW TSTREAM PROPS)                         (* ; "Edited 19-Oct-2025 14:55 by rmk")
+                                                             (* ; "Edited 20-Apr-2025 15:19 by rmk")
                                                              (* ; "Edited 30-Nov-2024 13:32 by rmk")
                                                              (* ; "Edited  4-Nov-2024 19:46 by rmk")
                                                              (* ; "Edited 26-Oct-2024 11:10 by rmk")
@@ -677,6 +707,11 @@
 
          (WINDOWADDPROP PANEWINDOW 'CLOSEFN (FUNCTION TEDIT.DEACTIVATE.WINDOW)
                 T)
+
+         (* ;; "Possible the only WINDOWPROPS client is the MARGINBAR in the paragraph menu")
+
+         (for PTAIL on (GETTEXTPROP TSTREAM 'WINDOWPROPS) do (WINDOWPROP PANEWINDOW (CAR PTAIL)
+                                                                    (CADR PTAIL)))
          PANEWINDOW])
 
 (\TEDIT.CLEARPANE
@@ -3624,36 +3659,36 @@
 (RPAQ? TEDIT.TITLED.ICON.TEMPLATE (create TITLEDICON ICON _ TEDITICON MASK _ TEDITMASK TITLEREG _ 
                                          TEDIT.ICON.TITLE.REGION))
 (DECLARE%: DONTCOPY
-  (FILEMAP (NIL (17093 17989 (TEDIT.DEFER.UPDATES 17103 . 17987)) (17990 43935 (\TEDIT.WINDOW.CREATE 
-18000 . 25330) (\TEDIT.WINDOW.GETREGION 25332 . 28822) (\TEDIT.WINDOW.SETUP 28824 . 33154) (
-\TEDIT.MINIMAL.WINDOW.SETUP 33156 . 40567) (\TEDIT.CLEARPANE 40569 . 41286) (\TEDIT.FILL.PANES 41288
- . 43933)) (43936 67637 (\TEDIT.CURSORMOVEDFN 43946 . 49556) (\TEDIT.CURSOROUTFN 49558 . 50246) (
-\TEDIT.ACTIVE.WINDOWP 50248 . 51318) (\TEDIT.EXPANDFN 51320 . 51883) (\TEDIT.MAINW 51885 . 53165) (
-\TEDIT.MAINSTREAM 53167 . 53501) (\TEDIT.PRIMARYPANE 53503 . 54273) (\TEDIT.PANELIST 54275 . 54771) (
-\TEDIT.NEWREGIONFN 54773 . 57289) (\TEDIT.SET.WINDOW.EXTENT 57291 . 62273) (\TEDIT.SHRINK.ICONCREATE 
-62275 . 65008) (\TEDIT.SHRINKFN 65010 . 65419) (\TEDIT.PANEREGION 65421 . 67635)) (67669 100715 (
-\TEDIT.BUTTONEVENTFN 67679 . 80652) (\TEDIT.BUTTONEVENTFN.DOOPERATION 80654 . 87917) (
-\TEDIT.BUTTONEVENTFN.GETOPERATION 87919 . 89761) (\TEDIT.BUTTONEVENTFN.CURSEL.INIT 89763 . 93433) (
-\TEDIT.BUTTONEVENTFN.INACTIVE 93435 . 95865) (\TEDIT.BUTTONEVENTFN.INTITLE 95867 . 97702) (
-\TEDIT.COPYINSERTFN 97704 . 98836) (\TEDIT.FOREIGN.COPY 98838 . 100713)) (100716 118279 (
-\TEDIT.PANE.SPLIT 100726 . 104674) (\TEDIT.SPLITW 104676 . 112735) (\TEDIT.UNSPLITW 112737 . 116936) (
-\TEDIT.LINKPANES 116938 . 117701) (\TEDIT.UNLINKPANE 117703 . 118277)) (119713 120604 (TEDITWINDOWP 
-119723 . 120602)) (120641 123744 (TEDIT.GETINPUT 120651 . 123094) (\TEDIT.MAKEFILENAME 123096 . 123742
-)) (123793 131443 (TEDIT.PROMPTWINDOW 123803 . 124117) (TEDIT.PROMPTPRINT 124119 . 126746) (
-TEDIT.PROMPTCLEAR 126748 . 128490) (TEDIT.PROMPTFLASH 128492 . 129750) (\TEDIT.PROMPT.PAGEFULLFN 
-129752 . 131441)) (131681 142259 (\TEDIT.FILENAME 131691 . 132463) (\TEDIT.DEFAULT.TITLE 132465 . 
-134844) (\TEDIT.WINDOW.TITLE 134846 . 137015) (\TEDIT.LIKELY.FILENAME 137017 . 139741) (
-\TEDIT.UPDATE.TITLE 139743 . 142257)) (142302 154786 (TEDIT.DEACTIVATE.WINDOW 142312 . 147885) (
-\TEDIT.RESHAPEFN 147887 . 149972) (\TEDIT.REPAINTFN 149974 . 150198) (\TEDIT.CLOSESPLITS 150200 . 
-152645) (\TEDIT.CLOSEPANE 152647 . 154784)) (154787 197586 (\TEDIT.SCROLLFN 154797 . 157028) (
-\TEDIT.SCROLLCH.TOP 157030 . 159141) (\TEDIT.SCROLLCH.BOTTOM 159143 . 163473) (\TEDIT.SCROLLUP 163475
- . 169201) (\TEDIT.TOPLINE.YTOP 169203 . 170872) (\TEDIT.SCROLLDOWN 170874 . 177913) (
-\TEDIT.SCROLL.CARET 177915 . 180753) (\TEDIT.VISIBLECARETP 180755 . 183049) (\TEDIT.VISIBLECHARP 
-183051 . 184142) (\TEDIT.BITMAPLINES 184144 . 188064) (\TEDIT.SETPANE.TOPLINE 188066 . 188678) (
-\TEDIT.SHIFTLINES 188680 . 197584)) (197587 208456 (\TEDIT.ONSCREEN? 197597 . 202148) (
-\TEDIT.ONSCREEN.REGION 202150 . 205801) (\TEDIT.AFTERMOVEFN 205803 . 206700) (OFFSCREENP 206702 . 
-208454)) (208498 211312 (\TEDIT.PROCIDLEFN 208508 . 210168) (\TEDIT.PROCENTRYFN 210170 . 210615) (
-\TEDIT.PROCEXITFN 210617 . 211310)) (211391 224616 (\TEDIT.DOWNCARET 211401 . 212194) (
-\TEDIT.FLASHCARET 212196 . 214307) (\TEDIT.UPCARET 214309 . 215413) (TEDIT.NORMALIZECARET 215415 . 
-218633) (\TEDIT.SETCARET 218635 . 223986) (\TEDIT.CARET 223988 . 224614)))))
+  (FILEMAP (NIL (17103 17999 (TEDIT.DEFER.UPDATES 17113 . 17997)) (18000 44835 (\TEDIT.WINDOW.CREATE 
+18010 . 24616) (\TEDIT.WINDOW.GETREGION 24618 . 29322) (\TEDIT.WINDOW.SETUP 29324 . 33654) (
+\TEDIT.MINIMAL.WINDOW.SETUP 33656 . 41467) (\TEDIT.CLEARPANE 41469 . 42186) (\TEDIT.FILL.PANES 42188
+ . 44833)) (44836 68537 (\TEDIT.CURSORMOVEDFN 44846 . 50456) (\TEDIT.CURSOROUTFN 50458 . 51146) (
+\TEDIT.ACTIVE.WINDOWP 51148 . 52218) (\TEDIT.EXPANDFN 52220 . 52783) (\TEDIT.MAINW 52785 . 54065) (
+\TEDIT.MAINSTREAM 54067 . 54401) (\TEDIT.PRIMARYPANE 54403 . 55173) (\TEDIT.PANELIST 55175 . 55671) (
+\TEDIT.NEWREGIONFN 55673 . 58189) (\TEDIT.SET.WINDOW.EXTENT 58191 . 63173) (\TEDIT.SHRINK.ICONCREATE 
+63175 . 65908) (\TEDIT.SHRINKFN 65910 . 66319) (\TEDIT.PANEREGION 66321 . 68535)) (68569 101615 (
+\TEDIT.BUTTONEVENTFN 68579 . 81552) (\TEDIT.BUTTONEVENTFN.DOOPERATION 81554 . 88817) (
+\TEDIT.BUTTONEVENTFN.GETOPERATION 88819 . 90661) (\TEDIT.BUTTONEVENTFN.CURSEL.INIT 90663 . 94333) (
+\TEDIT.BUTTONEVENTFN.INACTIVE 94335 . 96765) (\TEDIT.BUTTONEVENTFN.INTITLE 96767 . 98602) (
+\TEDIT.COPYINSERTFN 98604 . 99736) (\TEDIT.FOREIGN.COPY 99738 . 101613)) (101616 119179 (
+\TEDIT.PANE.SPLIT 101626 . 105574) (\TEDIT.SPLITW 105576 . 113635) (\TEDIT.UNSPLITW 113637 . 117836) (
+\TEDIT.LINKPANES 117838 . 118601) (\TEDIT.UNLINKPANE 118603 . 119177)) (120613 121504 (TEDITWINDOWP 
+120623 . 121502)) (121541 124644 (TEDIT.GETINPUT 121551 . 123994) (\TEDIT.MAKEFILENAME 123996 . 124642
+)) (124693 132343 (TEDIT.PROMPTWINDOW 124703 . 125017) (TEDIT.PROMPTPRINT 125019 . 127646) (
+TEDIT.PROMPTCLEAR 127648 . 129390) (TEDIT.PROMPTFLASH 129392 . 130650) (\TEDIT.PROMPT.PAGEFULLFN 
+130652 . 132341)) (132581 143159 (\TEDIT.FILENAME 132591 . 133363) (\TEDIT.DEFAULT.TITLE 133365 . 
+135744) (\TEDIT.WINDOW.TITLE 135746 . 137915) (\TEDIT.LIKELY.FILENAME 137917 . 140641) (
+\TEDIT.UPDATE.TITLE 140643 . 143157)) (143202 155686 (TEDIT.DEACTIVATE.WINDOW 143212 . 148785) (
+\TEDIT.RESHAPEFN 148787 . 150872) (\TEDIT.REPAINTFN 150874 . 151098) (\TEDIT.CLOSESPLITS 151100 . 
+153545) (\TEDIT.CLOSEPANE 153547 . 155684)) (155687 198486 (\TEDIT.SCROLLFN 155697 . 157928) (
+\TEDIT.SCROLLCH.TOP 157930 . 160041) (\TEDIT.SCROLLCH.BOTTOM 160043 . 164373) (\TEDIT.SCROLLUP 164375
+ . 170101) (\TEDIT.TOPLINE.YTOP 170103 . 171772) (\TEDIT.SCROLLDOWN 171774 . 178813) (
+\TEDIT.SCROLL.CARET 178815 . 181653) (\TEDIT.VISIBLECARETP 181655 . 183949) (\TEDIT.VISIBLECHARP 
+183951 . 185042) (\TEDIT.BITMAPLINES 185044 . 188964) (\TEDIT.SETPANE.TOPLINE 188966 . 189578) (
+\TEDIT.SHIFTLINES 189580 . 198484)) (198487 209356 (\TEDIT.ONSCREEN? 198497 . 203048) (
+\TEDIT.ONSCREEN.REGION 203050 . 206701) (\TEDIT.AFTERMOVEFN 206703 . 207600) (OFFSCREENP 207602 . 
+209354)) (209398 212212 (\TEDIT.PROCIDLEFN 209408 . 211068) (\TEDIT.PROCENTRYFN 211070 . 211515) (
+\TEDIT.PROCEXITFN 211517 . 212210)) (212291 225516 (\TEDIT.DOWNCARET 212301 . 213094) (
+\TEDIT.FLASHCARET 213096 . 215207) (\TEDIT.UPCARET 215209 . 216313) (TEDIT.NORMALIZECARET 216315 . 
+219533) (\TEDIT.SETCARET 219535 . 224886) (\TEDIT.CARET 224888 . 225514)))))
 STOP
diff --git a/library/tedit/TEDIT-WINDOW.LCOM b/library/tedit/TEDIT-WINDOW.LCOM
index e1030af5..439ef362 100644
Binary files a/library/tedit/TEDIT-WINDOW.LCOM and b/library/tedit/TEDIT-WINDOW.LCOM differ
diff --git a/lispusers/REGIONMANAGER b/lispusers/REGIONMANAGER
index 812f58a2..85b8faba 100644
--- a/lispusers/REGIONMANAGER
+++ b/lispusers/REGIONMANAGER
@@ -1,12 +1,12 @@
 (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
 
-(FILECREATED "20-Apr-2025 12:57:07" {WMEDLEY}<lispusers>REGIONMANAGER.;137 42626  
+(FILECREATED "23-Oct-2025 20:12:38" {WMEDLEY}<lispusers>REGIONMANAGER.;139 43219  
 
       :EDIT-BY rmk
 
-      :CHANGES-TO (FNS RM-CLOSEW)
+      :CHANGES-TO (FNS GRAB-TYPED-REGION)
 
-      :PREVIOUS-DATE "25-Nov-2024 17:59:00" {WMEDLEY}<lispusers>REGIONMANAGER.;135)
+      :PREVIOUS-DATE "20-Apr-2025 12:57:07" {WMEDLEY}<lispusers>REGIONMANAGER.;137)
 
 
 (PRETTYCOMPRINT REGIONMANAGERCOMS)
@@ -88,20 +88,28 @@
             else (push TYPED-REGIONS (CONS TYPE REGIONS])
 
 (GRAB-TYPED-REGION
-  [LAMBDA (REGION-TYPE MINWIDTH MINHEIGHT)                   (* ; "Edited 10-Oct-2023 13:41 by rmk")
+  [LAMBDA (REGION-TYPE MINWIDTH MINHEIGHT MARGIN)            (* ; "Edited 23-Oct-2025 20:12 by rmk")
+                                                             (* ; "Edited 10-Oct-2023 13:41 by rmk")
                                                              (* ; "Edited 14-Sep-2023 07:30 by rmk")
 
-    (* ;; "Returns a REGIONTYPE region that satisfies MINWIDTH and MINHEIGHT, if specified")
+    (* ;; "Returns a REGIONTYPE region that is larger than MINWIDTH and MINHEIGHT, if specified, and smaller than those numbers times MARGIN, if specified.  MARGIN=1.1 allows a size 10%% bigger than MINWIDTH.")
 
-    (for R in (CDR (ASSOC REGION-TYPE TYPED-REGIONS)) unless (fetch REGION-INUSE of R)
-       when [AND (OR (NULL MINWIDTH)
-                     (ILEQ MINWIDTH (fetch WIDTH of R)))
-                 (OR (NULL MINHEIGHT)
-                     (ILEQ MINHEIGHT (fetch HEIGHT of R] do 
+    (CL:UNLESS MINWIDTH (SETQ MINWIDTH 0))
+    (CL:UNLESS MINHEIGHT (SETQ MINHEIGHT 0))
+    (for R MAXWIDTH MAXHEIGHT in (CDR (ASSOC REGION-TYPE TYPED-REGIONS))
+       first (if (AND MARGIN (GREATERP MARGIN 1))
+                 then (SETQ MAXWIDTH (FIXR (FTIMES MARGIN MINWIDTH)))
+                      (SETQ MAXHEIGHT (FIXR (FTIMES MARGIN MINHEIGHT)))
+               else (SETQ MAXWIDTH MAX.FIXP)
+                    (SETQ MAXHEIGHT MAX.FIXP)) unless (fetch REGION-INUSE of R)
+       when (AND (<= MINWIDTH (fetch WIDTH of R)
+                     MAXWIDTH)
+                 (<= MINHEIGHT (fetch HEIGHT of R)
+                     MAXHEIGHT)) do 
 
                                  (* ;; "We don't mark it as inuse here, leave that gets done by INSTALL-TYPED-REGION when ownership is given to a window. The only downside is that the region could be reallocated before that happens, and 2 window would come up in the same place.")
 
-                                                            (RETURN R])
+                                    (RETURN R])
 
 (REGISTER-TYPED-REGION
   [LAMBDA (REGION REGION-TYPE WINDOW)                        (* ; "Edited 10-Oct-2023 13:30 by rmk")
@@ -752,11 +760,11 @@
 )
 )
 (DECLARE%: DONTCOPY
-  (FILEMAP (NIL (1611 6729 (SET-TYPED-REGIONS 1621 . 3796) (GRAB-TYPED-REGION 3798 . 4824) (
-REGISTER-TYPED-REGION 4826 . 6123) (REGION-TYPE 6125 . 6727)) (6730 15428 (RM-CREATEW 6740 . 8863) (
-RM-CLOSEW 8865 . 12512) (RM-GETREGION 12514 . 14663) (CLOSE-TYPED-W 14665 . 15426)) (16071 23550 (
-RELCREATEREGION 16081 . 20704) (RELGETREGION 20706 . 23313) (RELCREATEPOSITION 23315 . 23548)) (23551 
-31126 (\RELCREATEREGION.REF 23561 . 28083) (\RELCREATEREGION.SIZE 28085 . 31124)) (31179 40521 (
-RM-ATTACHWINDOW 31189 . 40519)) (40522 42256 (CLOSEWITH 40532 . 41059) (CLOSEWITH.DOIT 41061 . 41341) 
-(MOVEWITH 41343 . 41866) (MOVEWITH.DOIT 41868 . 42254)))))
+  (FILEMAP (NIL (1619 7322 (SET-TYPED-REGIONS 1629 . 3804) (GRAB-TYPED-REGION 3806 . 5417) (
+REGISTER-TYPED-REGION 5419 . 6716) (REGION-TYPE 6718 . 7320)) (7323 16021 (RM-CREATEW 7333 . 9456) (
+RM-CLOSEW 9458 . 13105) (RM-GETREGION 13107 . 15256) (CLOSE-TYPED-W 15258 . 16019)) (16664 24143 (
+RELCREATEREGION 16674 . 21297) (RELGETREGION 21299 . 23906) (RELCREATEPOSITION 23908 . 24141)) (24144 
+31719 (\RELCREATEREGION.REF 24154 . 28676) (\RELCREATEREGION.SIZE 28678 . 31717)) (31772 41114 (
+RM-ATTACHWINDOW 31782 . 41112)) (41115 42849 (CLOSEWITH 41125 . 41652) (CLOSEWITH.DOIT 41654 . 41934) 
+(MOVEWITH 41936 . 42459) (MOVEWITH.DOIT 42461 . 42847)))))
 STOP
diff --git a/lispusers/REGIONMANAGER.LCOM b/lispusers/REGIONMANAGER.LCOM
index 3edae72b..d4753c31 100644
Binary files a/lispusers/REGIONMANAGER.LCOM and b/lispusers/REGIONMANAGER.LCOM differ
diff --git a/lispusers/REGIONMANAGER.TEDIT b/lispusers/REGIONMANAGER.TEDIT
index 7bab68ae..ce7f08db 100644
--- a/lispusers/REGIONMANAGER.TEDIT
+++ b/lispusers/REGIONMANAGER.TEDIT
@@ -34,8 +34,9 @@ where each regionsi is a possibly empty list of regions.  For convenience, if TY
 Typically, a call to SET-TYPED-REGIONS would be placed in a user's INIT file to set up the preference order for the regions that the user wants to participate in this reallocation scheme.  If an application uses a type that is not on TYPED-REGIONS, then that type-atom is treated as NIL and always gives rise to the normal ghost-region prompting.  Thus a user will observe no change in system behavior if TYPED-REGIONS is left with its initial value NIL.  A type that is added with an empty region list (as opposed to not being on the list at all) will allow new regions to accumulate for recycling.
 The function REGION-TYPE returns NIL if X is not a typed-region or not a region of type TYPE.
 (REGION-TYPE X TYPE)	[Function]
-In most scenarios the interpretation of a typed region specification is handled automatically by the extended CREATEW and GETREGION functions.  Sometimes it may be useful to perform to for the regions dimensions to be entered into other calculations before it is installed in a window.  The function GRAB-TYPED-REGION recycles an existing REGION-TYPE window if one meets the optional minimum width and height requirements, otherwise a new region is returned.  
-(GRAB-TYPED-REGION REGION-TYPE MINWIDTH MINHEIGHT)	[Function]
+In most scenarios the interpretation of a typed region specification is handled automatically by the extended CREATEW and GETREGION functions.  Sometimes it may be useful to perform to for the regions dimensions to be entered into other calculations before it is installed in a window.  The function GRAB-TYPED-REGION recycles an existing REGION-TYPE window if one meets the optional minimum width, height , and margin requirements, otherwise a new region is returned.  
+(GRAB-TYPED-REGION REGION-TYPE MINWIDTH MINHEIGHT MARGIN)	[Function]
+If MINWIDTH is specified, the recyled window must be at least that wide, and if MARGIN is specified it can be no larger than MARGIN x MINWIDTH.  Thus, if MINWIDTH is 200 and MARGIN is 1.1, only regions REGION-TYPE regions of width between 200 and 220 points will satisfy.  MINHEIGHT restricts the height in the same way. 
 A type can be assigned to an untyped region and installed in a window by the function REGISTER-TYPED-REGION.  That region will then be recycled when the window is closed.
 (REGISTER-TYPED-REGION REGION REGION-TYPE WINDOW)	[Function]
 If REGION is NIL, the (presumably) untyped region of WINDOW will be registered. An entry in TYPED-REGIONS will be created for REGION-TYPE if it is not already present.
@@ -79,14 +80,16 @@ Establishes a link between the PARENT window and any number of CHILDREN windows
 If NEWPOS is the new position of PARENT, moves each of the move-children so that they stand in the same relation to PARENT after it moves as before.
 
 
-(SEQUENCE NIL NIL (0 0 0 0) ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC) STARTINGPAGE# 1) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (ALTERNATE NIL NIL (0 0 0 0) ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL)))))))
1$4È$È4È$È1$È$1È$4È$È4È$È4È$È4È$È1È$1ŠŠ8$1ŠŠ8$JÈ$ÈPAGEHEADINGRUNNINGHEADMODERN
-CLASSIC
-TERMINALMODERNTERMINALÿüTERMINALÿü
-TIMESROMAN$
HRULE.GETFN
HRULE.GETFNHRULE.GETFNHRULE.GETFNHRULE.GETFN
-@È	„	•	‘}/	¯[	�C*§�T	Û¬@
Á1	
-
-;	3o)Ä
ž
 ’
	4n	©o2V@1%!
A &MmIS-g<
-3E
-"
-
-l/4v2C	ƒ	&%"O=	,	l¬)9š¥Ç
W~æ&4!Uh'š2&µ$"&(
)MDATE:iÏ*ø5V®zº
\ No newline at end of file
+(SEQUENCE NIL NIL (0 0 0 0) ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC) STARTINGPAGE# 1) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (ALTERNATE NIL NIL (0 0 0 0) ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL)))))))1$4È$È4È$È1$È$1È$4È$È4È$È4È$È4È$È4È$È1È$1ŠŠ8$1ŠŠ8$JÈ$ÈPAGEHEADINGRUNNINGHEAD1TERMINAL(CHARPROPS (COLOR . BLACK))0CLASSIC
+(CHARPROPS (COLOR . BLACK))/MODERN
+(CHARPROPS (COLOR . BLACK))/MODERN(CHARPROPS (COLOR . BLACK))1TERMINALÿü(CHARPROPS (COLOR . BLACK))1TERMINALÿü(CHARPROPS (COLOR . BLACK))3
+TIMESROMAN$(CHARPROPS (COLOR . BLACK))HRULE.GETFNHRULE.GETFNHRULE.GETFN

HRULE.GETFNHRULE.GETFN@È
+„
+•
+‘}/	¯[	�C*§�T	Û¬@
Á1		
+
+;	3o)Ä
ž
 ’
	4n	©y9E'<0V@1%!
A &MmIS-g<
+3E
+"
+
+l/4v2C	ƒ	&%"O=	,	l¬)9š¥Ç
W~æ&4!Uh'š2&µ$"&(
)M(((CHARENCODING . MCCS)))PROPS:#DATE:jÄ"<6©Àzº
\ No newline at end of file
