diff --git a/lispusers/EXAMINEDEFS b/lispusers/EXAMINEDEFS index 29d693b8f..4b1a111f8 100644 --- a/lispusers/EXAMINEDEFS +++ b/lispusers/EXAMINEDEFS @@ -1,12 +1,12 @@ (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10) -(FILECREATED "31-Mar-2025 13:53:38" {WMEDLEY}EXAMINEDEFS.;56 16674 +(FILECREATED " 6-Apr-2025 23:54:50" {WMEDLEY}EXAMINEDEFS.;57 16827 :EDIT-BY rmk - :CHANGES-TO (FNS EXAMINEDEFS) + :CHANGES-TO (FNS TEDITDEF) - :PREVIOUS-DATE "18-Feb-2025 23:01:57" {WMEDLEY}EXAMINEDEFS.;55) + :PREVIOUS-DATE "31-Mar-2025 13:53:38" {WMEDLEY}EXAMINEDEFS.;56) (PRETTYCOMPRINT EXAMINEDEFSCOMS) @@ -198,11 +198,12 @@ NIL TITLE2]) (TEDITDEF - [LAMBDA (NAME DEF TYPE READERENVIRONMENT WIDTH) (* ; "Edited 13-Oct-2023 00:23 by rmk") + [LAMBDA (NAME DEF TYPE READERENVIRONMENT WIDTH) (* ; "Edited 6-Apr-2025 23:53 by rmk") + (* ; "Edited 13-Oct-2023 00:23 by rmk") (* ; "Edited 23-Jun-2022 17:27 by rmk") (* ; "Edited 28-Jan-2022 23:36 by rmk") (* ; "Edited 12-Jan-2022 17:27 by rmk") - (LET ((TSTREAM (OPENTEXTSTREAM))) + (LET [(TSTREAM (OPENTEXTSTREAM NIL NIL `(BOUNDTABLE ,(TEDIT.ATOMBOUND.READTABLE] (DSPFONT DEFAULTFONT TSTREAM) (CL:WHEN WIDTH (LINELENGTH (IQUOTIENT WIDTH (CHARWIDTH (CHARCODE SPACE) @@ -280,6 +281,6 @@ (FILESLOAD (SYSLOAD) COMPARETEXT VERSIONDEFS) (DECLARE%: DONTCOPY - (FILEMAP (NIL (665 16443 (EXAMINEDEFS 675 . 10997) (EXAMINEFILES 10999 . 12481) (TEDITDEF 12483 . -14649) (EXVV 14651 . 16441))))) + (FILEMAP (NIL (662 16596 (EXAMINEDEFS 672 . 10994) (EXAMINEFILES 10996 . 12478) (TEDITDEF 12480 . +14802) (EXVV 14804 . 16594))))) STOP diff --git a/lispusers/EXAMINEDEFS.LCOM b/lispusers/EXAMINEDEFS.LCOM index 350ffb06c..5e21927cd 100644 Binary files a/lispusers/EXAMINEDEFS.LCOM and b/lispusers/EXAMINEDEFS.LCOM differ diff --git a/lispusers/GITFNS.TEDIT b/lispusers/GITFNS.TEDIT index 8b349023e..2e1a9c12b 100644 Binary files a/lispusers/GITFNS.TEDIT and b/lispusers/GITFNS.TEDIT differ diff --git a/lispusers/REGIONMANAGER b/lispusers/REGIONMANAGER index a48efebed..812f58a2d 100644 --- a/lispusers/REGIONMANAGER +++ b/lispusers/REGIONMANAGER @@ -1,12 +1,12 @@ (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10) -(FILECREATED "25-Nov-2024 17:59:00" {WMEDLEY}REGIONMANAGER.;135 42008 +(FILECREATED "20-Apr-2025 12:57:07" {WMEDLEY}REGIONMANAGER.;137 42626 :EDIT-BY rmk - :CHANGES-TO (FNS \RELCREATEREGION.REF) + :CHANGES-TO (FNS RM-CLOSEW) - :PREVIOUS-DATE "27-Oct-2024 21:59:33" {WMEDLEY}REGIONMANAGER.;134) + :PREVIOUS-DATE "25-Nov-2024 17:59:00" {WMEDLEY}REGIONMANAGER.;135) (PRETTYCOMPRINT REGIONMANAGERCOMS) @@ -172,7 +172,8 @@ WINDOW]) (RM-CLOSEW - [LAMBDA (WINDOW) (* ; "Edited 10-Oct-2023 22:11 by rmk") + [LAMBDA (WINDOW) (* ; "Edited 20-Apr-2025 12:40 by rmk") + (* ; "Edited 10-Oct-2023 22:11 by rmk") (* ;;  "Makes the window's typed region available for reuse, if the window is marked with a TYPEDREGION.") @@ -181,14 +182,19 @@ (* ;; "This replaces the particular typed-region in TYPED-REGIONS with the region that the window ended up with, perhaps after the user reshaped it. But (WINDOWPROP WINDOW 'REGION) doesn't include the prompt window, if it's there, and (WINDOWREGION WINDOW) would union in all of the attached windows (menus etc.) This code assumes that the promptwindow was taken out of the original region (lots of funky code does that), so it unions it back in to the REGION property to reconstruct the original typed-region. The alternative would be to have the windows region copy the original grabbed region and restore only that. But then we would be ignoring any reshaping adjustments.") + (* ;; "") + + (* ;; "There is another use case (e.g. Tedit window-splitting) where the window is reshaped for temporary purposes, but the new shape is not intended to replace the original typed-region if that region is reused. If the window has the property SAVED-TYPED-REGION (presumably a copy of the original one), then that region is installed in the TYPED-REGION before it is saved back on the TYPED-REGION-LIST") + (LET* [CLOSEVAL (TYPEDREGION (WINDOWPROP WINDOW 'TYPED-REGION)) (REGIONTYPE (CAR TYPEDREGION)) (TREGION (CDR TYPEDREGION)) [PWINDOW (WINDOWP (CAR (MKLIST (WINDOWPROP WINDOW 'PROMPTWINDOW] - [WREGION (CL:IF PWINDOW - (UNIONREGIONS (WINDOWPROP WINDOW 'REGION) - (WINDOWPROP PWINDOW 'REGION)) - (WINDOWPROP WINDOW 'REGION))] + [WREGION (OR (WINDOWPROP WINDOW 'SAVED-TYPED-REGION) + (CL:IF PWINDOW + (UNIONREGIONS (WINDOWPROP WINDOW 'REGION) + (WINDOWPROP PWINDOW 'REGION)) + (WINDOWPROP WINDOW 'REGION))] (TREGIONLIST (AND REGIONTYPE (OR (ASSOC REGIONTYPE TYPED-REGIONS) (CAR (PUSH TYPED-REGIONS (CONS REGIONTYPE] (CL:WHEN (AND (SETQ CLOSEVAL (CLOSEW.ORIG WINDOW)) @@ -746,11 +752,11 @@ ) ) (DECLARE%: DONTCOPY - (FILEMAP (NIL (1622 6740 (SET-TYPED-REGIONS 1632 . 3807) (GRAB-TYPED-REGION 3809 . 4835) ( -REGISTER-TYPED-REGION 4837 . 6134) (REGION-TYPE 6136 . 6738)) (6741 14810 (RM-CREATEW 6751 . 8874) ( -RM-CLOSEW 8876 . 11894) (RM-GETREGION 11896 . 14045) (CLOSE-TYPED-W 14047 . 14808)) (15453 22932 ( -RELCREATEREGION 15463 . 20086) (RELGETREGION 20088 . 22695) (RELCREATEPOSITION 22697 . 22930)) (22933 -30508 (\RELCREATEREGION.REF 22943 . 27465) (\RELCREATEREGION.SIZE 27467 . 30506)) (30561 39903 ( -RM-ATTACHWINDOW 30571 . 39901)) (39904 41638 (CLOSEWITH 39914 . 40441) (CLOSEWITH.DOIT 40443 . 40723) -(MOVEWITH 40725 . 41248) (MOVEWITH.DOIT 41250 . 41636))))) + (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))))) STOP diff --git a/lispusers/REGIONMANAGER.LCOM b/lispusers/REGIONMANAGER.LCOM index 5f7b6c23a..3edae72b1 100644 Binary files a/lispusers/REGIONMANAGER.LCOM and b/lispusers/REGIONMANAGER.LCOM differ diff --git a/lispusers/REGIONMANAGER.TEDIT b/lispusers/REGIONMANAGER.TEDIT index 94cb0d59b..7bab68ae8 100644 --- a/lispusers/REGIONMANAGER.TEDIT +++ b/lispusers/REGIONMANAGER.TEDIT @@ -11,7 +11,7 @@ REGIONMANAGER 4 By Ron Kaplan -This document created in December 2021, last edited September 2023. +This document created in December 2021, last edited April 2025. Medley comes equipped with a core set of functions for specifying regions and creating the windows that occupy those regions on the screen. But it can be disruptive if not irritating to have to draw out a new ghost region for every invocation of a particular application. Thus the common applications (e.g. TEDIT, SEDIT, DINFO...) implement particular strategies to reduce the number of times that a user has to sweep out a new region. They instead default to regions that were allocated for earlier invocations that are no longer active. TEDIT for example recycles the region of a session that was recently shut down, SEDIT allocates from a list of previous regions, DINFO always uses the same region, but FILEBROWSER always prompts for a new one. Applications that do recycle their regions tend to do so indiscrimately, without regard to the current arrangement of other windows on the screen or the role that those windows may play in higher-level applications. The REGIONMANAGER package provides simple extensions to the core region and window functions. These are aimed at giving users and application implementors more flexible and systematic control over the specification and reuse of screen regions. It introduces three new notions: @@ -25,6 +25,7 @@ REGIONMANAGER adds overlay veneers to the core CREATEW, CLOSEW, and GETREGION fu The REGION/INITREGION arguments may now be region-type atoms in addition to either NIL or particular regions as CREATEW and GETREGION otherwise allow. The type-atom will resolve to a region drawn from a predefined pool of regions associated with that type, if the pool has at least one that is not currently allocated to another window. If the pool has no available regions, then the pool will be enlarged with a region that the user produces from a normal ghost-region prompt, and the type-atom will then resolve to the newly installed region. A typed-region is marked as "inuse" and therefore unavailable when CREATEW assigns it to a window, and the extended CLOSEW marks it as again available when the window is closed. The region of the most recently closed window will be offered the next time a region of its type is requested. An example of how an application can take advantage of this facility is the TEDIT-PF-SEE package. This provides lightweight alternatives to the PF and SEE commands that print their output to scrollable read-only Tedit windows, specifying PF-TEDIT and SEE-TEDIT as their region types. The user can predefine a preference-ordered sequence of recyclable regions that bring up multiple output windows in a predictable tiled arrangement, without region-prompting for each invocation. +If a window opened with a typed region is reshaped, usually the new shape of that window is made available after closing for another window of the same type. But sometimes the reshaping is for transitory purposes, for example , the reshaping that Tedit uses to split windows, and the client wants more control over the region that will be recycled. The client can store the intended region as the value of the window property SAVED-TYPED-REGION before closing, and that is the region that will be recycled. The global variable TYPED-REGIONS is an alist that maintains the relationship between atomic type-names and the list of regions that belong to each type. The list is ordered according to preferences set by the user, and a type-atom is always resolved to the first unused region in its list. If the user is asked to sweep out a new region, that region is added at the end, as the least preferable. The function SET-TYPED-REGIONS is provided to add or replace TYPED-REGION entries. (SET-TYPED-REGIONS TYPELISTS REPLACE) [Function] TYPELISTS is an alist of the form @@ -82,10 +83,10 @@ If NEWPOS is the new position of PARENT, moves each of the move-children so that CLASSIC TERMINALMODERN TERMINALTERMINAL TIMESROMAN$  HRULE.GETFN   HRULE.GETFN  HRULE.GETFN   HRULE.GETFN  HRULE.GETFN -D   }/ [ CT  1  +@   }/ [ C*T @ 1   ; 3o)      4 n  o2 V@1 %!  A  &MmIS-g< 3E "  -l /4 v2C  &% "O=  , l)9 W~ & 4!Uh'2&$"&( )MDATE:iem3\z \ No newline at end of file +l /4 v2C  &% "O=  , l)9 W~ & 4!Uh'2&$"&( )MDATE:i*5Vz \ No newline at end of file diff --git a/lispusers/TEDIT-PF-SEE b/lispusers/TEDIT-PF-SEE index 6c19e0bc8..4d1845a9d 100644 --- a/lispusers/TEDIT-PF-SEE +++ b/lispusers/TEDIT-PF-SEE @@ -1,12 +1,12 @@ (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10) -(FILECREATED "26-Mar-2025 10:09:16" {WMEDLEY}TEDIT-PF-SEE.;137 11103 +(FILECREATED "14-Apr-2025 22:00:54" {WMEDLEY}TEDIT-PF-SEE.;141 11757 :EDIT-BY rmk - :CHANGES-TO (FNS PF-TEDIT) + :CHANGES-TO (FNS PF-TEDIT PF-TEDIT-FROM-TEXT) - :PREVIOUS-DATE "18-Feb-2025 23:39:40" {WMEDLEY}TEDIT-PF-SEE.;136) + :PREVIOUS-DATE " 7-Apr-2025 23:03:54" {WMEDLEY}TEDIT-PF-SEE.;140) (PRETTYCOMPRINT TEDIT-PF-SEECOMS) @@ -16,17 +16,19 @@ (COMMANDS ts tf) (FILES (SYSLOAD) REGIONMANAGER VERSIONDEFS) + (ALISTS (TEDIT.CHARACTIONS TEDIT-PF) + (TEDIT.CHARBINDINGS TEDIT-PF)) (P (MOVD? 'PFCOPYBYTES 'PFI.MAYBE.PP.DEFINITION) (MOVD? 'NILL (FUNCTION TEDIT.SETFUNCTION)) - (TEDIT.SETFUNCTION "Meta,T" (FUNCTION PF-TEDIT-FROM-TEXT)) - (TEDIT.SETFUNCTION "Meta,t" (FUNCTION PF-TEDIT-FROM-TEXT))) + (TEDIT.INSTALL.CHARBINDINGS)) (DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS (NLAMA) (NLAML) (LAMA]) (DEFINEQ (PF-TEDIT - [LAMBDA (FN IFILES VERSION REPRINT) (* ; "Edited 26-Mar-2025 10:08 by rmk") + [LAMBDA (FN IFILES VERSION REPRINT) (* ; "Edited 14-Apr-2025 22:00 by rmk") + (* ; "Edited 26-Mar-2025 10:08 by rmk") (* ; "Edited 18-Feb-2025 23:39 by rmk") (* ; "Edited 6-Dec-2024 19:15 by rmk") (* ; "Edited 27-Aug-2024 13:03 by rmk") @@ -67,8 +69,8 @@ (SETQ REPRINT T) [SETQ IFILES (LDIFFERENCE IFILES '(t T]) (CL:UNLESS IFILES - (SETQ IFILES (APPEND (WHEREIS FN 'FNS T) - (WHEREIS FN 'FUNCTIONS T)))) + (SETQ IFILES (WHEREIS FN '(FNS FUNCTIONS) + T))) (IF IFILES THEN (* ; "skip compiled files") @@ -151,24 +153,29 @@ ELSE (PRINTOUT T FN " has no function definition" T]) (PF-TEDIT-FROM-TEXT - [LAMBDA (TSTREAM TEXTOBJ SEL) (* ; "Edited 5-Dec-2024 22:20 by rmk") + [LAMBDA (TSTREAM TEXTOBJ SEL) (* ; "Edited 14-Apr-2025 21:59 by rmk") + (* ; "Edited 7-Apr-2025 23:03 by rmk") + (* ; "Edited 5-Dec-2024 22:20 by rmk") (* ; "Edited 26-Aug-2024 23:13 by rmk") - (* ;; "The function key for the meta,T and meta,t keys. This shows in a separate Tedit window the definition in TSTREAM of the function named by the selection SEL.") + (* ;; "The function key for the meta,T and meta,t keys. This shows in a separate Tedit window the definition in TSTREAM of the function named by the selection SEL. If this TEDIT is open on a source file that contains the selected function, that definition is used. Otherwise, the first file that WHEREIS returns.") (SETQ TSTREAM (TEXTSTREAM TSTREAM)) (CL:UNLESS SEL (SETQ SEL (TEDIT.GETSEL TSTREAM))) - (LET [[FILENAME (OR (TEXTPROP TSTREAM 'FILENAME) + (LET ([THISFILE (OR (TEXTPROP TSTREAM 'FILENAME) (AND (\TEDIT.PRIMARYPANE TSTREAM) (CADR (WINDOWPROP (\TEDIT.PRIMARYPANE TSTREAM TSTREAM) 'TF] - (FN (MKATOM (TEDIT.SEL.AS.STRING TSTREAM SEL] + (FN (MKATOM (TEDIT.SEL.AS.STRING TSTREAM SEL))) + ALLFILES) (if (EQ 0 (NCHARS FN)) then (TEDIT.PROMPTPRINT TSTREAM "Please select a function to display" T) - elseif FILENAME - then [PF-TEDIT FN (CAR (MEMB (FILENAMEFIELD FILENAME) - (WHEREIS FN NIL T] + elseif (SETQ ALLFILES (WHEREIS FN '(FNS FUNCTIONS) + T)) + then (PF-TEDIT FN (CAR (OR (MEMB (FILENAMEFIELD THISFILE) + ALLFILES) + ALLFILES))) else (TEDIT.PROMPTPRINT TSTREAM (CONCAT FN " not found") T]) ) @@ -189,13 +196,15 @@ (FILESLOAD (SYSLOAD) REGIONMANAGER VERSIONDEFS) +(ADDTOVAR TEDIT.CHARACTIONS (TEDIT-PF PF-TEDIT-FROM-TEXT)) + +(ADDTOVAR TEDIT.CHARBINDINGS (TEDIT-PF "Meta,t" "Meta,T")) + (MOVD? 'PFCOPYBYTES 'PFI.MAYBE.PP.DEFINITION) (MOVD? 'NILL (FUNCTION TEDIT.SETFUNCTION)) -(TEDIT.SETFUNCTION "Meta,T" (FUNCTION PF-TEDIT-FROM-TEXT)) - -(TEDIT.SETFUNCTION "Meta,t" (FUNCTION PF-TEDIT-FROM-TEXT)) +(TEDIT.INSTALL.CHARBINDINGS) (DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDTOVAR NLAMA ) @@ -205,5 +214,5 @@ (ADDTOVAR LAMA ) ) (DECLARE%: DONTCOPY - (FILEMAP (NIL (1007 10079 (PF-TEDIT 1017 . 8865) (PF-TEDIT-FROM-TEXT 8867 . 10077))))) + (FILEMAP (NIL (1017 10695 (PF-TEDIT 1027 . 8961) (PF-TEDIT-FROM-TEXT 8963 . 10693))))) STOP diff --git a/lispusers/TEDIT-PF-SEE.LCOM b/lispusers/TEDIT-PF-SEE.LCOM index 94a0d8d0c..5a4511116 100644 Binary files a/lispusers/TEDIT-PF-SEE.LCOM and b/lispusers/TEDIT-PF-SEE.LCOM differ