home *** CD-ROM | disk | FTP | other *** search
Emacs Compiled Lisp | 1992-08-29 | 4.9 KB |
view JSON data
|
view as text
|
open on a Mac
|
open on a PC
This file was processed as: Emacs Compiled Lisp
(other/emacsCompiledLisp).
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
1%
| dexvert
| Emacs Compiled Lisp (other/emacsCompiledLisp)
| magic
| Unsupported |
100%
| file
| Emacs v18 byte-compiled Lisp data
| default
| |
99%
| file
| data
| default
| |
100%
| gt2
| Kopftext: '(defun operate-on-rectangle (function start end coerce-tabs) '
| default (weak)
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 0a 28 64 65 66 75 6e 20 | 6f 70 65 72 61 74 65 2d |.(defun |operate-|
|00000010| 6f 6e 2d 72 65 63 74 61 | 6e 67 6c 65 20 28 66 75 |on-recta|ngle (fu|
|00000020| 6e 63 74 69 6f 6e 20 73 | 74 61 72 74 20 65 6e 64 |nction s|tart end|
|00000030| 20 63 6f 65 72 63 65 2d | 74 61 62 73 29 20 22 5c | coerce-|tabs) "\|
|00000040| 0a 43 61 6c 6c 20 46 55 | 4e 43 54 49 4f 4e 20 66 |.Call FU|NCTION f|
|00000050| 6f 72 20 65 61 63 68 20 | 6c 69 6e 65 20 6f 66 20 |or each |line of |
|00000060| 72 65 63 74 61 6e 67 6c | 65 20 77 69 74 68 20 63 |rectangl|e with c|
|00000070| 6f 72 6e 65 72 73 20 61 | 74 20 53 54 41 52 54 2c |orners a|t START,|
|00000080| 20 45 4e 44 2e 0a 49 66 | 20 43 4f 45 52 43 45 2d | END..If| COERCE-|
|00000090| 54 41 42 53 20 69 73 20 | 6e 6f 6e 2d 6e 69 6c 2c |TABS is |non-nil,|
|000000a0| 20 63 6f 6e 76 65 72 74 | 20 6d 75 6c 74 69 2d 63 | convert| multi-c|
|000000b0| 6f 6c 75 6d 6e 20 63 68 | 61 72 61 63 74 65 72 73 |olumn ch|aracters|
|000000c0| 0a 74 68 61 74 20 73 70 | 61 6e 20 74 68 65 20 73 |.that sp|an the s|
|000000d0| 74 61 72 74 69 6e 67 20 | 6f 72 20 65 6e 64 69 6e |tarting |or endin|
|000000e0| 67 20 63 6f 6c 75 6d 6e | 73 20 6f 6e 20 61 6e 79 |g column|s on any|
|000000f0| 20 6c 69 6e 65 0a 74 6f | 20 6d 75 6c 74 69 70 6c | line.to| multipl|
|00000100| 65 20 73 70 61 63 65 73 | 20 62 65 66 6f 72 65 20 |e spaces| before |
|00000110| 63 61 6c 6c 69 6e 67 20 | 46 55 4e 43 54 49 4f 4e |calling |FUNCTION|
|00000120| 2e 0a 46 55 4e 43 54 49 | 4f 4e 20 69 73 20 63 61 |..FUNCTI|ON is ca|
|00000130| 6c 6c 65 64 20 77 69 74 | 68 20 74 68 72 65 65 20 |lled wit|h three |
|00000140| 61 72 67 75 6d 65 6e 74 | 73 3a 0a 20 70 6f 73 69 |argument|s:. posi|
|00000150| 74 69 6f 6e 20 6f 66 20 | 73 74 61 72 74 20 6f 66 |tion of |start of|
|00000160| 20 73 65 67 6d 65 6e 74 | 20 6f 66 20 74 68 69 73 | segment| of this|
|00000170| 20 6c 69 6e 65 20 77 69 | 74 68 69 6e 20 74 68 65 | line wi|thin the|
|00000180| 20 72 65 63 74 61 6e 67 | 6c 65 2c 0a 20 6e 75 6d | rectang|le,. num|
|00000190| 62 65 72 20 6f 66 20 63 | 6f 6c 75 6d 6e 73 20 74 |ber of c|olumns t|
|000001a0| 68 61 74 20 62 65 6c 6f | 6e 67 20 74 6f 20 72 65 |hat belo|ng to re|
|000001b0| 63 74 61 6e 67 6c 65 20 | 62 75 74 20 61 72 65 20 |ctangle |but are |
|000001c0| 62 65 66 6f 72 65 20 74 | 68 61 74 20 70 6f 73 69 |before t|hat posi|
|000001d0| 74 69 6f 6e 2c 0a 20 6e | 75 6d 62 65 72 20 6f 66 |tion,. n|umber of|
|000001e0| 20 63 6f 6c 75 6d 6e 73 | 20 74 68 61 74 20 62 65 | columns| that be|
|000001f0| 6c 6f 6e 67 20 74 6f 20 | 72 65 63 74 61 6e 67 6c |long to |rectangl|
|00000200| 65 20 62 75 74 20 61 72 | 65 20 61 66 74 65 72 20 |e but ar|e after |
|00000210| 70 6f 69 6e 74 2e 0a 50 | 6f 69 6e 74 20 69 73 20 |point..P|oint is |
|00000220| 61 74 20 74 68 65 20 65 | 6e 64 20 6f 66 20 74 68 |at the e|nd of th|
|00000230| 65 20 73 65 67 6d 65 6e | 74 20 6f 66 20 74 68 69 |e segmen|t of thi|
|00000240| 73 20 6c 69 6e 65 20 77 | 69 74 68 69 6e 20 74 68 |s line w|ithin th|
|00000250| 65 20 72 65 63 74 61 6e | 67 6c 65 2e 22 20 28 62 |e rectan|gle." (b|
|00000260| 79 74 65 2d 63 6f 64 65 | 20 22 cc cc cc cc 1b 1a |yte-code| "......|
|00000270| 19 18 8a 0c 62 88 69 89 | 10 88 cd 20 88 60 89 11 |....b.i.|... .`..|
|00000280| 29 88 8a 0d 62 88 69 89 | 12 88 ce cf 21 88 d0 20 |)...b.i.|....!.. |
|00000290| 89 13 29 88 0a 08 57 85 | 3a 00 08 1e 06 0a 10 0e |..)...W.|:.......|
|000002a0| 06 89 12 29 88 d1 0a 08 | 5c 22 85 bb 00 8a 09 62 |...)....|\".....b|
|000002b0| 88 60 0b 57 85 ba 00 cc | cc cc 1e 09 1e 08 1e 07 |.`.W....|........|
|000002c0| d2 08 21 88 0e 0a 85 67 | 00 69 08 56 85 67 00 d3 |..!....g|.i.V.g..|
|000002d0| 08 21 88 69 08 5a 89 16 | 08 88 60 89 16 07 88 d2 |.!.i.Z..|..`.....|
|000002e0| 0a 21 88 69 0a 56 85 8c | 00 0e 0a 83 89 00 d3 0a |.!.i.V..|........|
|000002f0| 21 82 8c 00 d4 d5 21 88 | 0a 69 5a 89 16 09 88 0e |!.....!.|.iZ.....|
|00000300| 08 d6 57 85 a6 00 0e 09 | 0e 08 5c 5c 16 09 d6 89 |..W.....|..\\....|
|00000310| 16 08 88 d7 0e 0b 0e 07 | 0e 08 0e 09 24 2b 88 ce |........|....$+..|
|00000320| cf 21 88 82 46 00 29 88 | 0a 08 5a 2c 87 22 20 5b |.!..F.).|..Z,." [|
|00000330| 73 74 61 72 74 63 6f 6c | 20 73 74 61 72 74 6c 69 |startcol| startli|
|00000340| 6e 65 70 6f 73 20 65 6e | 64 63 6f 6c 20 65 6e 64 |nepos en|dcol end|
|00000350| 6c 69 6e 65 70 6f 73 20 | 73 74 61 72 74 20 65 6e |linepos |start en|
|00000360| 64 20 74 65 6d 20 73 74 | 61 72 74 70 6f 73 20 62 |d tem st|artpos b|
|00000370| 65 67 65 78 74 72 61 20 | 65 6e 64 65 78 74 72 61 |egextra |endextra|
|00000380| 20 63 6f 65 72 63 65 2d | 74 61 62 73 20 66 75 6e | coerce-|tabs fun|
|00000390| 63 74 69 6f 6e 20 6e 69 | 6c 20 62 65 67 69 6e 6e |ction ni|l beginn|
|000003a0| 69 6e 67 2d 6f 66 2d 6c | 69 6e 65 20 66 6f 72 77 |ing-of-l|ine forw|
|000003b0| 61 72 64 2d 6c 69 6e 65 | 20 31 20 70 6f 69 6e 74 |ard-line| 1 point|
|000003c0| 2d 6d 61 72 6b 65 72 20 | 2f 3d 20 6d 6f 76 65 2d |-marker |/= move-|
|000003d0| 74 6f 2d 63 6f 6c 75 6d | 6e 20 72 65 63 74 61 6e |to-colum|n rectan|
|000003e0| 67 6c 65 2d 63 6f 65 72 | 63 65 2d 74 61 62 20 66 |gle-coer|ce-tab f|
|000003f0| 6f 72 77 61 72 64 2d 63 | 68 61 72 20 2d 31 20 30 |orward-c|har -1 0|
|00000400| 20 66 75 6e 63 61 6c 6c | 5d 20 31 35 29 29 0a 0a | funcall|] 15))..|
|00000410| 28 64 65 66 75 6e 20 64 | 65 6c 65 74 65 2d 72 65 |(defun d|elete-re|
|00000420| 63 74 61 6e 67 6c 65 2d | 6c 69 6e 65 20 28 73 74 |ctangle-|line (st|
|00000430| 61 72 74 64 65 6c 70 6f | 73 20 69 67 6e 6f 72 65 |artdelpo|s ignore|
|00000440| 20 69 67 6e 6f 72 65 29 | 20 28 62 79 74 65 2d 63 | ignore)| (byte-c|
|00000450| 6f 64 65 20 22 c1 08 60 | 5c 22 87 22 20 5b 73 74 |ode "..`|\"." [st|
|00000460| 61 72 74 64 65 6c 70 6f | 73 20 64 65 6c 65 74 65 |artdelpo|s delete|
|00000470| 2d 72 65 67 69 6f 6e 5d | 20 33 29 29 0a 0a 28 64 |-region]| 3))..(d|
|00000480| 65 66 75 6e 20 64 65 6c | 65 74 65 2d 65 78 74 72 |efun del|ete-extr|
|00000490| 61 63 74 2d 72 65 63 74 | 61 6e 67 6c 65 2d 6c 69 |act-rect|angle-li|
|000004a0| 6e 65 20 28 73 74 61 72 | 74 64 65 6c 70 6f 73 20 |ne (star|tdelpos |
|000004b0| 62 65 67 65 78 74 72 61 | 20 65 6e 64 65 78 74 72 |begextra| endextr|
|000004c0| 61 29 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 8a |a) (byte|-code ".|
|000004d0| c3 08 09 0a 23 29 88 c4 | 08 60 5c 22 87 22 20 5b |....#)..|.`\"." [|
|000004e0| 73 74 61 72 74 64 65 6c | 70 6f 73 20 62 65 67 65 |startdel|pos bege|
|000004f0| 78 74 72 61 20 65 6e 64 | 65 78 74 72 61 20 65 78 |xtra end|extra ex|
|00000500| 74 72 61 63 74 2d 72 65 | 63 74 61 6e 67 6c 65 2d |tract-re|ctangle-|
|00000510| 6c 69 6e 65 20 64 65 6c | 65 74 65 2d 72 65 67 69 |line del|ete-regi|
|00000520| 6f 6e 5d 20 34 29 29 0a | 0a 28 64 65 66 75 6e 20 |on] 4)).|.(defun |
|00000530| 65 78 74 72 61 63 74 2d | 72 65 63 74 61 6e 67 6c |extract-|rectangl|
|00000540| 65 2d 6c 69 6e 65 20 28 | 73 74 61 72 74 64 65 6c |e-line (|startdel|
|00000550| 70 6f 73 20 62 65 67 65 | 78 74 72 61 20 65 6e 64 |pos bege|xtra end|
|00000560| 65 78 74 72 61 29 20 28 | 62 79 74 65 2d 63 6f 64 |extra) (|byte-cod|
|00000570| 65 20 22 c8 09 60 5c 22 | 60 1a 18 09 62 88 c9 ca |e "..`\"|`...b...|
|00000580| 0a c3 23 85 38 00 69 8a | cb cc 21 88 69 29 5a 1c |..#.8.i.|..!.i)Z.|
|00000590| 08 cd ce 60 0a cf 23 4f | d0 0c 21 08 08 47 60 0a |...`..#O|..!..G`.|
|000005a0| 5a 5c 5c d1 4f 51 89 10 | 29 88 82 0a 00 88 0d cd |Z\\.OQ..|).......|
|000005b0| 56 86 43 00 0e 06 cd 56 | 85 51 00 d0 0d 21 08 d0 |V.C....V|.Q...!..|
|000005c0| 0e 06 21 51 89 10 88 08 | 0e 07 42 89 16 07 2a 87 |..!Q....|..B...*.|
|000005d0| 22 20 5b 6c 69 6e 65 20 | 73 74 61 72 74 64 65 6c |" [line |startdel|
|000005e0| 70 6f 73 20 65 6e 64 20 | 74 20 77 69 64 74 68 20 |pos end |t width |
|000005f0| 62 65 67 65 78 74 72 61 | 20 65 6e 64 65 78 74 72 |begextra| endextr|
|00000600| 61 20 6c 69 6e 65 73 20 | 62 75 66 66 65 72 2d 73 |a lines |buffer-s|
|00000610| 75 62 73 74 72 69 6e 67 | 20 73 65 61 72 63 68 2d |ubstring| search-|
|00000620| 66 6f 72 77 61 72 64 20 | 22 09 22 20 66 6f 72 77 |forward |"." forw|
|00000630| 61 72 64 2d 63 68 61 72 | 20 2d 31 20 30 20 2d 20 |ard-char| -1 0 - |
|00000640| 31 20 73 70 61 63 65 73 | 2d 73 74 72 69 6e 67 20 |1 spaces|-string |
|00000650| 6e 69 6c 5d 20 31 32 29 | 29 0a 0a 28 64 65 66 63 |nil] 12)|)..(defc|
|00000660| 6f 6e 73 74 20 73 70 61 | 63 65 73 2d 73 74 72 69 |onst spa|ces-stri|
|00000670| 6e 67 73 20 28 71 75 6f | 74 65 20 5b 22 22 20 22 |ngs (quo|te ["" "|
|00000680| 20 22 20 22 20 20 22 20 | 22 20 20 20 22 20 22 20 | " " " |" " " |
|00000690| 20 20 20 22 20 22 20 20 | 20 20 20 22 20 22 20 20 | " " | " " |
|000006a0| 20 20 20 20 22 20 22 20 | 20 20 20 20 20 20 22 20 | " " | " |
|000006b0| 22 20 20 20 20 20 20 20 | 20 22 5d 29 29 0a 0a 28 |" | "]))..(|
|000006c0| 64 65 66 75 6e 20 73 70 | 61 63 65 73 2d 73 74 72 |defun sp|aces-str|
|000006d0| 69 6e 67 20 28 6e 29 20 | 28 62 79 74 65 2d 63 6f |ing (n) |(byte-co|
|000006e0| 64 65 20 22 08 c3 58 83 | 0c 00 09 08 48 82 28 00 |de "..X.|....H.(.|
|000006f0| c4 1a 08 c3 56 85 21 00 | c5 0a 50 12 08 c3 5a 89 |....V.!.|..P...Z.|
|00000700| 10 88 82 0e 00 88 0a 09 | 08 48 50 29 87 22 20 5b |........|.HP)." [|
|00000710| 6e 20 73 70 61 63 65 73 | 2d 73 74 72 69 6e 67 73 |n spaces|-strings|
|00000720| 20 76 61 6c 20 38 20 22 | 22 20 22 20 20 20 20 20 | val 8 "|" " |
|00000730| 20 20 20 22 5d 20 33 29 | 29 0a 0a 28 64 65 66 75 | "] 3)|)..(defu|
|00000740| 6e 20 64 65 6c 65 74 65 | 2d 72 65 63 74 61 6e 67 |n delete|-rectang|
|00000750| 6c 65 20 28 73 74 61 72 | 74 20 65 6e 64 29 20 22 |le (star|t end) "|
|00000760| 5c 0a 44 65 6c 65 74 65 | 20 28 64 6f 6e 27 74 20 |\.Delete| (don't |
|00000770| 73 61 76 65 29 20 74 65 | 78 74 20 69 6e 20 72 65 |save) te|xt in re|
|00000780| 63 74 61 6e 67 6c 65 20 | 77 69 74 68 20 70 6f 69 |ctangle |with poi|
|00000790| 6e 74 20 61 6e 64 20 6d | 61 72 6b 20 61 73 20 63 |nt and m|ark as c|
|000007a0| 6f 72 6e 65 72 73 2e 0a | 54 68 65 20 73 61 6d 65 |orners..|The same|
|000007b0| 20 72 61 6e 67 65 20 6f | 66 20 63 6f 6c 75 6d 6e | range o|f column|
|000007c0| 73 20 69 73 20 64 65 6c | 65 74 65 64 20 69 6e 20 |s is del|eted in |
|000007d0| 65 61 63 68 20 6c 69 6e | 65 0a 73 74 61 72 74 69 |each lin|e.starti|
|000007e0| 6e 67 20 77 69 74 68 20 | 74 68 65 20 6c 69 6e 65 |ng with |the line|
|000007f0| 20 77 68 65 72 65 20 74 | 68 65 20 72 65 67 69 6f | where t|he regio|
|00000800| 6e 20 62 65 67 69 6e 73 | 0a 61 6e 64 20 65 6e 64 |n begins|.and end|
|00000810| 69 6e 67 20 77 69 74 68 | 20 74 68 65 20 6c 69 6e |ing with| the lin|
|00000820| 65 20 77 68 65 72 65 20 | 74 68 65 20 72 65 67 69 |e where |the regi|
|00000830| 6f 6e 20 65 6e 64 73 2e | 22 20 28 69 6e 74 65 72 |on ends.|" (inter|
|00000840| 61 63 74 69 76 65 20 22 | 72 22 29 20 28 62 79 74 |active "|r") (byt|
|00000850| 65 2d 63 6f 64 65 20 22 | c3 88 c4 c5 08 09 c2 24 |e-code "|.......$|
|00000860| 87 22 20 5b 73 74 61 72 | 74 20 65 6e 64 20 74 20 |." [star|t end t |
|00000870| 6e 69 6c 20 6f 70 65 72 | 61 74 65 2d 6f 6e 2d 72 |nil oper|ate-on-r|
|00000880| 65 63 74 61 6e 67 6c 65 | 20 64 65 6c 65 74 65 2d |ectangle| delete-|
|00000890| 72 65 63 74 61 6e 67 6c | 65 2d 6c 69 6e 65 5d 20 |rectangl|e-line] |
|000008a0| 35 29 29 0a 0a 28 64 65 | 66 75 6e 20 64 65 6c 65 |5))..(de|fun dele|
|000008b0| 74 65 2d 65 78 74 72 61 | 63 74 2d 72 65 63 74 61 |te-extra|ct-recta|
|000008c0| 6e 67 6c 65 20 28 73 74 | 61 72 74 20 65 6e 64 29 |ngle (st|art end)|
|000008d0| 20 22 5c 0a 52 65 74 75 | 72 6e 20 61 6e 64 20 64 | "\.Retu|rn and d|
|000008e0| 65 6c 65 74 65 20 63 6f | 6e 74 65 6e 74 73 20 6f |elete co|ntents o|
|000008f0| 66 20 72 65 63 74 61 6e | 67 6c 65 20 77 69 74 68 |f rectan|gle with|
|00000900| 20 63 6f 72 6e 65 72 73 | 20 61 74 20 53 54 41 52 | corners| at STAR|
|00000910| 54 20 61 6e 64 20 45 4e | 44 2e 0a 56 61 6c 75 65 |T and EN|D..Value|
|00000920| 20 69 73 20 6c 69 73 74 | 20 6f 66 20 73 74 72 69 | is list| of stri|
|00000930| 6e 67 73 2c 20 6f 6e 65 | 20 66 6f 72 20 65 61 63 |ngs, one| for eac|
|00000940| 68 20 6c 69 6e 65 20 6f | 66 20 74 68 65 20 72 65 |h line o|f the re|
|00000950| 63 74 61 6e 67 6c 65 2e | 22 20 28 62 79 74 65 2d |ctangle.|" (byte-|
|00000960| 63 6f 64 65 20 22 c4 18 | c5 c6 09 0a c3 24 88 c7 |code "..|.....$..|
|00000970| 08 21 29 87 22 20 5b 6c | 69 6e 65 73 20 73 74 61 |.!)." [l|ines sta|
|00000980| 72 74 20 65 6e 64 20 74 | 20 6e 69 6c 20 6f 70 65 |rt end t| nil ope|
|00000990| 72 61 74 65 2d 6f 6e 2d | 72 65 63 74 61 6e 67 6c |rate-on-|rectangl|
|000009a0| 65 20 64 65 6c 65 74 65 | 2d 65 78 74 72 61 63 74 |e delete|-extract|
|000009b0| 2d 72 65 63 74 61 6e 67 | 6c 65 2d 6c 69 6e 65 20 |-rectang|le-line |
|000009c0| 6e 72 65 76 65 72 73 65 | 5d 20 35 29 29 0a 0a 28 |nreverse|] 5))..(|
|000009d0| 64 65 66 75 6e 20 65 78 | 74 72 61 63 74 2d 72 65 |defun ex|tract-re|
|000009e0| 63 74 61 6e 67 6c 65 20 | 28 73 74 61 72 74 20 65 |ctangle |(start e|
|000009f0| 6e 64 29 20 22 5c 0a 52 | 65 74 75 72 6e 20 63 6f |nd) "\.R|eturn co|
|00000a00| 6e 74 65 6e 74 73 20 6f | 66 20 72 65 63 74 61 6e |ntents o|f rectan|
|00000a10| 67 6c 65 20 77 69 74 68 | 20 63 6f 72 6e 65 72 73 |gle with| corners|
|00000a20| 20 61 74 20 53 54 41 52 | 54 20 61 6e 64 20 45 4e | at STAR|T and EN|
|00000a30| 44 2e 0a 56 61 6c 75 65 | 20 69 73 20 6c 69 73 74 |D..Value| is list|
|00000a40| 20 6f 66 20 73 74 72 69 | 6e 67 73 2c 20 6f 6e 65 | of stri|ngs, one|
|00000a50| 20 66 6f 72 20 65 61 63 | 68 20 6c 69 6e 65 20 6f | for eac|h line o|
|00000a60| 66 20 74 68 65 20 72 65 | 63 74 61 6e 67 6c 65 2e |f the re|ctangle.|
|00000a70| 22 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c3 18 |" (byte-|code "..|
|00000a80| c4 c5 09 0a c3 24 88 c6 | 08 21 29 87 22 20 5b 6c |.....$..|.!)." [l|
|00000a90| 69 6e 65 73 20 73 74 61 | 72 74 20 65 6e 64 20 6e |ines sta|rt end n|
|00000aa0| 69 6c 20 6f 70 65 72 61 | 74 65 2d 6f 6e 2d 72 65 |il opera|te-on-re|
|00000ab0| 63 74 61 6e 67 6c 65 20 | 65 78 74 72 61 63 74 2d |ctangle |extract-|
|00000ac0| 72 65 63 74 61 6e 67 6c | 65 2d 6c 69 6e 65 20 6e |rectangl|e-line n|
|00000ad0| 72 65 76 65 72 73 65 5d | 20 35 29 29 0a 0a 28 64 |reverse]| 5))..(d|
|00000ae0| 65 66 76 61 72 20 6b 69 | 6c 6c 65 64 2d 72 65 63 |efvar ki|lled-rec|
|00000af0| 74 61 6e 67 6c 65 20 6e | 69 6c 20 22 5c 0a 52 65 |tangle n|il "\.Re|
|00000b00| 63 74 61 6e 67 6c 65 20 | 66 6f 72 20 79 61 6e 6b |ctangle |for yank|
|00000b10| 2d 72 65 63 74 61 6e 67 | 6c 65 20 74 6f 20 69 6e |-rectang|le to in|
|00000b20| 73 65 72 74 2e 22 29 0a | 0a 28 64 65 66 75 6e 20 |sert.").|.(defun |
|00000b30| 6b 69 6c 6c 2d 72 65 63 | 74 61 6e 67 6c 65 20 28 |kill-rec|tangle (|
|00000b40| 73 74 61 72 74 20 65 6e | 64 29 20 22 5c 0a 44 65 |start en|d) "\.De|
|00000b50| 6c 65 74 65 20 72 65 63 | 74 61 6e 67 6c 65 20 77 |lete rec|tangle w|
|00000b60| 69 74 68 20 63 6f 72 6e | 65 72 73 20 61 74 20 70 |ith corn|ers at p|
|00000b70| 6f 69 6e 74 20 61 6e 64 | 20 6d 61 72 6b 3b 20 73 |oint and| mark; s|
|00000b80| 61 76 65 20 61 73 20 6c | 61 73 74 20 6b 69 6c 6c |ave as l|ast kill|
|00000b90| 65 64 20 6f 6e 65 2e 0a | 43 61 6c 6c 69 6e 67 20 |ed one..|Calling |
|00000ba0| 66 72 6f 6d 20 70 72 6f | 67 72 61 6d 2c 20 73 75 |from pro|gram, su|
|00000bb0| 70 70 6c 79 20 74 77 6f | 20 61 72 67 73 20 53 54 |pply two| args ST|
|00000bc0| 41 52 54 20 61 6e 64 20 | 45 4e 44 2c 20 62 75 66 |ART and |END, buf|
|00000bd0| 66 65 72 20 70 6f 73 69 | 74 69 6f 6e 73 2e 0a 42 |fer posi|tions..B|
|00000be0| 75 74 20 69 6e 20 70 72 | 6f 67 72 61 6d 73 20 79 |ut in pr|ograms y|
|00000bf0| 6f 75 20 6d 69 67 68 74 | 20 70 72 65 66 65 72 20 |ou might| prefer |
|00000c00| 74 6f 20 75 73 65 20 64 | 65 6c 65 74 65 2d 65 78 |to use d|elete-ex|
|00000c10| 74 72 61 63 74 2d 72 65 | 63 74 61 6e 67 6c 65 2e |tract-re|ctangle.|
|00000c20| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 20 22 |" (inter|active "|
|00000c30| 72 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |r") (byt|e-code "|
|00000c40| c3 88 c4 09 0a 5c 22 89 | 10 87 22 20 5b 6b 69 6c |.....\".|.." [kil|
|00000c50| 6c 65 64 2d 72 65 63 74 | 61 6e 67 6c 65 20 73 74 |led-rect|angle st|
|00000c60| 61 72 74 20 65 6e 64 20 | 6e 69 6c 20 64 65 6c 65 |art end |nil dele|
|00000c70| 74 65 2d 65 78 74 72 61 | 63 74 2d 72 65 63 74 61 |te-extra|ct-recta|
|00000c80| 6e 67 6c 65 5d 20 33 29 | 29 0a 0a 28 64 65 66 75 |ngle] 3)|)..(defu|
|00000c90| 6e 20 79 61 6e 6b 2d 72 | 65 63 74 61 6e 67 6c 65 |n yank-r|ectangle|
|00000ca0| 20 6e 69 6c 20 22 5c 0a | 59 61 6e 6b 20 74 68 65 | nil "\.|Yank the|
|00000cb0| 20 6c 61 73 74 20 6b 69 | 6c 6c 65 64 20 72 65 63 | last ki|lled rec|
|00000cc0| 74 61 6e 67 6c 65 20 77 | 69 74 68 20 75 70 70 65 |tangle w|ith uppe|
|00000cd0| 72 20 6c 65 66 74 20 63 | 6f 72 6e 65 72 20 61 74 |r left c|orner at|
|00000ce0| 20 70 6f 69 6e 74 2e 22 | 20 28 69 6e 74 65 72 61 | point."| (intera|
|00000cf0| 63 74 69 76 65 29 20 28 | 62 79 74 65 2d 63 6f 64 |ctive) (|byte-cod|
|00000d00| 65 20 22 c1 88 c2 08 21 | 87 22 20 5b 6b 69 6c 6c |e "....!|." [kill|
|00000d10| 65 64 2d 72 65 63 74 61 | 6e 67 6c 65 20 6e 69 6c |ed-recta|ngle nil|
|00000d20| 20 69 6e 73 65 72 74 2d | 72 65 63 74 61 6e 67 6c | insert-|rectangl|
|00000d30| 65 5d 20 32 29 29 0a 0a | 28 64 65 66 75 6e 20 69 |e] 2))..|(defun i|
|00000d40| 6e 73 65 72 74 2d 72 65 | 63 74 61 6e 67 6c 65 20 |nsert-re|ctangle |
|00000d50| 28 72 65 63 74 61 6e 67 | 6c 65 29 20 22 5c 0a 49 |(rectang|le) "\.I|
|00000d60| 6e 73 65 72 74 20 74 65 | 78 74 20 6f 66 20 52 45 |nsert te|xt of RE|
|00000d70| 43 54 41 4e 47 4c 45 20 | 77 69 74 68 20 75 70 70 |CTANGLE |with upp|
|00000d80| 65 72 20 6c 65 66 74 20 | 63 6f 72 6e 65 72 20 61 |er left |corner a|
|00000d90| 74 20 70 6f 69 6e 74 2e | 0a 52 45 43 54 41 4e 47 |t point.|.RECTANG|
|00000da0| 4c 45 27 73 20 66 69 72 | 73 74 20 6c 69 6e 65 20 |LE's fir|st line |
|00000db0| 69 73 20 69 6e 73 65 72 | 74 65 64 20 61 74 20 70 |is inser|ted at p|
|00000dc0| 6f 69 6e 74 2c 0a 69 74 | 73 20 73 65 63 6f 6e 64 |oint,.it|s second|
|00000dd0| 20 6c 69 6e 65 20 69 73 | 20 69 6e 73 65 72 74 65 | line is| inserte|
|00000de0| 64 20 61 74 20 61 20 70 | 6f 69 6e 74 20 76 65 72 |d at a p|oint ver|
|00000df0| 74 69 63 61 6c 6c 79 20 | 75 6e 64 65 72 20 70 6f |tically |under po|
|00000e00| 69 6e 74 2c 20 65 74 63 | 2e 0a 52 45 43 54 41 4e |int, etc|..RECTAN|
|00000e10| 47 4c 45 20 73 68 6f 75 | 6c 64 20 62 65 20 61 20 |GLE shou|ld be a |
|00000e20| 6c 69 73 74 20 6f 66 20 | 73 74 72 69 6e 67 73 2e |list of |strings.|
|00000e30| 22 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 09 69 |" (byte-|code ".i|
|00000e40| c4 1b 1a 18 08 85 40 00 | 0b 86 2f 00 c6 c7 21 88 |......@.|../...!.|
|00000e50| 6e 86 18 00 c8 63 88 c9 | 0a 21 88 69 0a 56 85 26 |n....c..|.!.i.V.&|
|00000e60| 00 ca 0a 21 88 69 0a 57 | 85 2f 00 0a 6a 88 c5 89 |...!.i.W|./..j...|
|00000e70| 13 88 08 40 63 88 08 41 | 89 10 88 82 06 00 2b 87 |...@c..A|......+.|
|00000e80| 22 20 5b 6c 69 6e 65 73 | 20 72 65 63 74 61 6e 67 |" [lines| rectang|
|00000e90| 6c 65 20 69 6e 73 65 72 | 74 63 6f 6c 75 6d 6e 20 |le inser|tcolumn |
|00000ea0| 66 69 72 73 74 20 74 20 | 6e 69 6c 20 66 6f 72 77 |first t |nil forw|
|00000eb0| 61 72 64 2d 6c 69 6e 65 | 20 31 20 31 30 20 6d 6f |ard-line| 1 10 mo|
|00000ec0| 76 65 2d 74 6f 2d 63 6f | 6c 75 6d 6e 20 72 65 63 |ve-to-co|lumn rec|
|00000ed0| 74 61 6e 67 6c 65 2d 63 | 6f 65 72 63 65 2d 74 61 |tangle-c|oerce-ta|
|00000ee0| 62 5d 20 36 29 29 0a 0a | 28 64 65 66 75 6e 20 6f |b] 6))..|(defun o|
|00000ef0| 70 65 6e 2d 72 65 63 74 | 61 6e 67 6c 65 20 28 73 |pen-rect|angle (s|
|00000f00| 74 61 72 74 20 65 6e 64 | 29 20 22 5c 0a 42 6c 61 |tart end|) "\.Bla|
|00000f10| 6e 6b 20 6f 75 74 20 72 | 65 63 74 61 6e 67 6c 65 |nk out r|ectangle|
|00000f20| 20 77 69 74 68 20 63 6f | 72 6e 65 72 73 20 61 74 | with co|rners at|
|00000f30| 20 70 6f 69 6e 74 20 61 | 6e 64 20 6d 61 72 6b 2c | point a|nd mark,|
|00000f40| 20 73 68 69 66 74 69 6e | 67 20 74 65 78 74 20 72 | shiftin|g text r|
|00000f50| 69 67 68 74 2e 0a 54 68 | 65 20 74 65 78 74 20 70 |ight..Th|e text p|
|00000f60| 72 65 76 69 6f 75 73 6c | 79 20 69 6e 20 74 68 65 |reviousl|y in the|
|00000f70| 20 72 65 67 69 6f 6e 20 | 69 73 20 6e 6f 74 20 6f | region |is not o|
|00000f80| 76 65 72 77 72 69 74 74 | 65 6e 20 62 79 20 74 68 |verwritt|en by th|
|00000f90| 65 20 62 6c 61 6e 6b 73 | 2c 0a 62 75 74 20 69 6e |e blanks|,.but in|
|00000fa0| 73 74 65 64 20 77 69 6e | 64 73 20 75 70 20 74 6f |sted win|ds up to|
|00000fb0| 20 74 68 65 20 72 69 67 | 68 74 20 6f 66 20 74 68 | the rig|ht of th|
|00000fc0| 65 20 72 65 63 74 61 6e | 67 6c 65 2e 22 20 28 69 |e rectan|gle." (i|
|00000fd0| 6e 74 65 72 61 63 74 69 | 76 65 20 22 72 22 29 20 |nteracti|ve "r") |
|00000fe0| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c2 88 c3 c4 |(byte-co|de "....|
|00000ff0| 08 09 c2 24 87 22 20 5b | 73 74 61 72 74 20 65 6e |...$." [|start en|
|00001000| 64 20 6e 69 6c 20 6f 70 | 65 72 61 74 65 2d 6f 6e |d nil op|erate-on|
|00001010| 2d 72 65 63 74 61 6e 67 | 6c 65 20 6f 70 65 6e 2d |-rectang|le open-|
|00001020| 72 65 63 74 61 6e 67 6c | 65 2d 6c 69 6e 65 5d 20 |rectangl|e-line] |
|00001030| 35 29 29 0a 0a 28 64 65 | 66 75 6e 20 6f 70 65 6e |5))..(de|fun open|
|00001040| 2d 72 65 63 74 61 6e 67 | 6c 65 2d 6c 69 6e 65 20 |-rectang|le-line |
|00001050| 28 73 74 61 72 74 70 6f | 73 20 62 65 67 65 78 74 |(startpo|s begext|
|00001060| 72 61 20 65 6e 64 65 78 | 74 72 61 29 20 28 62 79 |ra endex|tra) (by|
|00001070| 74 65 2d 63 6f 64 65 20 | 22 c5 69 09 0a 23 18 0b |te-code |".i..#..|
|00001080| 62 88 69 1c c6 c7 21 88 | 08 69 0c 5a 5c 5c 89 10 |b.i...!.|.i.Z\\..|
|00001090| 29 88 c8 60 c9 c7 21 88 | 60 5c 22 88 08 6a 29 87 |)..`..!.|`\"..j).|
|000010a0| 22 20 5b 63 6f 6c 75 6d | 6e 20 62 65 67 65 78 74 |" [colum|n begext|
|000010b0| 72 61 20 65 6e 64 65 78 | 74 72 61 20 73 74 61 72 |ra endex|tra star|
|000010c0| 74 70 6f 73 20 6f 63 6f | 6c 20 2b 20 73 6b 69 70 |tpos oco|l + skip|
|000010d0| 2d 63 68 61 72 73 2d 66 | 6f 72 77 61 72 64 20 22 |-chars-f|orward "|
|000010e0| 20 09 22 20 64 65 6c 65 | 74 65 2d 72 65 67 69 6f | ." dele|te-regio|
|000010f0| 6e 20 73 6b 69 70 2d 63 | 68 61 72 73 2d 62 61 63 |n skip-c|hars-bac|
|00001100| 6b 77 61 72 64 5d 20 36 | 29 29 0a 0a 28 64 65 66 |kward] 6|))..(def|
|00001110| 75 6e 20 63 6c 65 61 72 | 2d 72 65 63 74 61 6e 67 |un clear|-rectang|
|00001120| 6c 65 20 28 73 74 61 72 | 74 20 65 6e 64 20 26 6f |le (star|t end &o|
|00001130| 70 74 69 6f 6e 61 6c 20 | 70 72 65 73 65 72 76 65 |ptional |preserve|
|00001140| 2d 70 6f 73 69 74 69 6f | 6e 29 20 22 5c 0a 42 6c |-positio|n) "\.Bl|
|00001150| 61 6e 6b 20 6f 75 74 20 | 72 65 63 74 61 6e 67 6c |ank out |rectangl|
|00001160| 65 20 77 69 74 68 20 63 | 6f 72 6e 65 72 73 20 61 |e with c|orners a|
|00001170| 74 20 70 6f 69 6e 74 20 | 61 6e 64 20 6d 61 72 6b |t point |and mark|
|00001180| 2e 0a 54 68 65 20 74 65 | 78 74 20 70 72 65 76 69 |..The te|xt previ|
|00001190| 6f 75 73 6c 79 20 69 6e | 20 74 68 65 20 72 65 67 |ously in| the reg|
|000011a0| 69 6f 6e 20 69 73 20 6f | 76 65 72 77 72 69 74 74 |ion is o|verwritt|
|000011b0| 65 6e 20 62 79 20 74 68 | 65 20 62 6c 61 6e 6b 73 |en by th|e blanks|
|000011c0| 2e 22 20 28 69 6e 74 65 | 72 61 63 74 69 76 65 20 |." (inte|ractive |
|000011d0| 22 72 22 29 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |"r") (by|te-code |
|000011e0| 22 c3 88 c4 c5 08 09 c2 | 24 87 22 20 5b 73 74 61 |".......|$." [sta|
|000011f0| 72 74 20 65 6e 64 20 74 | 20 6e 69 6c 20 6f 70 65 |rt end t| nil ope|
|00001200| 72 61 74 65 2d 6f 6e 2d | 72 65 63 74 61 6e 67 6c |rate-on-|rectangl|
|00001210| 65 20 63 6c 65 61 72 2d | 72 65 63 74 61 6e 67 6c |e clear-|rectangl|
|00001220| 65 2d 6c 69 6e 65 5d 20 | 35 29 29 0a 0a 28 64 65 |e-line] |5))..(de|
|00001230| 66 75 6e 20 63 6c 65 61 | 72 2d 72 65 63 74 61 6e |fun clea|r-rectan|
|00001240| 67 6c 65 2d 6c 69 6e 65 | 20 28 73 74 61 72 74 70 |gle-line| (startp|
|00001250| 6f 73 20 62 65 67 65 78 | 74 72 61 20 65 6e 64 65 |os begex|tra ende|
|00001260| 78 74 72 61 29 20 28 62 | 79 74 65 2d 63 6f 64 65 |xtra) (b|yte-code|
|00001270| 20 22 c4 c5 21 88 69 09 | 5c 5c 18 c6 60 0a 62 88 | "..!.i.|\\..`.b.|
|00001280| 0b 86 14 00 c7 c5 21 88 | 60 5c 22 88 08 6a 29 87 |......!.|`\"..j).|
|00001290| 22 20 5b 63 6f 6c 75 6d | 6e 20 65 6e 64 65 78 74 |" [colum|n endext|
|000012a0| 72 61 20 73 74 61 72 74 | 70 6f 73 20 70 72 65 73 |ra start|pos pres|
|000012b0| 65 72 76 65 2d 70 6f 73 | 69 74 69 6f 6e 20 73 6b |erve-pos|ition sk|
|000012c0| 69 70 2d 63 68 61 72 73 | 2d 66 6f 72 77 61 72 64 |ip-chars|-forward|
|000012d0| 20 22 20 09 22 20 64 65 | 6c 65 74 65 2d 72 65 67 | " ." de|lete-reg|
|000012e0| 69 6f 6e 20 73 6b 69 70 | 2d 63 68 61 72 73 2d 62 |ion skip|-chars-b|
|000012f0| 61 63 6b 77 61 72 64 5d | 20 35 29 29 0a 0a 28 64 |ackward]| 5))..(d|
|00001300| 65 66 75 6e 20 72 65 63 | 74 61 6e 67 6c 65 2d 63 |efun rec|tangle-c|
|00001310| 6f 65 72 63 65 2d 74 61 | 62 20 28 63 6f 6c 75 6d |oerce-ta|b (colum|
|00001320| 6e 29 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 69 |n) (byte|-code "i|
|00001330| c2 19 18 c4 c5 21 88 08 | 6a 88 c6 08 0b 5a 21 2a |.....!..|j....Z!*|
|00001340| 87 22 20 5b 61 66 74 65 | 72 63 6f 6c 20 69 6e 64 |." [afte|rcol ind|
|00001350| 65 6e 74 2d 74 61 62 73 | 2d 6d 6f 64 65 20 6e 69 |ent-tabs|-mode ni|
|00001360| 6c 20 63 6f 6c 75 6d 6e | 20 64 65 6c 65 74 65 2d |l column| delete-|
|00001370| 63 68 61 72 20 2d 31 20 | 62 61 63 6b 77 61 72 64 |char -1 |backward|
|00001380| 2d 63 68 61 72 5d 20 34 | 29 29 0a |-char] 4|)). |
+--------+-------------------------+-------------------------+--------+--------+