teco

Check-in [7d89c9e50c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix up interface between emacs and undo
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:7d89c9e50c5aba92cff95e93f6ee24835e2c45437d1a1745047ee9753dad918e
User & Date: ajv-899-334-8894@vsta.org 2013-12-19 19:31:52
Context
2013-12-20
00:55
Tidy up commenting check-in: 2ae9116804 user: ajv-899-334-8894@vsta.org tags: master, trunk
2013-12-19
19:31
Fix up interface between emacs and undo check-in: 7d89c9e50c user: ajv-899-334-8894@vsta.org tags: master, trunk
00:23
Update emacs for undo. Fix bug in recording delete. Refactor undo struct allocation. Move back to gcc (clang bugs). check-in: d373d76bf4 user: ajv-899-334-8894@vsta.org tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to lib/emacs.tec.

1
2
3








4
5
6
7
8
9
10
..
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35











36
37
38
39
40
41
42
..
92
93
94
95
96
97
98


99
100
101
102
103
104
105
106
!* emacs.tec--do emacs-style motion and editing in TECO !
!*  Clearly not a complete emulation, but sometimes convenient !
!*  for moving about. !








@^ue\

!* Preserve Q registers !
[k

!* Clear kill buffer !
^uk
................................................................................

!* Dot !
.ud

!* endless loop for commands !
<

 !* advance undo versioning !
 :fu

 !* Read key into Qa, update and sleep if none available !
 ^tua qa+1"e 1w et-32et ^tua et#40et'

 !* Bump command counter !
 %e

 !* If text, insert and iterate !
 qa-31"g qai f<'












 !* Map delete key to erase !
 qa-127"e -1d f<'

 !* Else vector out to actions for supported keys !
 qa@o/N,CA,CB,N,CD,CE,CF,N,CH,CI,CJ,CK,CL,CM,CN,CO,CP,CQ,N,N,N,N,CV,CW,CX,CY,N,ES/

................................................................................

!CL!
 0,7:w 1,7:w f<

!CM!
 1ur
 @i/


/ f<

!CN!
 .ua 0l qa-.ub
 1l qb<::@s/^El/"s 1r 1; | 1c'> f<

!CO!
 .ua @i/



>
>
>
>
>
>
>
>







 







<
<
<







|
>
>
>
>
>
>
>
>
>
>
>







 







>
>
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
..
26
27
28
29
30
31
32



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
...
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
!* emacs.tec--do emacs-style motion and editing in TECO !
!*  Clearly not a complete emulation, but sometimes convenient !
!*  for moving about. !
!* Textual Q registers: !
!*  k holds the kill buffer text !
!* Numberic Q registers: !
!*  a - currently typed char !
!*  b,c - scratch !
!*  d - "other" position mark !
!*  e - Last ^k position !
!*  f - Last command char !
@^ue\

!* Preserve Q registers !
[k

!* Clear kill buffer !
^uk
................................................................................

!* Dot !
.ud

!* endless loop for commands !
<




 !* Read key into Qa, update and sleep if none available !
 ^tua qa+1"e 1w et-32et ^tua et#40et'

 !* Bump command counter !
 %e

 !* If text, insert and iterate !
 qa-31"g
  qf-32"l :fu' !* Moving from command to insert, rev undo !
  qauf
  qai
  f<'

 !* Rev undo version when distinct command. !
 !* This lets d/k's group together !
 !* Group <return> with textual input !
 qa-13"e qf-32"l :fu qauf | 32uf '
  |  qa= qa-qf"n :fu qauf '
 '

 !* Map delete key to erase !
 qa-127"e -1d f<'

 !* Else vector out to actions for supported keys !
 qa@o/N,CA,CB,N,CD,CE,CF,N,CH,CI,CJ,CK,CL,CM,CN,CO,CP,CQ,N,N,N,N,CV,CW,CX,CY,N,ES/

................................................................................

!CL!
 0,7:w 1,7:w f<

!CM!
 1ur
 @i/
/
 ^t !* Throw away the synthesized LF !
 f<

!CN!
 .ua 0l qa-.ub
 1l qb<::@s/^El/"s 1r 1; | 1c'> f<

!CO!
 .ua @i/