1
0
mirror of synced 2026-04-28 04:55:54 +00:00

TEDIT + FILEBROWSER: Add function TEDIT-SEE, call from FILEBROWSER

This commit is contained in:
rmkaplan
2021-09-19 19:10:18 -07:00
parent 8ec1ca966d
commit 21088d3eff
4 changed files with 244 additions and 242 deletions

View File

@@ -1,14 +1,14 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "19-Apr-2018 12:22:03" {DSK}<Users>kaplan>Local>medley3.5>lispcore>library>TEDIT.;2 140045
(FILECREATED "19-Sep-2021 17:08:56" {DSK}<Users>kaplan>Local>medley3.5>git-medley>library>TEDIT.;2 141945
changes to%: (VARS TEDITCOMS)
previous date%: "21-Jun-99 20:00:16"
{DSK}<Users>kaplan>Local>medley3.5>lispcore>library>TEDIT.;1)
previous date%: "19-Apr-2018 12:22:03"
{DSK}<Users>kaplan>Local>medley3.5>git-medley>library>TEDIT.;1)
(* ; "
Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1999, 2018 by Venue & Xerox Corporation. All rights reserved.
Copyright (c) 1983-1993, 1995, 1999, 2018, 2021 by Venue & Xerox Corporation.
")
(PRETTYCOMPRINT TEDITCOMS)
@@ -24,40 +24,40 @@ Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993,
(TEDIT.DEFAULT.PROPS NIL)
(TEDIT.STARTUP.MONITORLOCK (CREATE.MONITORLOCK 'TEDIT.STARTUP))
(TEDIT.RESTART.MENU (\CREATE.TEDIT.RESTART.MENU))
(* ;
 "Original was (CREATE MENU ITEMS _ '(NewEditProcess)).")
(* ;
 "Changed by yabu.fx, for SUNLOADUP without DWIM.")
(* ;
 "Original was (CREATE MENU ITEMS _ '(NewEditProcess)).")
(* ;
 "Changed by yabu.fx, for SUNLOADUP without DWIM.")
)
(GLOBALVARS TEDIT.TENTATIVE TEDIT.DEFAULT.PROPS)
(FNS \TEDIT2 COERCETEXTOBJ TEDIT TEDIT.CHARWIDTH TEDIT.COPY TEDIT.DELETE
(FNS \TEDIT2 COERCETEXTOBJ TEDIT TEDIT-SEE TEDIT.CHARWIDTH TEDIT.COPY TEDIT.DELETE
TEDIT.DO.BLUEPENDINGDELETE TEDIT.INSERT TEDIT.KILL TEDIT.MAPLINES TEDIT.MAPPIECES
TEDIT.MOVE TEDIT.QUIT TEDIT.STRINGWIDTH TEDIT.\INSERT TEXTOBJ TEXTSTREAM \TEDIT.INCLUDE
\TEDIT.INSERT.PIECES \TEDIT.MOVE.PIECEMAPFN \TEDIT.OBJECT.SHOWSEL \TEDIT.RESTARTFN
\TEDIT.CHARDELETE \TEDIT.COPY.PIECEMAPFN \TEDIT.DELETE \TEDIT.DIFFUSE.PARALOOKS
\TEDIT.FOREIGN.COPY? \TEDIT.QUIT \TEDIT.WORDDELETE \TEDIT1)
(P (MOVD? 'NILL 'OBJECTOUTOFTEDIT))
(* ;
 "HOOK for looked-string copy, etc. Used in \TEDIT.FOREIGN.COPY?.")
(* ;
 "HOOK for looked-string copy, etc. Used in \TEDIT.FOREIGN.COPY?.")
(COMS (FNS \CREATE.TEDIT.RESTART.MENU))
(* ;
 "Added by yabu.fx, for SUNLOADUP without DWIM.")
(COMS (* ; "Debugging functions")
(* ;
 "Added by yabu.fx, for SUNLOADUP without DWIM.")
(COMS (* ; "Debugging functions")
(FNS PLCHAIN PRINTLINE SEEFILE))
(COMS (* ; "Object-oriented editing")
(COMS (* ; "Object-oriented editing")
(FNS TEDIT.INSERT.OBJECT TEDIT.EDIT.OBJECT TEDIT.FIND.OBJECT TEDIT.FIND.OBJECT.SUBTREE
TEDIT.PUT.OBJECT TEDIT.GET.OBJECT TEDIT.OBJECT.CHANGED))
(FILES TEDITFIND TEDITHISTORY TEDITFILE TEDITWINDOW TEDITSELECTION IMAGEOBJ TFBRAVO TEDITHCPY
TEDITPAGE TEDITMENU TEDITFNKEYS)
(COMS (* ; "TEDIT Support information")
(COMS (* ; "TEDIT Support information")
(E (SETQ TEDITSYSTEMDATE (DATE)))
(VARS TEDITSYSTEMDATE (TEDITSUPPORT "TEditSupport.PA"))
(FNS MAKETEDITFORM)
(P (ADDTOVAR LAFITESPECIALFORMS ("TEdit Report" 'MAKETEDITFORM
"Report a problem with TEdit"))
(SETQ LAFITEFORMSMENU NIL)))
(COMS (* ;
 "LISTFILES Interface, so the system can decide if a file is a TEdit file.")
(COMS (* ;
 "LISTFILES Interface, so the system can decide if a file is a TEdit file.")
(ADDVARS (PRINTFILETYPES (TEDIT (TEST \TEDIT.FORMATTEDP1)
(EXTENSION (TEDIT])
@@ -327,6 +327,43 @@ Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993,
(TTY.PROCESS PROC)))
(RETURN PROC])
(TEDIT-SEE
[LAMBDA (FILE WINDOW) (* ; "Edited 19-Sep-2021 09:40 by rmk:")
(* ; "Edited 27-Feb-2021 20:07 by rmk:")
(* ; "Edited 1-Feb-88 19:00 by bvm:")
(* ;; "See FILE in a scrollable READONLY TEDIT window. If FILE is a LISP source file, copy first to a temporary NODIRCORE image file that interpretes the fontchange characters rather than showing black boxes.")
(CL:WITH-OPEN-FILE (STREAM FILE :DIRECTION :INPUT)
(LET ((SEESTREAM STREAM)
ENV TSTREAM)
(* ;; "No need to fiddle with a TEDIT file")
(IF (\TEDIT.FORMATTEDP1 STREAM)
ELSEIF (SETQ ENV (LISPSOURCEFILEP STREAM))
THEN
(* ;; "Lisp source file")
(\EXTERNALFORMAT STREAM ENV)
(SETQ SEESTREAM (OPENTEXTSTREAM))
(COPY.TEXT.TO.IMAGE STREAM SEESTREAM)
ELSE
(* ;; "Not a Lisp source file and not a Tedit file. If it is not random access, we copy it so we can scroll around.")
(CL:UNLESS (RANDACCESSP STREAM)
[SETQ SEESTREAM (OPENSTREAM '{NODIRCORE} 'BOTH 'NEW
`([TYPE ,(GETFILEINFO STREAM 'TYPE]
(FORMAT ,(\EXTERNALFORMAT STREAM]
(COPYBYTES STREAM SEESTREAM)))
[SETQ TSTREAM (TEXTSTREAM (TEDIT SEESTREAM WINDOW NIL '(READONLY T]
(WINDOWPROP (WFROMDS TSTREAM)
'TITLE
(CONCAT "SEE window for " (FULLNAME STREAM)))
(FULLNAME STREAM])
(TEDIT.CHARWIDTH
[LAMBDA (CH FONT TERMSA) (* jds "22-OCT-83 19:32")
@@ -2192,7 +2229,7 @@ Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993,
(* ; "TEDIT Support information")
(RPAQQ TEDITSYSTEMDATE "19-Apr-2018 12:22:04")
(RPAQQ TEDITSYSTEMDATE "19-Sep-2021 17:08:56")
(RPAQ TEDITSUPPORT "TEditSupport.PA")
(DEFINEQ
@@ -2216,21 +2253,21 @@ Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993,
(ADDTOVAR PRINTFILETYPES (TEDIT (TEST \TEDIT.FORMATTEDP1)
(EXTENSION (TEDIT))))
(PUTPROPS TEDIT COPYRIGHT ("Venue & Xerox Corporation" 1983 1984 1985 1986 1987 1988 1989 1990 1991
1992 1993 1995 1999 2018))
1992 1993 1995 1999 2018 2021))
(DECLARE%: DONTCOPY
(FILEMAP (NIL (4382 115216 (\TEDIT2 4392 . 7143) (COERCETEXTOBJ 7145 . 15921) (TEDIT 15923 . 20892) (
TEDIT.CHARWIDTH 20894 . 22918) (TEDIT.COPY 22920 . 31356) (TEDIT.DELETE 31358 . 32048) (
TEDIT.DO.BLUEPENDINGDELETE 32050 . 35117) (TEDIT.INSERT 35119 . 40649) (TEDIT.KILL 40651 . 42208) (
TEDIT.MAPLINES 42210 . 43609) (TEDIT.MAPPIECES 43611 . 44567) (TEDIT.MOVE 44569 . 54353) (TEDIT.QUIT
54355 . 56355) (TEDIT.STRINGWIDTH 56357 . 57028) (TEDIT.\INSERT 57030 . 59055) (TEXTOBJ 59057 . 60182)
(TEXTSTREAM 60184 . 61799) (\TEDIT.INCLUDE 61801 . 65701) (\TEDIT.INSERT.PIECES 65703 . 75618) (
\TEDIT.MOVE.PIECEMAPFN 75620 . 77699) (\TEDIT.OBJECT.SHOWSEL 77701 . 81330) (\TEDIT.RESTARTFN 81332 .
83327) (\TEDIT.CHARDELETE 83329 . 87291) (\TEDIT.COPY.PIECEMAPFN 87293 . 90518) (\TEDIT.DELETE 90520
. 98038) (\TEDIT.DIFFUSE.PARALOOKS 98040 . 100804) (\TEDIT.FOREIGN.COPY? 100806 . 104533) (
\TEDIT.QUIT 104535 . 107681) (\TEDIT.WORDDELETE 107683 . 112516) (\TEDIT1 112518 . 115214)) (115330
115446 (\CREATE.TEDIT.RESTART.MENU 115340 . 115444)) (115545 119234 (PLCHAIN 115555 . 115829) (
PRINTLINE 115831 . 118595) (SEEFILE 118597 . 119232)) (119275 138918 (TEDIT.INSERT.OBJECT 119285 .
128362) (TEDIT.EDIT.OBJECT 128364 . 130620) (TEDIT.FIND.OBJECT 130622 . 131515) (
TEDIT.FIND.OBJECT.SUBTREE 131517 . 132323) (TEDIT.PUT.OBJECT 132325 . 133984) (TEDIT.GET.OBJECT 133986
. 137185) (TEDIT.OBJECT.CHANGED 137187 . 138916)) (139196 139559 (MAKETEDITFORM 139206 . 139557)))))
(FILEMAP (NIL (4327 117111 (\TEDIT2 4337 . 7088) (COERCETEXTOBJ 7090 . 15866) (TEDIT 15868 . 20837) (
TEDIT-SEE 20839 . 22787) (TEDIT.CHARWIDTH 22789 . 24813) (TEDIT.COPY 24815 . 33251) (TEDIT.DELETE
33253 . 33943) (TEDIT.DO.BLUEPENDINGDELETE 33945 . 37012) (TEDIT.INSERT 37014 . 42544) (TEDIT.KILL
42546 . 44103) (TEDIT.MAPLINES 44105 . 45504) (TEDIT.MAPPIECES 45506 . 46462) (TEDIT.MOVE 46464 .
56248) (TEDIT.QUIT 56250 . 58250) (TEDIT.STRINGWIDTH 58252 . 58923) (TEDIT.\INSERT 58925 . 60950) (
TEXTOBJ 60952 . 62077) (TEXTSTREAM 62079 . 63694) (\TEDIT.INCLUDE 63696 . 67596) (\TEDIT.INSERT.PIECES
67598 . 77513) (\TEDIT.MOVE.PIECEMAPFN 77515 . 79594) (\TEDIT.OBJECT.SHOWSEL 79596 . 83225) (
\TEDIT.RESTARTFN 83227 . 85222) (\TEDIT.CHARDELETE 85224 . 89186) (\TEDIT.COPY.PIECEMAPFN 89188 .
92413) (\TEDIT.DELETE 92415 . 99933) (\TEDIT.DIFFUSE.PARALOOKS 99935 . 102699) (\TEDIT.FOREIGN.COPY?
102701 . 106428) (\TEDIT.QUIT 106430 . 109576) (\TEDIT.WORDDELETE 109578 . 114411) (\TEDIT1 114413 .
117109)) (117225 117341 (\CREATE.TEDIT.RESTART.MENU 117235 . 117339)) (117440 121129 (PLCHAIN 117450
. 117724) (PRINTLINE 117726 . 120490) (SEEFILE 120492 . 121127)) (121170 140813 (TEDIT.INSERT.OBJECT
121180 . 130257) (TEDIT.EDIT.OBJECT 130259 . 132515) (TEDIT.FIND.OBJECT 132517 . 133410) (
TEDIT.FIND.OBJECT.SUBTREE 133412 . 134218) (TEDIT.PUT.OBJECT 134220 . 135879) (TEDIT.GET.OBJECT 135881
. 139080) (TEDIT.OBJECT.CHANGED 139082 . 140811)) (141091 141454 (MAKETEDITFORM 141101 . 141452)))))
STOP