Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEDIT: New architecture for key bindings, plus better suggestions for initial window regions #2070

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
69b5c41
Implement new key binding architecture, better initial regions
rmkaplan Mar 17, 2025
12f6f4e
Added WHEELSCROLL here too
rmkaplan Mar 17, 2025
f23939e
Add function to retrieve the action bound to a character
rmkaplan Mar 17, 2025
7128918
Added a function to get the bindings for an action
rmkaplan Mar 17, 2025
d5d025b
Add Button menu item to main tedit menu
rmkaplan Mar 17, 2025
8da89d5
Add Buttons item to main Tedit menu
rmkaplan Mar 18, 2025
25cd4e1
A little cleanup while documenting
rmkaplan Mar 18, 2025
5ec8235
Documentation first draft
rmkaplan Mar 18, 2025
4cf857f
Replace "KEY" with "CHAR", added TEDIT.GET.ALL.CHARACTIONS TEDIT.GET.…
rmkaplan Mar 19, 2025
ab69e10
When the initial region isn't provided or can't be inferred
rmkaplan Mar 19, 2025
90fdbf7
Scrolling glitch when copying a line
rmkaplan Mar 19, 2025
d4f921a
Making sure that the selection is updated, dealing with empty document
rmkaplan Mar 19, 2025
0954b84
Reworking Tedit abbreviations
rmkaplan Mar 21, 2025
69fafcb
Merge branch 'master' into rmk76--TEDIT--new-architecture-for-functio…
rmkaplan Mar 21, 2025
955efc9
Smaller/larger move to next available font
rmkaplan Mar 22, 2025
f7614bb
Trigger actions directly
rmkaplan Mar 23, 2025
8dc0a30
glitch
rmkaplan Mar 23, 2025
272bfdd
+ or - as Size in the charlooks menu
rmkaplan Mar 23, 2025
d6ad263
Fix can't find font error
rmkaplan Mar 24, 2025
5158796
Fix initial window size
rmkaplan Mar 24, 2025
bdd92ec
Update TEDIT-RELEASENOTES.TEDIT
rmkaplan Mar 24, 2025
e14454e
Merge branch 'master' into rmk76--TEDIT--new-architecture-for-functio…
rmkaplan Mar 24, 2025
29a2fce
Fix GETREGION call for empty document
rmkaplan Mar 24, 2025
b293b9e
Cleaned up CHARNAME for comparison with Matt's CHARCODE.ENCODE
rmkaplan Mar 25, 2025
805ff73
recurse on CL:CHARACTERP
rmkaplan Mar 26, 2025
1e5dbb7
Remove unnecessary references to \NORUNCODE, add variable for source …
rmkaplan Mar 26, 2025
0aaf143
(CHARNAME NIL)=NIL
rmkaplan Mar 26, 2025
6ff7694
show "unbreakable"
rmkaplan Mar 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
410 changes: 197 additions & 213 deletions internal/TEDIT-DEBUG

Large diffs are not rendered by default.

Binary file modified internal/TEDIT-DEBUG.LCOM
Binary file not shown.
414 changes: 164 additions & 250 deletions library/tedit/TEDIT

Large diffs are not rendered by default.

436 changes: 269 additions & 167 deletions library/tedit/TEDIT-ABBREV

Large diffs are not rendered by default.

Binary file modified library/tedit/TEDIT-ABBREV.LCOM
Binary file not shown.
70 changes: 30 additions & 40 deletions library/tedit/TEDIT-BUTTONS
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)

(FILECREATED "16-Feb-2025 15:02:06" {WMEDLEY}<library>tedit>TEDIT-BUTTONS.;218 125051
(FILECREATED "24-Mar-2025 09:26:13" {WMEDLEY}<library>tedit>TEDIT-BUTTONS.;223 124611

:EDIT-BY rmk

:CHANGES-TO (FNS MB.FIELD.CREATE MB.SPEC.REMAINDER MB.NWAY.SIZEFN MB.NWAY.CREATE)
(VARS TEDIT-BUTTONSCOMS)
:CHANGES-TO (FNS MB.FIELD.INSURETYPE MB.BUTTONEVENTINFN)

:PREVIOUS-DATE "16-Feb-2025 11:10:40" {WMEDLEY}<library>tedit>TEDIT-BUTTONS.;214)
:PREVIOUS-DATE "14-Mar-2025 15:29:51" {WMEDLEY}<library>TEDIT>TEDIT-BUTTONS.;219)


(PRETTYCOMPRINT TEDIT-BUTTONSCOMS)
@@ -20,7 +19,7 @@
(COMS (* ;
 "Generic functions for the various types of buttons.")
(RECORDS MBARG)
(FNS MB.ADD MB.DELETE MB.GET MB.GET.MBARG TEDITMENU.STREAM TEDIT.BACKTOMAIN))
(FNS MB.ADD MB.DELETE MB.GET MB.GET.MBARG TEDIT.BACKTOMAIN))
[COMS (* ; "Simple Menu Button support")
(FNS MB.BUTTONEVENTINFN MB.DISPLAYFN MB.SETIMAGE MB.SIZEFN MB.WHENOPERATEDONFN
MB.COPYFN MB.GETFN MB.PUTFN MB.SHOWSELFN MB.CREATE MB.CHANGENAME MB.INIT
@@ -289,17 +288,6 @@
ARGENDPC _ ENDPC
ARGIDPC _ IDPC])

(TEDITMENU.STREAM
[LAMBDA (TSTREAM) (* ; "Edited 29-Sep-2024 15:29 by rmk")
(* ; "Edited 28-Aug-2024 15:48 by rmk")
(* ; "Edited 10-Apr-2023 09:53 by rmk")
(* jds "13-Aug-84 14:10")

(* ;; "returns the textstream of the teditmenu attached to this stream if any")

(for W in (ATTACHEDWINDOWS (\TEDIT.MAINW TSTREAM)) when (TEDITMENUP W "TEdit Menu")
do (RETURN (TEXTSTREAM W])

(TEDIT.BACKTOMAIN
[LAMBDA (MENUSTREAM) (* ; "Edited 20-Oct-2024 10:02 by rmk")
(* ; "Edited 25-Aug-2024 09:17 by rmk")
@@ -320,6 +308,7 @@

(MB.BUTTONEVENTINFN
[LAMBDA (OBJ MENUSTREAM SEL RELX RELY SELWINDOW HOSTSTREAM BUTTON)
(* ; "Edited 22-Mar-2025 14:00 by rmk")
(* ; "Edited 12-Jan-2025 13:03 by rmk")
(* ; "Edited 28-Dec-2024 20:21 by rmk")
(* ; "Edited 22-Aug-2024 16:26 by rmk")
@@ -330,7 +319,6 @@

(* ;; "Called when a mouse-button is down inside the object, RELX and RELY are in the objects coordinate system. Decline unless it is a normal left-button selection within the object.")

(TEDIT.PROMPTCLEAR MENUSTREAM)
(if [OR (EQ BUTTON 'RIGHT)
(SHIFTDOWNP 'CTRL)
(SHIFTDOWNP 'SHIFT)
@@ -1897,7 +1885,8 @@
XKERN _ 0])

(MB.FIELD.INSURETYPE
[LAMBDA (FIELDTYPE STR TSTREAM) (* ; "Edited 4-Dec-2024 20:09 by rmk")
[LAMBDA (FIELDTYPE STR TSTREAM) (* ; "Edited 24-Mar-2025 09:26 by rmk")
(* ; "Edited 4-Dec-2024 20:09 by rmk")
(* ; "Edited 8-Nov-2024 08:37 by rmk")
(* ; "Edited 29-Sep-2024 21:52 by rmk")
(* ; "Edited 31-Aug-2024 12:46 by rmk")
@@ -1918,6 +1907,8 @@
((TEXT STRING) (* ;
 "String should be a string, not NIL atom")
(SETQ VAL (OR STR '**EMPTY**)))
(TRIMMEDSTRING (CL:UNLESS (STREQUAL "" TRIMMED)
(SETQ VAL TRIMMED)))
((NUMBER PICAS POSITIVENUMBER SIGNEDNUMBER CARDINAL)
(SETQ TRIMMED (MKATOM TRIMMED))
(if (OR (EQ 0 (NCHARS TRIMMED))
@@ -1970,26 +1961,25 @@
(MB.FIELD.INIT)
)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (3338 19860 (MB.ADD 3348 . 9777) (MB.DELETE 9779 . 10153) (MB.GET 10155 . 16925) (
MB.GET.MBARG 16927 . 18596) (TEDITMENU.STREAM 18598 . 19265) (TEDIT.BACKTOMAIN 19267 . 19858)) (19904
39766 (MB.BUTTONEVENTINFN 19914 . 21408) (MB.DISPLAYFN 21410 . 23469) (MB.SETIMAGE 23471 . 24639) (
MB.SIZEFN 24641 . 26189) (MB.WHENOPERATEDONFN 26191 . 28140) (MB.COPYFN 28142 . 28600) (MB.GETFN 28602
. 29563) (MB.PUTFN 29565 . 30665) (MB.SHOWSELFN 30667 . 32176) (MB.CREATE 32178 . 36201) (
MB.CHANGENAME 36203 . 36685) (MB.INIT 36687 . 38148) (MB.TRACK.UNTIL 38150 . 38845) (MB.DON'T 38847 .
39143) (MB.SPEC.REMAINDER 39145 . 39764)) (39928 49918 (MB.3STATE.CREATE 39938 . 40802) (
MB.3STATE.DISPLAYFN 40804 . 41790) (MB.3STATE.SHOWSELFN 41792 . 44103) (MB.3STATE.INIT 44105 . 45516)
(MB.3STATE.SETSTATEFN 45518 . 46176) (MB.3STATE.BUTTONEVENTINFN 46178 . 49916)) (50073 80741 (
MB.NWAY.CREATE 50083 . 56125) (MB.NWAY.DISPLAYFN 56127 . 56990) (MB.NWAY.WHENOPERATEDONFN 56992 .
59182) (MB.NWAY.SIZEFN 59184 . 63120) (MB.NWAY.SELECT 63122 . 66692) (MB.NWAY.BUTTONEVENTINFN 66694 .
69906) (MB.NWAY.NEWMENUBUTTON 69908 . 70620) (MB.NWAY.COPYFN 70622 . 71589) (MB.NWAY.INIT 71591 .
73082) (MB.NWAY.ARRANGEBUTTONS 73084 . 75055) (MB.NWAY.ADDITEM 75057 . 78919) (MB.NWAY.FINDSUBOBJ
78921 . 79435) (MB.NWAY.SETSTATEFN 79437 . 80739)) (80820 92707 (MB.TOGGLE.CREATE 80830 . 81825) (
MB.TOGGLE.DISPLAYFN 81827 . 83310) (MB.TOGGLE.INIT 83312 . 85111) (MB.SET.TOGGLE 85113 . 86314) (
MB.TOGGLE.SETSTATEFN 86316 . 87156) (MB.TOGGLE.BUTTONEVENTINFN 87158 . 91362) (
MB.TOGGLE.WHENOPERATEDONFN 91364 . 92705)) (92788 124972 (MB.FIELD.CREATE 92798 . 98249) (
MB.FIELD.DISPLAYFN 98251 . 99042) (MB.FIELD.IMAGEBOXFN 99044 . 100526) (MB.FIELD.PREFIXCREATE 100528
. 104464) (MB.FIELD.SUFFIXCREATE 104466 . 106126) (MB.FIELD.INIT 106128 . 107895) (
MB.FIELD.WHENOPERATEDONFN 107897 . 109168) (MB.FIELD.GETSTATEFN 109170 . 113104) (MB.FIELD.SETSTATEFN
113106 . 117801) (MB.FIELD.BUTTONEVENTINFN 117803 . 120108) (MB.FIELD.SIZEFN 120110 . 120350) (
MB.FIELD.INSURETYPE 120352 . 124970)))))
(FILEMAP (NIL (3253 19106 (MB.ADD 3263 . 9692) (MB.DELETE 9694 . 10068) (MB.GET 10070 . 16840) (
MB.GET.MBARG 16842 . 18511) (TEDIT.BACKTOMAIN 18513 . 19104)) (19150 39086 (MB.BUTTONEVENTINFN 19160
. 20728) (MB.DISPLAYFN 20730 . 22789) (MB.SETIMAGE 22791 . 23959) (MB.SIZEFN 23961 . 25509) (
MB.WHENOPERATEDONFN 25511 . 27460) (MB.COPYFN 27462 . 27920) (MB.GETFN 27922 . 28883) (MB.PUTFN 28885
. 29985) (MB.SHOWSELFN 29987 . 31496) (MB.CREATE 31498 . 35521) (MB.CHANGENAME 35523 . 36005) (
MB.INIT 36007 . 37468) (MB.TRACK.UNTIL 37470 . 38165) (MB.DON'T 38167 . 38463) (MB.SPEC.REMAINDER
38465 . 39084)) (39248 49238 (MB.3STATE.CREATE 39258 . 40122) (MB.3STATE.DISPLAYFN 40124 . 41110) (
MB.3STATE.SHOWSELFN 41112 . 43423) (MB.3STATE.INIT 43425 . 44836) (MB.3STATE.SETSTATEFN 44838 . 45496)
(MB.3STATE.BUTTONEVENTINFN 45498 . 49236)) (49393 80061 (MB.NWAY.CREATE 49403 . 55445) (
MB.NWAY.DISPLAYFN 55447 . 56310) (MB.NWAY.WHENOPERATEDONFN 56312 . 58502) (MB.NWAY.SIZEFN 58504 .
62440) (MB.NWAY.SELECT 62442 . 66012) (MB.NWAY.BUTTONEVENTINFN 66014 . 69226) (MB.NWAY.NEWMENUBUTTON
69228 . 69940) (MB.NWAY.COPYFN 69942 . 70909) (MB.NWAY.INIT 70911 . 72402) (MB.NWAY.ARRANGEBUTTONS
72404 . 74375) (MB.NWAY.ADDITEM 74377 . 78239) (MB.NWAY.FINDSUBOBJ 78241 . 78755) (MB.NWAY.SETSTATEFN
78757 . 80059)) (80140 92027 (MB.TOGGLE.CREATE 80150 . 81145) (MB.TOGGLE.DISPLAYFN 81147 . 82630) (
MB.TOGGLE.INIT 82632 . 84431) (MB.SET.TOGGLE 84433 . 85634) (MB.TOGGLE.SETSTATEFN 85636 . 86476) (
MB.TOGGLE.BUTTONEVENTINFN 86478 . 90682) (MB.TOGGLE.WHENOPERATEDONFN 90684 . 92025)) (92108 124532 (
MB.FIELD.CREATE 92118 . 97569) (MB.FIELD.DISPLAYFN 97571 . 98362) (MB.FIELD.IMAGEBOXFN 98364 . 99846)
(MB.FIELD.PREFIXCREATE 99848 . 103784) (MB.FIELD.SUFFIXCREATE 103786 . 105446) (MB.FIELD.INIT 105448
. 107215) (MB.FIELD.WHENOPERATEDONFN 107217 . 108488) (MB.FIELD.GETSTATEFN 108490 . 112424) (
MB.FIELD.SETSTATEFN 112426 . 117121) (MB.FIELD.BUTTONEVENTINFN 117123 . 119428) (MB.FIELD.SIZEFN
119430 . 119670) (MB.FIELD.INSURETYPE 119672 . 124530)))))
STOP
Binary file modified library/tedit/TEDIT-BUTTONS.LCOM
Binary file not shown.
13 changes: 7 additions & 6 deletions library/tedit/TEDIT-CHAT
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)

(FILECREATED "24-Jun-2024 00:05:09" {WMEDLEY}<library>tedit>TEDIT-CHAT.;16 12363
(FILECREATED "11-Mar-2025 15:41:08" {WMEDLEY}<library>tedit>TEDIT-CHAT.;17 12449

:EDIT-BY rmk

:CHANGES-TO (FNS TEDITCHAT.CHARFN)

:PREVIOUS-DATE " 2-May-2024 18:09:26" {WMEDLEY}<library>tedit>TEDIT-CHAT.;15)
:PREVIOUS-DATE "24-Jun-2024 00:05:09" {WMEDLEY}<library>tedit>TEDIT-CHAT.;16)


(PRETTYCOMPRINT TEDIT-CHATCOMS)
@@ -70,7 +70,8 @@
(replace (CHAT.STATE HELD) of STATE with NIL])

(TEDITCHAT.CHARFN
[LAMBDA (CH CHAT.STATE) (* ; "Edited 24-Jun-2024 00:04 by rmk")
[LAMBDA (CH CHAT.STATE) (* ; "Edited 11-Mar-2025 15:40 by rmk")
(* ; "Edited 24-Jun-2024 00:04 by rmk")
(* ; "Edited 2-May-2024 18:09 by rmk")
(* ; "Edited 22-Dec-2023 23:57 by rmk")
(* ; "Edited 18-Mar-2023 20:08 by rmk")
@@ -79,7 +80,7 @@
(TEXTOBJ (TEXTOBJ TSTREAM)))
(\CARET.DOWN (FGETTOBJ TEXTOBJ DS))
(SELCHARQ CH
(BS (\TEDIT.CHARDELETE TSTREAM (FGETTOBJ TEXTOBJ SEL)))
(BS (\TEDIT.CHARDELETE TSTREAM))
(LF NIL)
(BOUT TSTREAM CH])
)
@@ -213,6 +214,6 @@
CHATDECLS)
)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (886 4544 (TEDITSTREAM.INIT 896 . 1823) (TEDITCHAT.MENUFN 1825 . 3661) (TEDITCHAT.CHARFN
3663 . 4542)) (4591 11475 (TEDIT.DISPLAYTEXT 4601 . 11473)))))
(FILEMAP (NIL (886 4630 (TEDITSTREAM.INIT 896 . 1823) (TEDITCHAT.MENUFN 1825 . 3661) (TEDITCHAT.CHARFN
3663 . 4628)) (4677 11561 (TEDIT.DISPLAYTEXT 4687 . 11559)))))
STOP
Binary file modified library/tedit/TEDIT-CHAT.LCOM
Binary file not shown.
Loading
Oops, something went wrong.