Skip to content

Commit 5cede04

Browse files
committed
More Tedit
1 parent 68138c4 commit 5cede04

File tree

6 files changed

+90
-92
lines changed

6 files changed

+90
-92
lines changed

library/tedit/TEDIT-OLDFILE.LCOM

-418 Bytes
Binary file not shown.

library/tedit/TEDIT-STREAM

Lines changed: 65 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
22

3-
(FILECREATED "29-Jul-2025 11:58:01" {WMEDLEY}<library>TEDIT>TEDIT-STREAM.;912 190401
3+
(FILECREATED " 9-Sep-2025 22:08:09" {WMEDLEY}<library>tedit>TEDIT-STREAM.;915 190872
44

55
:EDIT-BY rmk
66

7-
:CHANGES-TO (FNS \TEDIT.OPENTEXTSTREAM.DEFAULTLOOKS)
7+
:CHANGES-TO (FNS OPENTEXTSTREAM)
8+
(RECORDS TEXTOBJ)
89

9-
:PREVIOUS-DATE "28-Jul-2025 23:52:41" {WMEDLEY}<library>TEDIT>TEDIT-STREAM.;911)
10+
:PREVIOUS-DATE " 8-Sep-2025 22:10:32" {WMEDLEY}<library>tedit>TEDIT-STREAM.;913)
1011

1112

1213
(PRETTYCOMPRINT TEDIT-STREAMCOMS)
@@ -234,7 +235,7 @@
234235
TXTRAWINCLUDESTREAM (* ;
235236
 "NODIRCORE stream used to cache RAW includes (and maybe later, all includes?)")
236237
DOCPROPS (* ;
237-
 "Document properties that are stored with the document (not used yet)")
238+
 "Document properties that are stored with the document. Not used before 9/2025")
238239
TXTSTYLESHEET (* ;
239240
 "Style sheet local to this document. Not currently saved as part of the file.")
240241
)
@@ -1232,6 +1233,8 @@
12321233
(OPENTEXTSTREAM
12331234
[LAMBDA (TEXT WINDOW START/PROPS END PROPS)
12341235

1236+
(* ;; "Edited 9-Sep-2025 22:07 by rmk")
1237+
12351238
(* ;; "Edited 17-Feb-2025 08:57 by rmk")
12361239

12371240
(* ;; "Edited 30-Jan-2025 11:15 by rmk")
@@ -1244,32 +1247,14 @@
12441247

12451248
(* ;; "Edited 30-Jun-2024 16:17 by rmk")
12461249

1247-
(* ;; "Edited 25-Jun-2024 11:59 by rmk")
1248-
12491250
(* ;; "Edited 10-May-2024 22:42 by rmk")
12501251

1251-
(* ;; "Edited 6-May-2024 12:38 by rmk")
1252-
12531252
(* ;; "Edited 31-Mar-2024 11:43 by rmk")
12541253

1255-
(* ;; "Edited 17-Mar-2024 12:05 by rmk")
1256-
1257-
(* ;; "Edited 15-Mar-2024 14:23 by rmk")
1258-
1259-
(* ;; "Edited 10-Mar-2024 22:10 by rmk")
1260-
12611254
(* ;; "Edited 21-Jan-2024 10:31 by rmk")
12621255

12631256
(* ;; "Edited 20-Dec-2023 10:47 by rmk")
12641257

1265-
(* ;; "Edited 11-Dec-2023 09:50 by rmk")
1266-
1267-
(* ;; "Edited 26-Oct-2023 10:59 by rmk")
1268-
1269-
(* ;; "Edited 23-Oct-2023 22:14 by rmk")
1270-
1271-
(* ;; "Edited 21-Oct-2023 12:21 by rmk")
1272-
12731258
(* ;; "Edited 12-Oct-2023 23:44 by rmk")
12741259

12751260
(* ;; "Edited 31-Jan-2022 17:25 by rmk: A string TEXT is converted here to a stream")
@@ -1330,10 +1315,17 @@
13301315
else (\TEDIT.WINDOW.CREATE WINDOW TSTREAM PROPS)))
13311316
else (SETQ TSTREAM (\TEDIT.CREATE.TEXTSTREAM PROPS))
13321317
(SETQ TEXTOBJ (FGETTSTR TSTREAM TEXTOBJ))
1333-
(CL:WHEN TEXT (* ;
1318+
(if TEXT
1319+
then (* ;
13341320
 "Verify/open the file before the window")
1335-
(SETQ TEXT (\TEDIT.OPENTEXTFILE TEXT PROPS))
1336-
(FSETTOBJ TEXTOBJ TXTFILE TEXT))
1321+
(SETQ TEXT (\TEDIT.OPENTEXTFILE TEXT PROPS))
1322+
(FSETTOBJ TEXTOBJ TXTFILE TEXT)
1323+
else
1324+
(* ;; "An empty document starts in an MCCS environment")
1325+
1326+
(FPUTMULTI (FGETTOBJ TEXTOBJ DOCPROPS)
1327+
'CHARENCODING
1328+
'MCCS))
13371329

13381330
(* ;; "If we swap the window before the pieces, the local promptwindow is availabe for messages and queries. Otherwise, those show up in the system prompt. But if we do it in the opposite order, we don't know how to estimate the width for the window region.")
13391331

@@ -1441,7 +1433,8 @@
14411433
TSTREAM])
14421434

14431435
(\TEDIT.OPENTEXTSTREAM.PIECES
1444-
[LAMBDA (TEXT TSTREAM START END PROPS) (* ; "Edited 29-May-2025 19:02 by rmk")
1436+
[LAMBDA (TEXT TSTREAM START END PROPS) (* ; "Edited 8-Sep-2025 22:05 by rmk")
1437+
(* ; "Edited 29-May-2025 19:02 by rmk")
14451438
(* ; "Edited 26-Apr-2025 12:59 by rmk")
14461439
(* ; "Edited 24-Apr-2025 17:09 by rmk")
14471440
(* ; "Edited 26-Sep-2024 22:27 by rmk")
@@ -1460,11 +1453,10 @@
14601453
(* ;; "The intent is that the window's promptwindow is available for local messages during the fetch, and the RESETSAVE of PROMPTWINDOW would make even messages to the global promptwindow appear locally. An example is the mouseconfirm in READIMAGEOBJ that asks whether the imageobj code should be loaded from a given file. The problem is that the Tedit prompt window is usually just 1 line hight and doesn't automatically grow to show multiple lines, so key information may not be displayed. If the Tedit prompt grows (and it can be determined when/if it should later shrink), then this feature can be enabled.")
14611454

14621455
(RESETLST
1463-
(LET* [(TEXTOBJ (TEXTOBJ! (fetch (TEXTSTREAM TEXTOBJ) of TSTREAM)))
1456+
(LET* [(TEXTOBJ (FTEXTOBJ TSTREAM))
14641457
(PWINDOW (GETTOBJ TEXTOBJ PROMPTWINDOW))
14651458
(READONLY (GETTEXTPROP TEXTOBJ 'READONLY] (* ;
14661459
 "READONLY only after creation, if specified")
1467-
(AND NIL (CL:WHEN PWINDOW (RESETSAVE PROMPTWINDOW PWINDOW)))
14681460
(FSETTOBJ TEXTOBJ TXTREADONLY NIL)
14691461
(FSETTOBJ TEXTOBJ TXTDON'TUPDATE T) (* ;
14701462
 "Don't display or record histories until done")
@@ -1666,7 +1658,8 @@
16661658
(SETTOBJ TEXTOBJ DEFAULTPARALOOKS PARALOOKS])
16671659

16681660
(\TEDIT.OPENTEXTFILE
1669-
[LAMBDA (TEXT PROPS) (* ; "Edited 21-Nov-2024 11:38 by rmk")
1661+
[LAMBDA (TEXT PROPS) (* ; "Edited 8-Sep-2025 21:52 by rmk")
1662+
(* ; "Edited 21-Nov-2024 11:38 by rmk")
16701663
(* ; "Edited 20-Dec-2023 10:49 by rmk")
16711664
(* ; "Edited 28-Oct-2023 10:33 by rmk")
16721665
(* ; "Edited 26-Sep-2023 18:00 by rmk")
@@ -1678,15 +1671,19 @@
16781671
(STRINGP TEXT)
16791672
(CL:PATHNAMEP TEXT))
16801673
then (* ; "String detects empty extension")
1681-
[OPENSTREAM (OR (if (OR (CL:PATHNAMEP TEXT)
1682-
(FILENAMEFIELD.STRING TEXT 'EXTENSION))
1683-
then (FINDFILE TEXT T)
1684-
elseif (FINDFILE-WITH-EXTENSIONS TEXT NIL *TEDIT-EXTENSIONS*))
1685-
TEXT)
1686-
'INPUT
1687-
'OLD
1688-
`((TYPE TEXT)
1689-
(FORMAT ,(LISTGET PROPS 'FORMAT]
1674+
[RESETSAVE [SETQ TEXT (OPENSTREAM (OR (if (OR (CL:PATHNAMEP TEXT)
1675+
(FILENAMEFIELD.STRING TEXT
1676+
'EXTENSION))
1677+
then (FINDFILE TEXT T)
1678+
elseif (FINDFILE-WITH-EXTENSIONS TEXT NIL
1679+
*TEDIT-EXTENSIONS*))
1680+
TEXT)
1681+
'INPUT
1682+
'OLD
1683+
`((TYPE TEXT)
1684+
(FORMAT ,(LISTGET PROPS 'FORMAT]
1685+
'(PROGN (AND RESETSTATE (CLOSEF? OLDVALUE]
1686+
TEXT
16901687
elseif (\GETSTREAM TEXT 'INPUT T)
16911688
else
16921689
(* ;; "Don't know what it is")
@@ -3123,34 +3120,34 @@
31233120
(ADDTOVAR LAMA TEXTPROP)
31243121
)
31253122
(DECLARE%: DONTCOPY
3126-
(FILEMAP (NIL (36908 67724 (\TEDIT.TEXTBIN 36918 . 47668) (\TEDIT.TEXTPEEKBIN 47670 . 53220) (
3127-
\TEDIT.TEXTBACKFILEPTR 53222 . 58895) (\TEDIT.TEXTBOUT 58897 . 63514) (\TEDIT.INSTALL.FILEBUFFER 63516
3128-
. 67722)) (68622 72913 (\TEDIT.TEXTOUTCHARFN 68632 . 70188) (\TEDIT.TEXTINCCODEFN 70190 . 70929) (
3129-
\TEDIT.TEXTBACKCCODEFN 70931 . 71523) (\TEDIT.TEXTFORMATBYTESTREAM 71525 . 72362) (
3130-
\TEDIT.TEXTFORMATBYTESTRING 72364 . 72911)) (72960 84601 (OPENTEXTSTREAM 72970 . 79922) (
3131-
COPYTEXTSTREAM 79924 . 83824) (TEDIT.STREAMCHANGEDP 83826 . 84128) (TXTFILE 84130 . 84599)) (84602
3132-
114584 (\TEDIT.REOPENTEXTSTREAM 84612 . 85964) (\TEDIT.OPENTEXTSTREAM.PIECES 85966 . 90900) (
3133-
\TEDIT.OPENTEXTSTREAM.PROPS 90902 . 92004) (\TEDIT.OPENTEXTSTREAM.SETUP.SEL 92006 . 97247) (
3134-
\TEDIT.OPENTEXTSTREAM.WINDOW 97249 . 100040) (\TEDIT.OPENTEXTSTREAM.DEFAULTLOOKS 100042 . 101981) (
3135-
\TEDIT.OPENTEXTFILE 101983 . 103696) (\TEDIT.CREATE.TEXTSTREAM 103698 . 104845) (\TEDIT.REOPEN.STREAM
3136-
104847 . 107183) (\TEDIT.TEXTINIT 107185 . 114582)) (114622 115810 (\TEDIT.TTYBOUT 114632 . 115808)) (
3137-
115928 135925 (\TEDIT.TEXTCLOSEF 115938 . 117262) (\TEDIT.TEXTDSPFONT 117264 . 118462) (
3138-
\TEDIT.TEXTEOFP 118464 . 120219) (\TEDIT.TEXTGETEOFPTR 120221 . 120544) (\TEDIT.TEXTSETEOFPTR 120546
3139-
. 121833) (\TEDIT.TEXTGETFILEPTR 121835 . 124670) (\TEDIT.TEXTSETFILEINFO 124672 . 125180) (
3140-
\TEDIT.TEXTOPENF 125182 . 126113) (\TEDIT.TEXTSETEOF 126115 . 126731) (\TEDIT.TEXTSETFILEPTR 126733 .
3141-
128843) (\TEDIT.TEXTDSPXPOSITION 128845 . 129862) (\TEDIT.TEXTDSPYPOSITION 129864 . 130605) (
3142-
\TEDIT.TEXTLEFTMARGIN 130607 . 131198) (\TEDIT.TEXTCOLOR 131200 . 131783) (\TEDIT.TEXTRIGHTMARGIN
3143-
131785 . 135074) (\TEDIT.TEXTDSPCHARWIDTH 135076 . 135380) (\TEDIT.TEXTDSPSTRINGWIDTH 135382 . 135688)
3144-
(\TEDIT.TEXTDSPLINEFEED 135690 . 135923)) (135963 148576 (\TEDIT.NTHCHARCODE 135973 . 137424) (
3145-
\TEDIT.PIECE.NTHCHARCODE 137426 . 141336) (\TEDIT.RPLCHARCODE 141338 . 142796) (
3146-
\TEDIT.PIECE.RPLCHARCODE 142798 . 148221) (\TEDIT.NTHCHARLOOKS 148223 . 148574)) (149623 170717 (
3147-
\TEDIT.DELETE.SELPIECES 149633 . 153258) (\TEDIT.INSERTCH 153260 . 161299) (\TEDIT.INSERTCH.HISTORY
3148-
161301 . 164765) (\TEDIT.INSERTEOL 164767 . 166592) (\TEDIT.INSERTCH.INSERTION 166594 . 169431) (
3149-
\TEDIT.INSERTCH.EXTEND 169433 . 170715)) (170718 172222 (\TEDIT.NEXTCHANGEABLE.CHNO 170728 . 171443) (
3150-
\TEDIT.LASTCHANGEABLE.CHNO 171445 . 172220)) (172223 173927 (\SETUPGETCH 172233 . 173925)) (173985
3151-
178443 (\TEDIT.INSTALL.PIECE 173995 . 178441)) (178481 187582 (TEXTPROP 178491 . 178838) (GETTEXTPROP
3152-
178840 . 179084) (PUTTEXTPROP 179086 . 179343) (GETTEXTPROPS 179345 . 179789) (PUTTEXTPROPS 179791 .
3153-
180695) (TEXTPROP.ADD 180697 . 180960) (\TEDIT.TEXTPROP 180962 . 187580)) (187583 189653 (
3154-
\TEDIT.TEXTOBJ.PROPNAMES 187593 . 188545) (\TEDIT.TEXTOBJ.PROPFETCHFN 188547 . 189063) (
3155-
\TEDIT.TEXTOBJ.PROPSTOREFN 189065 . 189651)))))
3123+
(FILEMAP (NIL (36924 67740 (\TEDIT.TEXTBIN 36934 . 47684) (\TEDIT.TEXTPEEKBIN 47686 . 53236) (
3124+
\TEDIT.TEXTBACKFILEPTR 53238 . 58911) (\TEDIT.TEXTBOUT 58913 . 63530) (\TEDIT.INSTALL.FILEBUFFER 63532
3125+
. 67738)) (68638 72929 (\TEDIT.TEXTOUTCHARFN 68648 . 70204) (\TEDIT.TEXTINCCODEFN 70206 . 70945) (
3126+
\TEDIT.TEXTBACKCCODEFN 70947 . 71539) (\TEDIT.TEXTFORMATBYTESTREAM 71541 . 72378) (
3127+
\TEDIT.TEXTFORMATBYTESTRING 72380 . 72927)) (72976 84540 (OPENTEXTSTREAM 72986 . 79861) (
3128+
COPYTEXTSTREAM 79863 . 83763) (TEDIT.STREAMCHANGEDP 83765 . 84067) (TXTFILE 84069 . 84538)) (84541
3129+
115055 (\TEDIT.REOPENTEXTSTREAM 84551 . 85903) (\TEDIT.OPENTEXTSTREAM.PIECES 85905 . 90833) (
3130+
\TEDIT.OPENTEXTSTREAM.PROPS 90835 . 91937) (\TEDIT.OPENTEXTSTREAM.SETUP.SEL 91939 . 97180) (
3131+
\TEDIT.OPENTEXTSTREAM.WINDOW 97182 . 99973) (\TEDIT.OPENTEXTSTREAM.DEFAULTLOOKS 99975 . 101914) (
3132+
\TEDIT.OPENTEXTFILE 101916 . 104167) (\TEDIT.CREATE.TEXTSTREAM 104169 . 105316) (\TEDIT.REOPEN.STREAM
3133+
105318 . 107654) (\TEDIT.TEXTINIT 107656 . 115053)) (115093 116281 (\TEDIT.TTYBOUT 115103 . 116279)) (
3134+
116399 136396 (\TEDIT.TEXTCLOSEF 116409 . 117733) (\TEDIT.TEXTDSPFONT 117735 . 118933) (
3135+
\TEDIT.TEXTEOFP 118935 . 120690) (\TEDIT.TEXTGETEOFPTR 120692 . 121015) (\TEDIT.TEXTSETEOFPTR 121017
3136+
. 122304) (\TEDIT.TEXTGETFILEPTR 122306 . 125141) (\TEDIT.TEXTSETFILEINFO 125143 . 125651) (
3137+
\TEDIT.TEXTOPENF 125653 . 126584) (\TEDIT.TEXTSETEOF 126586 . 127202) (\TEDIT.TEXTSETFILEPTR 127204 .
3138+
129314) (\TEDIT.TEXTDSPXPOSITION 129316 . 130333) (\TEDIT.TEXTDSPYPOSITION 130335 . 131076) (
3139+
\TEDIT.TEXTLEFTMARGIN 131078 . 131669) (\TEDIT.TEXTCOLOR 131671 . 132254) (\TEDIT.TEXTRIGHTMARGIN
3140+
132256 . 135545) (\TEDIT.TEXTDSPCHARWIDTH 135547 . 135851) (\TEDIT.TEXTDSPSTRINGWIDTH 135853 . 136159)
3141+
(\TEDIT.TEXTDSPLINEFEED 136161 . 136394)) (136434 149047 (\TEDIT.NTHCHARCODE 136444 . 137895) (
3142+
\TEDIT.PIECE.NTHCHARCODE 137897 . 141807) (\TEDIT.RPLCHARCODE 141809 . 143267) (
3143+
\TEDIT.PIECE.RPLCHARCODE 143269 . 148692) (\TEDIT.NTHCHARLOOKS 148694 . 149045)) (150094 171188 (
3144+
\TEDIT.DELETE.SELPIECES 150104 . 153729) (\TEDIT.INSERTCH 153731 . 161770) (\TEDIT.INSERTCH.HISTORY
3145+
161772 . 165236) (\TEDIT.INSERTEOL 165238 . 167063) (\TEDIT.INSERTCH.INSERTION 167065 . 169902) (
3146+
\TEDIT.INSERTCH.EXTEND 169904 . 171186)) (171189 172693 (\TEDIT.NEXTCHANGEABLE.CHNO 171199 . 171914) (
3147+
\TEDIT.LASTCHANGEABLE.CHNO 171916 . 172691)) (172694 174398 (\SETUPGETCH 172704 . 174396)) (174456
3148+
178914 (\TEDIT.INSTALL.PIECE 174466 . 178912)) (178952 188053 (TEXTPROP 178962 . 179309) (GETTEXTPROP
3149+
179311 . 179555) (PUTTEXTPROP 179557 . 179814) (GETTEXTPROPS 179816 . 180260) (PUTTEXTPROPS 180262 .
3150+
181166) (TEXTPROP.ADD 181168 . 181431) (\TEDIT.TEXTPROP 181433 . 188051)) (188054 190124 (
3151+
\TEDIT.TEXTOBJ.PROPNAMES 188064 . 189016) (\TEDIT.TEXTOBJ.PROPFETCHFN 189018 . 189534) (
3152+
\TEDIT.TEXTOBJ.PROPSTOREFN 189536 . 190122)))))
31563153
STOP

library/tedit/TEDIT-STREAM.LCOM

172 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)