home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / lucid / lemacs-19.6 / lisp / prim / rect.elc < prev    next >
Emacs Compiled Lisp  |  1993-04-01  |  4.9 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was processed as: Emacs Compiled Lisp (other/emacsCompiledLisp).
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) magic Unsupported
1% dexvert Combustion 2 Particle Library (other/combustion2ParticleLibrary) ext Unsupported
100% file Emacs/XEmacs v19 byte-compiled Lisp data default
99% file data default
100% TrID Emacs/XEmacs byte-compiled Lisp (generic) default
100% xdgMime text/x-emacs-lisp default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 45 4c 43 13 00 00 00 | 0a 3b 3b 3b 20 63 6f 6d |;ELC....|.;;; com|
|00000010| 70 69 6c 65 64 20 62 79 | 20 6a 77 7a 40 74 68 61 |piled by| jwz@tha|
|00000020| 6c 69 64 6f 6d 69 64 65 | 20 6f 6e 20 4d 6f 6e 20 |lidomide| on Mon |
|00000030| 46 65 62 20 20 31 20 31 | 39 3a 32 35 3a 33 34 20 |Feb 1 1|9:25:34 |
|00000040| 31 39 39 33 0a 3b 3b 3b | 20 66 72 6f 6d 20 66 69 |1993.;;;| from fi|
|00000050| 6c 65 20 2f 63 61 64 69 | 6c 6c 61 63 31 2f 63 6f |le /cadi|llac1/co|
|00000060| 64 65 2f 62 75 69 6c 64 | 2f 6c 65 6d 61 63 73 2f |de/build|/lemacs/|
|00000070| 6c 69 73 70 2f 70 72 69 | 6d 2f 72 65 63 74 2e 65 |lisp/pri|m/rect.e|
|00000080| 6c 0a 3b 3b 3b 20 65 6d | 61 63 73 20 76 65 72 73 |l.;;; em|acs vers|
|00000090| 69 6f 6e 20 31 39 2e 34 | 2e 31 33 20 4c 75 63 69 |ion 19.4|.13 Luci|
|000000a0| 64 2e 0a 3b 3b 3b 20 62 | 79 74 65 63 6f 6d 70 20 |d..;;; b|ytecomp |
|000000b0| 76 65 72 73 69 6f 6e 20 | 32 2e 31 30 3b 20 20 31 |version |2.10; 1|
|000000c0| 2d 66 65 62 2d 39 33 2e | 0a 3b 3b 3b 20 6f 70 74 |-feb-93.|.;;; opt|
|000000d0| 69 6d 69 7a 61 74 69 6f | 6e 20 69 73 20 6f 6e 2e |imizatio|n is on.|
|000000e0| 0a 3b 3b 3b 20 74 68 69 | 73 20 66 69 6c 65 20 75 |.;;; thi|s file u|
|000000f0| 73 65 73 20 6f 70 63 6f | 64 65 73 20 77 68 69 63 |ses opco|des whic|
|00000100| 68 20 64 6f 20 6e 6f 74 | 20 65 78 69 73 74 20 69 |h do not| exist i|
|00000110| 6e 20 45 6d 61 63 73 31 | 38 2e 0a 0a 28 69 66 20 |n Emacs1|8...(if |
|00000120| 28 61 6e 64 20 28 62 6f | 75 6e 64 70 20 27 65 6d |(and (bo|undp 'em|
|00000130| 61 63 73 2d 76 65 72 73 | 69 6f 6e 29 0a 09 20 28 |acs-vers|ion).. (|
|00000140| 6f 72 20 28 61 6e 64 20 | 28 62 6f 75 6e 64 70 20 |or (and |(boundp |
|00000150| 27 65 70 6f 63 68 3a 3a | 76 65 72 73 69 6f 6e 29 |'epoch::|version)|
|00000160| 20 65 70 6f 63 68 3a 3a | 76 65 72 73 69 6f 6e 29 | epoch::|version)|
|00000170| 0a 09 20 20 20 20 20 28 | 73 74 72 69 6e 67 2d 6c |.. (|string-l|
|00000180| 65 73 73 70 20 65 6d 61 | 63 73 2d 76 65 72 73 69 |essp ema|cs-versi|
|00000190| 6f 6e 20 22 31 39 22 29 | 29 29 0a 20 20 20 20 28 |on "19")|)). (|
|000001a0| 65 72 72 6f 72 20 22 54 | 68 69 73 20 66 69 6c 65 |error "T|his file|
|000001b0| 20 77 61 73 20 63 6f 6d | 70 69 6c 65 64 20 66 6f | was com|piled fo|
|000001c0| 72 20 45 6d 61 63 73 31 | 39 2e 22 29 29 0a 0a 28 |r Emacs1|9."))..(|
|000001d0| 66 73 65 74 20 27 6f 70 | 65 72 61 74 65 2d 6f 6e |fset 'op|erate-on|
|000001e0| 2d 72 65 63 74 61 6e 67 | 6c 65 20 23 5b 28 66 75 |-rectang|le #[(fu|
|000001f0| 6e 63 74 69 6f 6e 20 73 | 74 61 72 74 20 65 6e 64 |nction s|tart end|
|00000200| 20 63 6f 65 72 63 65 2d | 74 61 62 73 29 20 22 c0 | coerce-|tabs) ".|
|00000210| 89 89 89 19 1a 1b 1c 8a | 0d 62 88 69 14 c6 79 88 |........|.b.i..y.|
|00000220| 60 13 29 8a 0e 07 62 88 | 69 12 c8 79 88 c9 20 11 |`.)...b.|i..y.. .|
|00000230| 29 5c 6e 0c 57 ab 89 0c | 1e 5c 6e 5c 6e 14 0e 5c |)\n.W...|.\n\n..\|
|00000240| 6e 12 29 5c 6e 0c 55 ac | e7 8a 0b 62 88 60 09 57 |n.)\n.U.|...b.`.W|
|00000250| ab dd c0 89 89 1e 0b 1e | 0c 1e 0d ce 0c 21 88 0e |........|.....!..|
|00000260| 0f ab 89 69 0c 56 ab 84 | d0 0c 21 88 69 0c 5a 16 |...i.V..|..!.i.Z.|
|00000270| 0c 60 16 0d ce 5c 6e 21 | 88 69 5c 6e 56 ab 8d 0e |.`...\n!|.i\nV...|
|00000280| 0f ab 86 d0 5c 6e 21 88 | aa 83 d1 75 88 5c 6e 69 |....\n!.|...u.\ni|
|00000290| 5a 16 0b 0e 0c c6 57 ab | 8a 0e 0b 0e 0c 5c 5c 16 |Z.....W.|.....\\.|
|000002a0| 0b c6 16 0c 0e 12 0e 0d | 0e 0c 0e 0b 23 88 2b c8 |........|....#.+.|
|000002b0| 79 88 aa 1e 29 5c 6e 0c | 5a 2c 87 22 20 5b 6e 69 |y...)\n.|Z,." [ni|
|000002c0| 6c 20 65 6e 64 6c 69 6e | 65 70 6f 73 20 65 6e 64 |l endlin|epos end|
|000002d0| 63 6f 6c 20 73 74 61 72 | 74 6c 69 6e 65 70 6f 73 |col star|tlinepos|
|000002e0| 20 73 74 61 72 74 63 6f | 6c 20 73 74 61 72 74 20 | startco|l start |
|000002f0| 30 20 65 6e 64 20 31 20 | 70 6f 69 6e 74 2d 6d 61 |0 end 1 |point-ma|
|00000300| 72 6b 65 72 20 74 65 6d | 20 65 6e 64 65 78 74 72 |rker tem| endextr|
|00000310| 61 20 62 65 67 65 78 74 | 72 61 20 73 74 61 72 74 |a begext|ra start|
|00000320| 70 6f 73 20 6d 6f 76 65 | 2d 74 6f 2d 63 6f 6c 75 |pos move|-to-colu|
|00000330| 6d 6e 20 63 6f 65 72 63 | 65 2d 74 61 62 73 20 72 |mn coerc|e-tabs r|
|00000340| 65 63 74 61 6e 67 6c 65 | 2d 63 6f 65 72 63 65 2d |ectangle|-coerce-|
|00000350| 74 61 62 20 2d 31 20 66 | 75 6e 63 74 69 6f 6e 5d |tab -1 f|unction]|
|00000360| 20 34 20 22 5c 0a 43 61 | 6c 6c 20 46 55 4e 43 54 | 4 "\.Ca|ll FUNCT|
|00000370| 49 4f 4e 20 66 6f 72 20 | 65 61 63 68 20 6c 69 6e |ION for |each lin|
|00000380| 65 20 6f 66 20 72 65 63 | 74 61 6e 67 6c 65 20 77 |e of rec|tangle w|
|00000390| 69 74 68 20 63 6f 72 6e | 65 72 73 20 61 74 20 53 |ith corn|ers at S|
|000003a0| 54 41 52 54 2c 20 45 4e | 44 2e 0a 49 66 20 43 4f |TART, EN|D..If CO|
|000003b0| 45 52 43 45 2d 54 41 42 | 53 20 69 73 20 6e 6f 6e |ERCE-TAB|S is non|
|000003c0| 2d 6e 69 6c 2c 20 63 6f | 6e 76 65 72 74 20 6d 75 |-nil, co|nvert mu|
|000003d0| 6c 74 69 2d 63 6f 6c 75 | 6d 6e 20 63 68 61 72 61 |lti-colu|mn chara|
|000003e0| 63 74 65 72 73 0a 74 68 | 61 74 20 73 70 61 6e 20 |cters.th|at span |
|000003f0| 74 68 65 20 73 74 61 72 | 74 69 6e 67 20 6f 72 20 |the star|ting or |
|00000400| 65 6e 64 69 6e 67 20 63 | 6f 6c 75 6d 6e 73 20 6f |ending c|olumns o|
|00000410| 6e 20 61 6e 79 20 6c 69 | 6e 65 0a 74 6f 20 6d 75 |n any li|ne.to mu|
|00000420| 6c 74 69 70 6c 65 20 73 | 70 61 63 65 73 20 62 65 |ltiple s|paces be|
|00000430| 66 6f 72 65 20 63 61 6c | 6c 69 6e 67 20 46 55 4e |fore cal|ling FUN|
|00000440| 43 54 49 4f 4e 2e 0a 46 | 55 4e 43 54 49 4f 4e 20 |CTION..F|UNCTION |
|00000450| 69 73 20 63 61 6c 6c 65 | 64 20 77 69 74 68 20 74 |is calle|d with t|
|00000460| 68 72 65 65 20 61 72 67 | 75 6d 65 6e 74 73 3a 0a |hree arg|uments:.|
|00000470| 20 70 6f 73 69 74 69 6f | 6e 20 6f 66 20 73 74 61 | positio|n of sta|
|00000480| 72 74 20 6f 66 20 73 65 | 67 6d 65 6e 74 20 6f 66 |rt of se|gment of|
|00000490| 20 74 68 69 73 20 6c 69 | 6e 65 20 77 69 74 68 69 | this li|ne withi|
|000004a0| 6e 20 74 68 65 20 72 65 | 63 74 61 6e 67 6c 65 2c |n the re|ctangle,|
|000004b0| 0a 20 6e 75 6d 62 65 72 | 20 6f 66 20 63 6f 6c 75 |. number| of colu|
|000004c0| 6d 6e 73 20 74 68 61 74 | 20 62 65 6c 6f 6e 67 20 |mns that| belong |
|000004d0| 74 6f 20 72 65 63 74 61 | 6e 67 6c 65 20 62 75 74 |to recta|ngle but|
|000004e0| 20 61 72 65 20 62 65 66 | 6f 72 65 20 74 68 61 74 | are bef|ore that|
|000004f0| 20 70 6f 73 69 74 69 6f | 6e 2c 0a 20 6e 75 6d 62 | positio|n,. numb|
|00000500| 65 72 20 6f 66 20 63 6f | 6c 75 6d 6e 73 20 74 68 |er of co|lumns th|
|00000510| 61 74 20 62 65 6c 6f 6e | 67 20 74 6f 20 72 65 63 |at belon|g to rec|
|00000520| 74 61 6e 67 6c 65 20 62 | 75 74 20 61 72 65 20 61 |tangle b|ut are a|
|00000530| 66 74 65 72 20 70 6f 69 | 6e 74 2e 0a 50 6f 69 6e |fter poi|nt..Poin|
|00000540| 74 20 69 73 20 61 74 20 | 74 68 65 20 65 6e 64 20 |t is at |the end |
|00000550| 6f 66 20 74 68 65 20 73 | 65 67 6d 65 6e 74 20 6f |of the s|egment o|
|00000560| 66 20 74 68 69 73 20 6c | 69 6e 65 20 77 69 74 68 |f this l|ine with|
|00000570| 69 6e 20 74 68 65 20 72 | 65 63 74 61 6e 67 6c 65 |in the r|ectangle|
|00000580| 2e 22 5d 29 0a 28 62 79 | 74 65 2d 63 6f 64 65 20 |."]).(by|te-code |
|00000590| 22 c0 c1 4d 88 c2 c3 4d | 88 c4 c5 4d 88 c6 16 07 |"..M...M|...M....|
|000005a0| c8 c9 4d 87 22 20 5b 64 | 65 6c 65 74 65 2d 72 65 |..M." [d|elete-re|
|000005b0| 63 74 61 6e 67 6c 65 2d | 6c 69 6e 65 20 23 5b 28 |ctangle-|line #[(|
|000005c0| 73 74 61 72 74 64 65 6c | 70 6f 73 20 69 67 6e 6f |startdel|pos igno|
|000005d0| 72 65 20 69 67 6e 6f 72 | 65 29 20 22 08 60 7c 87 |re ignor|e) ".`|.|
|000005e0| 22 20 5b 73 74 61 72 74 | 64 65 6c 70 6f 73 5d 20 |" [start|delpos] |
|000005f0| 32 5d 20 64 65 6c 65 74 | 65 2d 65 78 74 72 61 63 |2] delet|e-extrac|
|00000600| 74 2d 72 65 63 74 61 6e | 67 6c 65 2d 6c 69 6e 65 |t-rectan|gle-line|
|00000610| 20 23 5b 28 73 74 61 72 | 74 64 65 6c 70 6f 73 20 | #[(star|tdelpos |
|00000620| 62 65 67 65 78 74 72 61 | 20 65 6e 64 65 78 74 72 |begextra| endextr|
|00000630| 61 29 20 22 8a c0 09 5c | 6e 0b 23 88 29 09 60 7c |a) "...\|n.#.).`||
|00000640| 87 22 20 5b 65 78 74 72 | 61 63 74 2d 72 65 63 74 |." [extr|act-rect|
|00000650| 61 6e 67 6c 65 2d 6c 69 | 6e 65 20 73 74 61 72 74 |angle-li|ne start|
|00000660| 64 65 6c 70 6f 73 20 62 | 65 67 65 78 74 72 61 20 |delpos b|egextra |
|00000670| 65 6e 64 65 78 74 72 61 | 5d 20 34 5d 20 65 78 74 |endextra|] 4] ext|
|00000680| 72 61 63 74 2d 72 65 63 | 74 61 6e 67 6c 65 2d 6c |ract-rec|tangle-l|
|00000690| 69 6e 65 20 23 5b 28 73 | 74 61 72 74 64 65 6c 70 |ine #[(s|tartdelp|
|000006a0| 6f 73 20 62 65 67 65 78 | 74 72 61 20 65 6e 64 65 |os begex|tra ende|
|000006b0| 78 74 72 61 29 20 22 08 | 60 7b 60 19 1a 08 62 88 |xtra) ".|`{`...b.|
|000006c0| c3 c4 09 c5 23 ab a4 69 | 8a c6 75 88 69 29 5a 1e |....#..i|..u.i)Z.|
|000006d0| 07 5c 6e c8 60 09 5a c9 | 5a 4f ca 0e 07 21 5c 6e |.\n.`.Z.|ZO...!\n|
|000006e0| 89 47 60 09 5a 5c 5c cb | 4f 51 12 29 aa 55 0e 0c |.G`.Z\\.|OQ.).U..|
|000006f0| c8 56 ac 86 0e 0d c8 56 | ab 8b ca 0e 0c 21 5c 6e |.V.....V|.....!\n|
|00000700| ca 0e 0d 21 51 12 5c 6e | 0e 0e 42 89 16 0e 2a 87 |...!Q.\n|..B...*.|
|00000710| 22 20 5b 73 74 61 72 74 | 64 65 6c 70 6f 73 20 65 |" [start|delpos e|
|00000720| 6e 64 20 6c 69 6e 65 20 | 73 65 61 72 63 68 2d 66 |nd line |search-f|
|00000730| 6f 72 77 61 72 64 20 22 | 09 22 20 74 20 2d 31 20 |orward "|." t -1 |
|00000740| 77 69 64 74 68 20 30 20 | 31 20 73 70 61 63 65 73 |width 0 |1 spaces|
|00000750| 2d 73 74 72 69 6e 67 20 | 6e 69 6c 20 62 65 67 65 |-string |nil bege|
|00000760| 78 74 72 61 20 65 6e 64 | 65 78 74 72 61 20 6c 69 |xtra end|extra li|
|00000770| 6e 65 73 5d 20 36 5d 20 | 5b 22 22 20 22 20 22 20 |nes] 6] |["" " " |
|00000780| 22 20 20 22 20 22 20 20 | 20 22 20 22 20 20 20 20 |" " " | " " |
|00000790| 22 20 22 20 20 20 20 20 | 22 20 22 20 20 20 20 20 |" " |" " |
|000007a0| 20 22 20 22 20 20 20 20 | 20 20 20 22 20 22 20 20 | " " | " " |
|000007b0| 20 20 20 20 20 20 22 5d | 20 73 70 61 63 65 73 2d | "]| spaces-|
|000007c0| 73 74 72 69 6e 67 73 20 | 73 70 61 63 65 73 2d 73 |strings |spaces-s|
|000007d0| 74 72 69 6e 67 20 23 5b | 28 6e 29 20 22 08 c1 58 |tring #[|(n) "..X|
|000007e0| ab 84 5c 6e 08 48 87 c3 | 1c 08 c1 56 ab 8b c5 0c |..\n.H..|...V....|
|000007f0| 50 14 08 c1 5a 89 10 aa | 71 0c 5c 6e 08 48 50 29 |P...Z...|q.\n.HP)|
|00000800| 87 22 20 5b 6e 20 38 20 | 73 70 61 63 65 73 2d 73 |." [n 8 |spaces-s|
|00000810| 74 72 69 6e 67 73 20 22 | 22 20 76 61 6c 20 22 20 |trings "|" val " |
|00000820| 20 20 20 20 20 20 20 22 | 5d 20 34 5d 5d 20 32 29 | "|] 4]] 2)|
|00000830| 0a 28 66 73 65 74 20 27 | 64 65 6c 65 74 65 2d 72 |.(fset '|delete-r|
|00000840| 65 63 74 61 6e 67 6c 65 | 20 23 5b 28 73 74 61 72 |ectangle| #[(star|
|00000850| 74 20 65 6e 64 29 20 22 | c0 c1 5c 6e 0b c4 24 87 |t end) "|..\n..$.|
|00000860| 22 20 5b 6f 70 65 72 61 | 74 65 2d 6f 6e 2d 72 65 |" [opera|te-on-re|
|00000870| 63 74 61 6e 67 6c 65 20 | 64 65 6c 65 74 65 2d 72 |ctangle |delete-r|
|00000880| 65 63 74 61 6e 67 6c 65 | 2d 6c 69 6e 65 20 73 74 |ectangle|-line st|
|00000890| 61 72 74 20 65 6e 64 20 | 74 5d 20 35 20 22 5c 0a |art end |t] 5 "\.|
|000008a0| 44 65 6c 65 74 65 20 28 | 64 6f 6e 27 74 20 73 61 |Delete (|don't sa|
|000008b0| 76 65 29 20 74 65 78 74 | 20 69 6e 20 72 65 63 74 |ve) text| in rect|
|000008c0| 61 6e 67 6c 65 20 77 69 | 74 68 20 70 6f 69 6e 74 |angle wi|th point|
|000008d0| 20 61 6e 64 20 6d 61 72 | 6b 20 61 73 20 63 6f 72 | and mar|k as cor|
|000008e0| 6e 65 72 73 2e 0a 54 68 | 65 20 73 61 6d 65 20 72 |ners..Th|e same r|
|000008f0| 61 6e 67 65 20 6f 66 20 | 63 6f 6c 75 6d 6e 73 20 |ange of |columns |
|00000900| 69 73 20 64 65 6c 65 74 | 65 64 20 69 6e 20 65 61 |is delet|ed in ea|
|00000910| 63 68 20 6c 69 6e 65 0a | 73 74 61 72 74 69 6e 67 |ch line.|starting|
|00000920| 20 77 69 74 68 20 74 68 | 65 20 6c 69 6e 65 20 77 | with th|e line w|
|00000930| 68 65 72 65 20 74 68 65 | 20 72 65 67 69 6f 6e 20 |here the| region |
|00000940| 62 65 67 69 6e 73 0a 61 | 6e 64 20 65 6e 64 69 6e |begins.a|nd endin|
|00000950| 67 20 77 69 74 68 20 74 | 68 65 20 6c 69 6e 65 20 |g with t|he line |
|00000960| 77 68 65 72 65 20 74 68 | 65 20 72 65 67 69 6f 6e |where th|e region|
|00000970| 20 65 6e 64 73 2e 22 20 | 22 72 22 5d 29 0a 28 66 | ends." |"r"]).(f|
|00000980| 73 65 74 20 27 64 65 6c | 65 74 65 2d 65 78 74 72 |set 'del|ete-extr|
|00000990| 61 63 74 2d 72 65 63 74 | 61 6e 67 6c 65 20 23 5b |act-rect|angle #[|
|000009a0| 28 73 74 61 72 74 20 65 | 6e 64 29 20 22 c0 19 c2 |(start e|nd) "...|
|000009b0| c3 0c 0d c6 24 88 09 9f | 29 87 22 20 5b 6e 69 6c |....$...|)." [nil|
|000009c0| 20 6c 69 6e 65 73 20 6f | 70 65 72 61 74 65 2d 6f | lines o|perate-o|
|000009d0| 6e 2d 72 65 63 74 61 6e | 67 6c 65 20 64 65 6c 65 |n-rectan|gle dele|
|000009e0| 74 65 2d 65 78 74 72 61 | 63 74 2d 72 65 63 74 61 |te-extra|ct-recta|
|000009f0| 6e 67 6c 65 2d 6c 69 6e | 65 20 73 74 61 72 74 20 |ngle-lin|e start |
|00000a00| 65 6e 64 20 74 5d 20 35 | 20 22 5c 0a 44 65 6c 65 |end t] 5| "\.Dele|
|00000a10| 74 65 20 63 6f 6e 74 65 | 6e 74 73 20 6f 66 20 72 |te conte|nts of r|
|00000a20| 65 63 74 61 6e 67 6c 65 | 20 61 6e 64 20 72 65 74 |ectangle| and ret|
|00000a30| 75 72 6e 20 69 74 20 61 | 73 20 61 20 6c 69 73 74 |urn it a|s a list|
|00000a40| 20 6f 66 20 73 74 72 69 | 6e 67 73 2e 0a 41 72 67 | of stri|ngs..Arg|
|00000a50| 75 6d 65 6e 74 73 20 53 | 54 41 52 54 20 61 6e 64 |uments S|TART and|
|00000a60| 20 45 4e 44 20 61 72 65 | 20 74 68 65 20 63 6f 72 | END are| the cor|
|00000a70| 6e 65 72 73 20 6f 66 20 | 74 68 65 20 72 65 63 74 |ners of |the rect|
|00000a80| 61 6e 67 6c 65 2e 0a 54 | 68 65 20 76 61 6c 75 65 |angle..T|he value|
|00000a90| 20 69 73 20 6c 69 73 74 | 20 6f 66 20 73 74 72 69 | is list| of stri|
|00000aa0| 6e 67 73 2c 20 6f 6e 65 | 20 66 6f 72 20 65 61 63 |ngs, one| for eac|
|00000ab0| 68 20 6c 69 6e 65 20 6f | 66 20 74 68 65 20 72 65 |h line o|f the re|
|00000ac0| 63 74 61 6e 67 6c 65 2e | 22 5d 29 0a 28 66 73 65 |ctangle.|"]).(fse|
|00000ad0| 74 20 27 65 78 74 72 61 | 63 74 2d 72 65 63 74 61 |t 'extra|ct-recta|
|00000ae0| 6e 67 6c 65 20 23 5b 28 | 73 74 61 72 74 20 65 6e |ngle #[(|start en|
|00000af0| 64 29 20 22 c0 19 c2 c3 | 0c 0d c0 24 88 09 9f 29 |d) "....|...$...)|
|00000b00| 87 22 20 5b 6e 69 6c 20 | 6c 69 6e 65 73 20 6f 70 |." [nil |lines op|
|00000b10| 65 72 61 74 65 2d 6f 6e | 2d 72 65 63 74 61 6e 67 |erate-on|-rectang|
|00000b20| 6c 65 20 65 78 74 72 61 | 63 74 2d 72 65 63 74 61 |le extra|ct-recta|
|00000b30| 6e 67 6c 65 2d 6c 69 6e | 65 20 73 74 61 72 74 20 |ngle-lin|e start |
|00000b40| 65 6e 64 5d 20 35 20 22 | 5c 0a 52 65 74 75 72 6e |end] 5 "|\.Return|
|00000b50| 20 63 6f 6e 74 65 6e 74 | 73 20 6f 66 20 72 65 63 | content|s of rec|
|00000b60| 74 61 6e 67 6c 65 20 77 | 69 74 68 20 63 6f 72 6e |tangle w|ith corn|
|00000b70| 65 72 73 20 61 74 20 53 | 54 41 52 54 20 61 6e 64 |ers at S|TART and|
|00000b80| 20 45 4e 44 2e 0a 56 61 | 6c 75 65 20 69 73 20 6c | END..Va|lue is l|
|00000b90| 69 73 74 20 6f 66 20 73 | 74 72 69 6e 67 73 2c 20 |ist of s|trings, |
|00000ba0| 6f 6e 65 20 66 6f 72 20 | 65 61 63 68 20 6c 69 6e |one for |each lin|
|00000bb0| 65 20 6f 66 20 74 68 65 | 20 72 65 63 74 61 6e 67 |e of the| rectang|
|00000bc0| 6c 65 2e 22 5d 29 0a 28 | 64 65 66 76 61 72 20 6b |le."]).(|defvar k|
|00000bd0| 69 6c 6c 65 64 2d 72 65 | 63 74 61 6e 67 6c 65 20 |illed-re|ctangle |
|00000be0| 6e 69 6c 20 22 5c 0a 52 | 65 63 74 61 6e 67 6c 65 |nil "\.R|ectangle|
|00000bf0| 20 66 6f 72 20 79 61 6e | 6b 2d 72 65 63 74 61 6e | for yan|k-rectan|
|00000c00| 67 6c 65 20 74 6f 20 69 | 6e 73 65 72 74 2e 22 29 |gle to i|nsert.")|
|00000c10| 0a 28 66 73 65 74 20 27 | 6b 69 6c 6c 2d 72 65 63 |.(fset '|kill-rec|
|00000c20| 74 61 6e 67 6c 65 20 23 | 5b 28 73 74 61 72 74 20 |tangle #|[(start |
|00000c30| 65 6e 64 29 20 22 c0 09 | 5c 6e 5c 22 89 13 87 22 |end) "..|\n\"..."|
|00000c40| 20 5b 64 65 6c 65 74 65 | 2d 65 78 74 72 61 63 74 | [delete|-extract|
|00000c50| 2d 72 65 63 74 61 6e 67 | 6c 65 20 73 74 61 72 74 |-rectang|le start|
|00000c60| 20 65 6e 64 20 6b 69 6c | 6c 65 64 2d 72 65 63 74 | end kil|led-rect|
|00000c70| 61 6e 67 6c 65 5d 20 33 | 20 22 5c 0a 44 65 6c 65 |angle] 3| "\.Dele|
|00000c80| 74 65 20 72 65 63 74 61 | 6e 67 6c 65 20 77 69 74 |te recta|ngle wit|
|00000c90| 68 20 63 6f 72 6e 65 72 | 73 20 61 74 20 70 6f 69 |h corner|s at poi|
|00000ca0| 6e 74 20 61 6e 64 20 6d | 61 72 6b 3b 20 73 61 76 |nt and m|ark; sav|
|00000cb0| 65 20 61 73 20 6c 61 73 | 74 20 6b 69 6c 6c 65 64 |e as las|t killed|
|00000cc0| 20 6f 6e 65 2e 0a 43 61 | 6c 6c 69 6e 67 20 66 72 | one..Ca|lling fr|
|00000cd0| 6f 6d 20 70 72 6f 67 72 | 61 6d 2c 20 73 75 70 70 |om progr|am, supp|
|00000ce0| 6c 79 20 74 77 6f 20 61 | 72 67 73 20 53 54 41 52 |ly two a|rgs STAR|
|00000cf0| 54 20 61 6e 64 20 45 4e | 44 2c 20 62 75 66 66 65 |T and EN|D, buffe|
|00000d00| 72 20 70 6f 73 69 74 69 | 6f 6e 73 2e 0a 42 75 74 |r positi|ons..But|
|00000d10| 20 69 6e 20 70 72 6f 67 | 72 61 6d 73 20 79 6f 75 | in prog|rams you|
|00000d20| 20 6d 69 67 68 74 20 70 | 72 65 66 65 72 20 74 6f | might p|refer to|
|00000d30| 20 75 73 65 20 64 65 6c | 65 74 65 2d 65 78 74 72 | use del|ete-extr|
|00000d40| 61 63 74 2d 72 65 63 74 | 61 6e 67 6c 65 2e 22 20 |act-rect|angle." |
|00000d50| 22 72 22 5d 29 0a 28 66 | 73 65 74 20 27 79 61 6e |"r"]).(f|set 'yan|
|00000d60| 6b 2d 72 65 63 74 61 6e | 67 6c 65 20 23 5b 6e 69 |k-rectan|gle #[ni|
|00000d70| 6c 20 22 c0 09 21 87 22 | 20 5b 69 6e 73 65 72 74 |l "..!."| [insert|
|00000d80| 2d 72 65 63 74 61 6e 67 | 6c 65 20 6b 69 6c 6c 65 |-rectang|le kille|
|00000d90| 64 2d 72 65 63 74 61 6e | 67 6c 65 5d 20 32 20 22 |d-rectan|gle] 2 "|
|00000da0| 5c 0a 59 61 6e 6b 20 74 | 68 65 20 6c 61 73 74 20 |\.Yank t|he last |
|00000db0| 6b 69 6c 6c 65 64 20 72 | 65 63 74 61 6e 67 6c 65 |killed r|ectangle|
|00000dc0| 20 77 69 74 68 20 75 70 | 70 65 72 20 6c 65 66 74 | with up|per left|
|00000dd0| 20 63 6f 72 6e 65 72 20 | 61 74 20 70 6f 69 6e 74 | corner |at point|
|00000de0| 2e 22 20 6e 69 6c 5d 29 | 0a 28 66 73 65 74 20 27 |." nil])|.(fset '|
|00000df0| 69 6e 73 65 72 74 2d 72 | 65 63 74 61 6e 67 6c 65 |insert-r|ectangle|
|00000e00| 20 23 5b 28 72 65 63 74 | 61 6e 67 6c 65 29 20 22 | #[(rect|angle) "|
|00000e10| 08 69 c1 1a 1b 89 1c ad | ae 5c 6e ac 9e c5 79 88 |.i......|.\n...y.|
|00000e20| 6e ac 83 c6 63 88 c7 0b | 21 88 69 0b 56 ab 84 c8 |n...c...|!.i.V...|
|00000e30| 0b 21 88 69 0b 57 ab 83 | 0b 6a 88 c9 12 0c 40 63 |.!.i.W..|.j....@c|
|00000e40| 88 0c 41 89 14 ac 53 c9 | 2b 87 22 20 5b 72 65 63 |..A...S.|+." [rec|
|00000e50| 74 61 6e 67 6c 65 20 74 | 20 66 69 72 73 74 20 69 |tangle t| first i|
|00000e60| 6e 73 65 72 74 63 6f 6c | 75 6d 6e 20 6c 69 6e 65 |nsertcol|umn line|
|00000e70| 73 20 31 20 31 30 20 6d | 6f 76 65 2d 74 6f 2d 63 |s 1 10 m|ove-to-c|
|00000e80| 6f 6c 75 6d 6e 20 72 65 | 63 74 61 6e 67 6c 65 2d |olumn re|ctangle-|
|00000e90| 63 6f 65 72 63 65 2d 74 | 61 62 20 6e 69 6c 5d 20 |coerce-t|ab nil] |
|00000ea0| 34 20 22 5c 0a 49 6e 73 | 65 72 74 20 74 65 78 74 |4 "\.Ins|ert text|
|00000eb0| 20 6f 66 20 52 45 43 54 | 41 4e 47 4c 45 20 77 69 | of RECT|ANGLE wi|
|00000ec0| 74 68 20 75 70 70 65 72 | 20 6c 65 66 74 20 63 6f |th upper| left co|
|00000ed0| 72 6e 65 72 20 61 74 20 | 70 6f 69 6e 74 2e 0a 52 |rner at |point..R|
|00000ee0| 45 43 54 41 4e 47 4c 45 | 27 73 20 66 69 72 73 74 |ECTANGLE|'s first|
|00000ef0| 20 6c 69 6e 65 20 69 73 | 20 69 6e 73 65 72 74 65 | line is| inserte|
|00000f00| 64 20 61 74 20 70 6f 69 | 6e 74 2c 0a 69 74 73 20 |d at poi|nt,.its |
|00000f10| 73 65 63 6f 6e 64 20 6c | 69 6e 65 20 69 73 20 69 |second l|ine is i|
|00000f20| 6e 73 65 72 74 65 64 20 | 61 74 20 61 20 70 6f 69 |nserted |at a poi|
|00000f30| 6e 74 20 76 65 72 74 69 | 63 61 6c 6c 79 20 75 6e |nt verti|cally un|
|00000f40| 64 65 72 20 70 6f 69 6e | 74 2c 20 65 74 63 2e 0a |der poin|t, etc..|
|00000f50| 52 45 43 54 41 4e 47 4c | 45 20 73 68 6f 75 6c 64 |RECTANGL|E should|
|00000f60| 20 62 65 20 61 20 6c 69 | 73 74 20 6f 66 20 73 74 | be a li|st of st|
|00000f70| 72 69 6e 67 73 2e 22 5d | 29 0a 28 66 73 65 74 20 |rings."]|).(fset |
|00000f80| 27 6f 70 65 6e 2d 72 65 | 63 74 61 6e 67 6c 65 20 |'open-re|ctangle |
|00000f90| 23 5b 28 73 74 61 72 74 | 20 65 6e 64 29 20 22 c0 |#[(start| end) ".|
|00000fa0| c1 5c 6e 0b c4 24 87 22 | 20 5b 6f 70 65 72 61 74 |.\n..$."| [operat|
|00000fb0| 65 2d 6f 6e 2d 72 65 63 | 74 61 6e 67 6c 65 20 6f |e-on-rec|tangle o|
|00000fc0| 70 65 6e 2d 72 65 63 74 | 61 6e 67 6c 65 2d 6c 69 |pen-rect|angle-li|
|00000fd0| 6e 65 20 73 74 61 72 74 | 20 65 6e 64 20 6e 69 6c |ne start| end nil|
|00000fe0| 5d 20 35 20 22 5c 0a 42 | 6c 61 6e 6b 20 6f 75 74 |] 5 "\.B|lank out|
|00000ff0| 20 72 65 63 74 61 6e 67 | 6c 65 20 77 69 74 68 20 | rectang|le with |
|00001000| 63 6f 72 6e 65 72 73 20 | 61 74 20 70 6f 69 6e 74 |corners |at point|
|00001010| 20 61 6e 64 20 6d 61 72 | 6b 2c 20 73 68 69 66 74 | and mar|k, shift|
|00001020| 69 6e 67 20 74 65 78 74 | 20 72 69 67 68 74 2e 0a |ing text| right..|
|00001030| 54 68 65 20 74 65 78 74 | 20 70 72 65 76 69 6f 75 |The text| previou|
|00001040| 73 6c 79 20 69 6e 20 74 | 68 65 20 72 65 67 69 6f |sly in t|he regio|
|00001050| 6e 20 69 73 20 6e 6f 74 | 20 6f 76 65 72 77 72 69 |n is not| overwri|
|00001060| 74 74 65 6e 20 62 79 20 | 74 68 65 20 62 6c 61 6e |tten by |the blan|
|00001070| 6b 73 2c 0a 62 75 74 20 | 69 6e 73 74 65 64 20 77 |ks,.but |insted w|
|00001080| 69 6e 64 73 20 75 70 20 | 74 6f 20 74 68 65 20 72 |inds up |to the r|
|00001090| 69 67 68 74 20 6f 66 20 | 74 68 65 20 72 65 63 74 |ight of |the rect|
|000010a0| 61 6e 67 6c 65 2e 22 20 | 22 72 22 5d 29 0a 28 66 |angle." |"r"]).(f|
|000010b0| 73 65 74 20 27 6f 70 65 | 6e 2d 72 65 63 74 61 6e |set 'ope|n-rectan|
|000010c0| 67 6c 65 2d 6c 69 6e 65 | 20 23 5b 28 73 74 61 72 |gle-line| #[(star|
|000010d0| 74 70 6f 73 20 62 65 67 | 65 78 74 72 61 20 65 6e |tpos beg|extra en|
|000010e0| 64 65 78 74 72 61 29 20 | 22 69 08 09 5c 5c 5c 5c |dextra) |"i..\\\\|
|000010f0| 1a 0b 62 88 69 1c c5 c6 | 77 88 5c 6e 69 0c 5a 5c |..b.i...|w.\ni.Z\|
|00001100| 5c 12 29 60 c5 c6 78 88 | 60 7c 88 5c 6e 6a 29 87 |\.)`..x.|`|.\nj).|
|00001110| 22 20 5b 62 65 67 65 78 | 74 72 61 20 65 6e 64 65 |" [begex|tra ende|
|00001120| 78 74 72 61 20 63 6f 6c | 75 6d 6e 20 73 74 61 72 |xtra col|umn star|
|00001130| 74 70 6f 73 20 6f 63 6f | 6c 20 22 20 09 22 20 6e |tpos oco|l " ." n|
|00001140| 69 6c 5d 20 33 5d 29 0a | 28 66 73 65 74 20 27 63 |il] 3]).|(fset 'c|
|00001150| 6c 65 61 72 2d 72 65 63 | 74 61 6e 67 6c 65 20 23 |lear-rec|tangle #|
|00001160| 5b 28 73 74 61 72 74 20 | 65 6e 64 29 20 22 c0 c1 |[(start |end) "..|
|00001170| 5c 6e 0b c4 24 87 22 20 | 5b 6f 70 65 72 61 74 65 |\n..$." |[operate|
|00001180| 2d 6f 6e 2d 72 65 63 74 | 61 6e 67 6c 65 20 63 6c |-on-rect|angle cl|
|00001190| 65 61 72 2d 72 65 63 74 | 61 6e 67 6c 65 2d 6c 69 |ear-rect|angle-li|
|000011a0| 6e 65 20 73 74 61 72 74 | 20 65 6e 64 20 74 5d 20 |ne start| end t] |
|000011b0| 35 20 22 5c 0a 42 6c 61 | 6e 6b 20 6f 75 74 20 72 |5 "\.Bla|nk out r|
|000011c0| 65 63 74 61 6e 67 6c 65 | 20 77 69 74 68 20 63 6f |ectangle| with co|
|000011d0| 72 6e 65 72 73 20 61 74 | 20 70 6f 69 6e 74 20 61 |rners at| point a|
|000011e0| 6e 64 20 6d 61 72 6b 2e | 0a 54 68 65 20 74 65 78 |nd mark.|.The tex|
|000011f0| 74 20 70 72 65 76 69 6f | 75 73 6c 79 20 69 6e 20 |t previo|usly in |
|00001200| 74 68 65 20 72 65 67 69 | 6f 6e 20 69 73 20 6f 76 |the regi|on is ov|
|00001210| 65 72 77 72 69 74 74 65 | 6e 20 62 79 20 74 68 65 |erwritte|n by the|
|00001220| 20 62 6c 61 6e 6b 73 2e | 0a 57 68 65 6e 20 63 61 | blanks.|.When ca|
|00001230| 6c 6c 65 64 20 66 72 6f | 6d 20 61 20 70 72 6f 67 |lled fro|m a prog|
|00001240| 72 61 6d 2c 20 72 65 71 | 75 69 72 65 73 20 74 77 |ram, req|uires tw|
|00001250| 6f 20 61 72 67 73 20 77 | 68 69 63 68 20 73 70 65 |o args w|hich spe|
|00001260| 63 69 66 79 20 74 68 65 | 20 63 6f 72 6e 65 72 73 |cify the| corners|
|00001270| 2e 22 20 22 72 22 5d 29 | 0a 28 62 79 74 65 2d 63 |." "r"])|.(byte-c|
|00001280| 6f 64 65 20 22 c0 c1 4d | 88 c2 c3 4d 87 22 20 5b |ode "..M|...M." [|
|00001290| 63 6c 65 61 72 2d 72 65 | 63 74 61 6e 67 6c 65 2d |clear-re|ctangle-|
|000012a0| 6c 69 6e 65 20 23 5b 28 | 73 74 61 72 74 70 6f 73 |line #[(|startpos|
|000012b0| 20 62 65 67 65 78 74 72 | 61 20 65 6e 64 65 78 74 | begextr|a endext|
|000012c0| 72 61 29 20 22 c0 c1 77 | 88 69 5c 6e 5c 5c 1b 60 |ra) "..w|.i\n\\.`|
|000012d0| 0c 62 88 c0 c1 78 88 60 | 7c 88 0b 6a 29 87 22 20 |.b...x.`||..j)." |
|000012e0| 5b 22 20 09 22 20 6e 69 | 6c 20 65 6e 64 65 78 74 |[" ." ni|l endext|
|000012f0| 72 61 20 63 6f 6c 75 6d | 6e 20 73 74 61 72 74 70 |ra colum|n startp|
|00001300| 6f 73 5d 20 33 5d 20 72 | 65 63 74 61 6e 67 6c 65 |os] 3] r|ectangle|
|00001310| 2d 63 6f 65 72 63 65 2d | 74 61 62 20 23 5b 28 63 |-coerce-|tab #[(c|
|00001320| 6f 6c 75 6d 6e 29 20 22 | 69 c0 19 1a c3 c4 21 88 |olumn) "|i.....!.|
|00001330| 5c 6e 6a 88 c5 5c 6e 0e | 06 5a 21 2a 87 22 20 5b |\nj..\n.|.Z!*." [|
|00001340| 6e 69 6c 20 69 6e 64 65 | 6e 74 2d 74 61 62 73 2d |nil inde|nt-tabs-|
|00001350| 6d 6f 64 65 20 61 66 74 | 65 72 63 6f 6c 20 64 65 |mode aft|ercol de|
|00001360| 6c 65 74 65 2d 63 68 61 | 72 20 2d 31 20 62 61 63 |lete-cha|r -1 bac|
|00001370| 6b 77 61 72 64 2d 63 68 | 61 72 20 63 6f 6c 75 6d |kward-ch|ar colum|
|00001380| 6e 5d 20 33 5d 5d 20 32 | 29 0a |n] 3]] 2|). |
+--------+-------------------------+-------------------------+--------+--------+