home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / lib / emacs / 18.59 / lisp / simple.elc < prev    next >
Emacs Compiled Lisp  |  1996-09-09  |  38.3 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 v18 byte-compiled Lisp data default
99% file data default
100% gt2 Kopftext: '(defun open-line (arg) ' default (weak)
100% xdgMime text/x-emacs-lisp default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 0a 28 64 65 66 75 6e 20 | 6f 70 65 6e 2d 6c 69 6e |.(defun |open-lin|
|00000010| 65 20 28 61 72 67 29 20 | 22 5c 0a 49 6e 73 65 72 |e (arg) |"\.Inser|
|00000020| 74 20 61 20 6e 65 77 6c | 69 6e 65 20 61 6e 64 20 |t a newl|ine and |
|00000030| 6c 65 61 76 65 20 70 6f | 69 6e 74 20 62 65 66 6f |leave po|int befo|
|00000040| 72 65 20 69 74 2e 0a 57 | 69 74 68 20 61 72 67 2c |re it..W|ith arg,|
|00000050| 20 69 6e 73 65 72 74 73 | 20 74 68 61 74 20 6d 61 | inserts| that ma|
|00000060| 6e 79 20 6e 65 77 6c 69 | 6e 65 73 2e 22 20 28 69 |ny newli|nes." (i|
|00000070| 6e 74 65 72 61 63 74 69 | 76 65 20 22 2a 70 22 29 |nteracti|ve "*p")|
|00000080| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c2 88 6e | (byte-c|ode "..n|
|00000090| 85 08 00 6f 3f 18 08 85 | 10 00 c3 c4 21 88 09 c5 |...o?...|....!...|
|000000a0| 56 85 26 00 c6 63 88 60 | 53 62 88 09 53 89 11 88 |V.&..c.`|Sb..S...|
|000000b0| 82 11 00 88 08 85 2e 00 | c3 c7 21 29 87 22 20 5b |........|..!)." [|
|000000c0| 66 6c 61 67 20 61 72 67 | 20 6e 69 6c 20 66 6f 72 |flag arg| nil for|
|000000d0| 77 61 72 64 2d 63 68 61 | 72 20 2d 31 20 30 20 31 |ward-cha|r -1 0 1|
|000000e0| 30 20 31 5d 20 34 29 29 | 0a 0a 28 64 65 66 75 6e |0 1] 4))|..(defun|
|000000f0| 20 73 70 6c 69 74 2d 6c | 69 6e 65 20 6e 69 6c 20 | split-l|ine nil |
|00000100| 22 5c 0a 53 70 6c 69 74 | 20 63 75 72 72 65 6e 74 |"\.Split| current|
|00000110| 20 6c 69 6e 65 2c 20 6d | 6f 76 69 6e 67 20 70 6f | line, m|oving po|
|00000120| 72 74 69 6f 6e 20 62 65 | 79 6f 6e 64 20 70 6f 69 |rtion be|yond poi|
|00000130| 6e 74 20 76 65 72 74 69 | 63 61 6c 6c 79 20 64 6f |nt verti|cally do|
|00000140| 77 6e 2e 22 20 28 69 6e | 74 65 72 61 63 74 69 76 |wn." (in|teractiv|
|00000150| 65 20 22 2a 22 29 20 28 | 62 79 74 65 2d 63 6f 64 |e "*") (|byte-cod|
|00000160| 65 20 22 c2 88 c3 c4 21 | 88 69 60 19 18 c5 63 88 |e "....!|.i`...c.|
|00000170| c6 08 c7 5c 22 88 09 62 | 2a 87 22 20 5b 63 6f 6c |...\"..b|*." [col|
|00000180| 20 70 6f 73 20 6e 69 6c | 20 73 6b 69 70 2d 63 68 | pos nil| skip-ch|
|00000190| 61 72 73 2d 66 6f 72 77 | 61 72 64 20 22 20 09 22 |ars-forw|ard " ."|
|000001a0| 20 31 30 20 69 6e 64 65 | 6e 74 2d 74 6f 20 30 5d | 10 inde|nt-to 0]|
|000001b0| 20 34 29 29 0a 0a 28 64 | 65 66 75 6e 20 71 75 6f | 4))..(d|efun quo|
|000001c0| 74 65 64 2d 69 6e 73 65 | 72 74 20 28 61 72 67 29 |ted-inse|rt (arg)|
|000001d0| 20 22 5c 0a 52 65 61 64 | 20 6e 65 78 74 20 69 6e | "\.Read| next in|
|000001e0| 70 75 74 20 63 68 61 72 | 61 63 74 65 72 20 61 6e |put char|acter an|
|000001f0| 64 20 69 6e 73 65 72 74 | 20 69 74 2e 0a 55 73 65 |d insert| it..Use|
|00000200| 66 75 6c 20 66 6f 72 20 | 69 6e 73 65 72 74 69 6e |ful for |insertin|
|00000210| 67 20 63 6f 6e 74 72 6f | 6c 20 63 68 61 72 61 63 |g contro|l charac|
|00000220| 74 65 72 73 2e 0a 59 6f | 75 20 6d 61 79 20 61 6c |ters..Yo|u may al|
|00000230| 73 6f 20 74 79 70 65 20 | 75 70 20 74 6f 20 33 20 |so type |up to 3 |
|00000240| 6f 63 74 61 6c 20 64 69 | 67 69 74 73 2c 20 74 6f |octal di|gits, to|
|00000250| 20 69 6e 73 65 72 74 20 | 61 20 63 68 61 72 61 63 | insert |a charac|
|00000260| 74 65 72 20 77 69 74 68 | 20 74 68 61 74 20 63 6f |ter with| that co|
|00000270| 64 65 22 20 28 69 6e 74 | 65 72 61 63 74 69 76 65 |de" (int|eractive|
|00000280| 20 22 2a 70 22 29 20 28 | 62 79 74 65 2d 63 6f 64 | "*p") (|byte-cod|
|00000290| 65 20 22 c2 88 c3 20 18 | 09 c4 56 85 16 00 08 63 |e "... .|..V....c|
|000002a0| 88 09 53 89 11 88 82 05 | 00 29 87 22 20 5b 63 68 |..S.....|.)." [ch|
|000002b0| 61 72 20 61 72 67 20 6e | 69 6c 20 72 65 61 64 2d |ar arg n|il read-|
|000002c0| 71 75 6f 74 65 64 2d 63 | 68 61 72 20 30 5d 20 34 |quoted-c|har 0] 4|
|000002d0| 29 29 0a 0a 28 64 65 66 | 75 6e 20 64 65 6c 65 74 |))..(def|un delet|
|000002e0| 65 2d 69 6e 64 65 6e 74 | 61 74 69 6f 6e 20 28 26 |e-indent|ation (&|
|000002f0| 6f 70 74 69 6f 6e 61 6c | 20 61 72 67 29 20 22 5c |optional| arg) "\|
|00000300| 0a 4a 6f 69 6e 20 74 68 | 69 73 20 6c 69 6e 65 20 |.Join th|is line |
|00000310| 74 6f 20 70 72 65 76 69 | 6f 75 73 20 61 6e 64 20 |to previ|ous and |
|00000320| 66 69 78 20 75 70 20 77 | 68 69 74 65 73 70 61 63 |fix up w|hitespac|
|00000330| 65 20 61 74 20 6a 6f 69 | 6e 2e 0a 57 69 74 68 20 |e at joi|n..With |
|00000340| 61 72 67 75 6d 65 6e 74 | 2c 20 6a 6f 69 6e 20 74 |argument|, join t|
|00000350| 68 69 73 20 6c 69 6e 65 | 20 74 6f 20 66 6f 6c 6c |his line| to foll|
|00000360| 6f 77 69 6e 67 20 6c 69 | 6e 65 2e 22 20 28 69 6e |owing li|ne." (in|
|00000370| 74 65 72 61 63 74 69 76 | 65 20 22 2a 50 22 29 20 |teractiv|e "*P") |
|00000380| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c1 88 c2 20 |(byte-co|de "... |
|00000390| 88 08 85 0c 00 c3 c4 21 | 88 68 c5 3d 85 1b 00 c6 |.......!|.h.=....|
|000003a0| 60 60 53 5c 22 88 c7 20 | 87 22 20 5b 61 72 67 20 |``S\".. |." [arg |
|000003b0| 6e 69 6c 20 62 65 67 69 | 6e 6e 69 6e 67 2d 6f 66 |nil begi|nning-of|
|000003c0| 2d 6c 69 6e 65 20 66 6f | 72 77 61 72 64 2d 6c 69 |-line fo|rward-li|
|000003d0| 6e 65 20 31 20 31 30 20 | 64 65 6c 65 74 65 2d 72 |ne 1 10 |delete-r|
|000003e0| 65 67 69 6f 6e 20 66 69 | 78 75 70 2d 77 68 69 74 |egion fi|xup-whit|
|000003f0| 65 73 70 61 63 65 5d 20 | 35 29 29 0a 0a 28 64 65 |espace] |5))..(de|
|00000400| 66 75 6e 20 66 69 78 75 | 70 2d 77 68 69 74 65 73 |fun fixu|p-whites|
|00000410| 70 61 63 65 20 6e 69 6c | 20 22 5c 0a 46 69 78 75 |pace nil| "\.Fixu|
|00000420| 70 20 77 68 69 74 65 20 | 73 70 61 63 65 20 62 65 |p white |space be|
|00000430| 74 77 65 65 6e 20 6f 62 | 6a 65 63 74 73 20 61 72 |tween ob|jects ar|
|00000440| 6f 75 6e 64 20 70 6f 69 | 6e 74 2e 0a 4c 65 61 76 |ound poi|nt..Leav|
|00000450| 65 20 6f 6e 65 20 73 70 | 61 63 65 20 6f 72 20 6e |e one sp|ace or n|
|00000460| 6f 6e 65 2c 20 61 63 63 | 6f 72 64 69 6e 67 20 74 |one, acc|ording t|
|00000470| 6f 20 74 68 65 20 63 6f | 6e 74 65 78 74 2e 22 20 |o the co|ntext." |
|00000480| 28 69 6e 74 65 72 61 63 | 74 69 76 65 20 22 2a 22 |(interac|tive "*"|
|00000490| 29 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c0 88 |) (byte-|code "..|
|000004a0| 8a c1 20 88 c2 c3 21 86 | 15 00 8a c4 c5 21 88 c2 |.. ...!.|.....!..|
|000004b0| c6 21 29 83 1c 00 c0 82 | 1e 00 c7 63 29 87 22 20 |.!).....|...c)." |
|000004c0| 5b 6e 69 6c 20 64 65 6c | 65 74 65 2d 68 6f 72 69 |[nil del|ete-hori|
|000004d0| 7a 6f 6e 74 61 6c 2d 73 | 70 61 63 65 20 6c 6f 6f |zontal-s|pace loo|
|000004e0| 6b 69 6e 67 2d 61 74 20 | 22 5e 5c 5c 7c 5c 5c 73 |king-at |"^\\|\\s|
|000004f0| 29 5c 5c 7c 24 22 20 66 | 6f 72 77 61 72 64 2d 63 |)\\|$" f|orward-c|
|00000500| 68 61 72 20 2d 31 20 22 | 5c 5c 73 28 5c 5c 7c 5c |har -1 "|\\s(\\|\|
|00000510| 5c 73 27 22 20 33 32 5d | 20 35 29 29 0a 0a 28 64 |\s'" 32]| 5))..(d|
|00000520| 65 66 75 6e 20 64 65 6c | 65 74 65 2d 68 6f 72 69 |efun del|ete-hori|
|00000530| 7a 6f 6e 74 61 6c 2d 73 | 70 61 63 65 20 6e 69 6c |zontal-s|pace nil|
|00000540| 20 22 5c 0a 44 65 6c 65 | 74 65 20 61 6c 6c 20 73 | "\.Dele|te all s|
|00000550| 70 61 63 65 73 20 61 6e | 64 20 74 61 62 73 20 61 |paces an|d tabs a|
|00000560| 72 6f 75 6e 64 20 70 6f | 69 6e 74 2e 22 20 28 69 |round po|int." (i|
|00000570| 6e 74 65 72 61 63 74 69 | 76 65 20 22 2a 22 29 20 |nteracti|ve "*") |
|00000580| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c0 88 c1 c2 |(byte-co|de "....|
|00000590| 21 88 c3 60 c4 c2 21 88 | 60 5c 22 87 22 20 5b 6e |!..`..!.|`\"." [n|
|000005a0| 69 6c 20 73 6b 69 70 2d | 63 68 61 72 73 2d 62 61 |il skip-|chars-ba|
|000005b0| 63 6b 77 61 72 64 20 22 | 20 09 22 20 64 65 6c 65 |ckward "| ." dele|
|000005c0| 74 65 2d 72 65 67 69 6f | 6e 20 73 6b 69 70 2d 63 |te-regio|n skip-c|
|000005d0| 68 61 72 73 2d 66 6f 72 | 77 61 72 64 5d 20 35 29 |hars-for|ward] 5)|
|000005e0| 29 0a 0a 28 64 65 66 75 | 6e 20 6a 75 73 74 2d 6f |)..(defu|n just-o|
|000005f0| 6e 65 2d 73 70 61 63 65 | 20 6e 69 6c 20 22 5c 0a |ne-space| nil "\.|
|00000600| 44 65 6c 65 74 65 20 61 | 6c 6c 20 73 70 61 63 65 |Delete a|ll space|
|00000610| 73 20 61 6e 64 20 74 61 | 62 73 20 61 72 6f 75 6e |s and ta|bs aroun|
|00000620| 64 20 70 6f 69 6e 74 2c | 20 6c 65 61 76 69 6e 67 |d point,| leaving|
|00000630| 20 6f 6e 65 20 73 70 61 | 63 65 2e 22 20 28 69 6e | one spa|ce." (in|
|00000640| 74 65 72 61 63 74 69 76 | 65 20 22 2a 22 29 20 28 |teractiv|e "*") (|
|00000650| 62 79 74 65 2d 63 6f 64 | 65 20 22 c0 88 c1 c2 21 |byte-cod|e "....!|
|00000660| 88 67 c3 55 83 12 00 c4 | c5 21 82 14 00 c3 63 88 |.g.U....|.!....c.|
|00000670| c6 60 c7 c2 21 88 60 5c | 22 87 22 20 5b 6e 69 6c |.`..!.`\|"." [nil|
|00000680| 20 73 6b 69 70 2d 63 68 | 61 72 73 2d 62 61 63 6b | skip-ch|ars-back|
|00000690| 77 61 72 64 20 22 20 09 | 22 20 33 32 20 66 6f 72 |ward " .|" 32 for|
|000006a0| 77 61 72 64 2d 63 68 61 | 72 20 31 20 64 65 6c 65 |ward-cha|r 1 dele|
|000006b0| 74 65 2d 72 65 67 69 6f | 6e 20 73 6b 69 70 2d 63 |te-regio|n skip-c|
|000006c0| 68 61 72 73 2d 66 6f 72 | 77 61 72 64 5d 20 36 29 |hars-for|ward] 6)|
|000006d0| 29 0a 0a 28 64 65 66 75 | 6e 20 64 65 6c 65 74 65 |)..(defu|n delete|
|000006e0| 2d 62 6c 61 6e 6b 2d 6c | 69 6e 65 73 20 6e 69 6c |-blank-l|ines nil|
|000006f0| 20 22 5c 0a 4f 6e 20 62 | 6c 61 6e 6b 20 6c 69 6e | "\.On b|lank lin|
|00000700| 65 2c 20 64 65 6c 65 74 | 65 20 61 6c 6c 20 73 75 |e, delet|e all su|
|00000710| 72 72 6f 75 6e 64 69 6e | 67 20 62 6c 61 6e 6b 20 |rroundin|g blank |
|00000720| 6c 69 6e 65 73 2c 20 6c | 65 61 76 69 6e 67 20 6a |lines, l|eaving j|
|00000730| 75 73 74 20 6f 6e 65 2e | 0a 4f 6e 20 69 73 6f 6c |ust one.|.On isol|
|00000740| 61 74 65 64 20 62 6c 61 | 6e 6b 20 6c 69 6e 65 2c |ated bla|nk line,|
|00000750| 20 64 65 6c 65 74 65 20 | 74 68 61 74 20 6f 6e 65 | delete |that one|
|00000760| 2e 0a 4f 6e 20 6e 6f 6e | 62 6c 61 6e 6b 20 6c 69 |..On non|blank li|
|00000770| 6e 65 2c 20 64 65 6c 65 | 74 65 20 61 6c 6c 20 62 |ne, dele|te all b|
|00000780| 6c 61 6e 6b 20 6c 69 6e | 65 73 20 74 68 61 74 20 |lank lin|es that |
|00000790| 66 6f 6c 6c 6f 77 20 69 | 74 2e 22 20 28 69 6e 74 |follow i|t." (int|
|000007a0| 65 72 61 63 74 69 76 65 | 20 22 2a 22 29 20 28 62 |eractive| "*") (b|
|000007b0| 79 74 65 2d 63 6f 64 65 | 20 22 c2 88 c2 c2 19 18 |yte-code| "......|
|000007c0| 8a c4 20 88 c5 c6 21 89 | 10 88 08 85 27 00 c5 c7 |.. ...!.|....'...|
|000007d0| 21 3f 85 27 00 6f 86 27 | 00 c8 c9 21 88 c5 c6 21 |!?.'.o.'|...!...!|
|000007e0| 3f 89 11 29 88 08 85 4e | 00 c4 20 88 09 85 39 00 |?..)...N|.. ...9.|
|000007f0| c8 ca 21 88 cb 60 cc cd | c2 c3 23 83 4c 00 c8 ca |..!..`..|..#.L...|
|00000800| 21 88 60 82 4d 00 65 5c | 22 88 08 85 54 00 09 3f |!.`.M.e\|"...T..?|
|00000810| 85 74 00 8a ce 20 88 c8 | ca 21 88 cb 60 cf cd c2 |.t... ..|.!..`...|
|00000820| c3 23 83 71 00 c4 20 88 | 60 82 72 00 64 5c 22 29 |.#.q.. .|`.r.d\")|
|00000830| 2a 87 22 20 5b 74 68 69 | 73 62 6c 61 6e 6b 20 73 |*." [thi|sblank s|
|00000840| 69 6e 67 6c 65 62 6c 61 | 6e 6b 20 6e 69 6c 20 74 |inglebla|nk nil t|
|00000850| 20 62 65 67 69 6e 6e 69 | 6e 67 2d 6f 66 2d 6c 69 | beginni|ng-of-li|
|00000860| 6e 65 20 6c 6f 6f 6b 69 | 6e 67 2d 61 74 20 22 5b |ne looki|ng-at "[|
|00000870| 20 09 5d 2a 24 22 20 22 | 5b 20 09 5d 2a 0a 5b 20 | .]*$" "|[ .]*.[ |
|00000880| 09 5d 2a 24 22 20 66 6f | 72 77 61 72 64 2d 6c 69 |.]*$" fo|rward-li|
|00000890| 6e 65 20 2d 31 20 31 20 | 64 65 6c 65 74 65 2d 72 |ne -1 1 |delete-r|
|000008a0| 65 67 69 6f 6e 20 72 65 | 2d 73 65 61 72 63 68 2d |egion re|-search-|
|000008b0| 62 61 63 6b 77 61 72 64 | 20 22 5b 5e 20 09 0a 5d |backward| "[^ ..]|
|000008c0| 22 20 65 6e 64 2d 6f 66 | 2d 6c 69 6e 65 20 72 65 |" end-of|-line re|
|000008d0| 2d 73 65 61 72 63 68 2d | 66 6f 72 77 61 72 64 5d |-search-|forward]|
|000008e0| 20 31 38 29 29 0a 0a 28 | 64 65 66 75 6e 20 62 61 | 18))..(|defun ba|
|000008f0| 63 6b 2d 74 6f 2d 69 6e | 64 65 6e 74 61 74 69 6f |ck-to-in|dentatio|
|00000900| 6e 20 6e 69 6c 20 22 5c | 0a 4d 6f 76 65 20 70 6f |n nil "\|.Move po|
|00000910| 69 6e 74 20 74 6f 20 74 | 68 65 20 66 69 72 73 74 |int to t|he first|
|00000920| 20 6e 6f 6e 2d 77 68 69 | 74 65 73 70 61 63 65 20 | non-whi|tespace |
|00000930| 63 68 61 72 61 63 74 65 | 72 20 6f 6e 20 74 68 69 |characte|r on thi|
|00000940| 73 20 6c 69 6e 65 2e 22 | 20 28 69 6e 74 65 72 61 |s line."| (intera|
|00000950| 63 74 69 76 65 29 20 28 | 62 79 74 65 2d 63 6f 64 |ctive) (|byte-cod|
|00000960| 65 20 22 c0 88 c1 c2 21 | 88 c3 c4 21 87 22 20 5b |e "....!|...!." [|
|00000970| 6e 69 6c 20 62 65 67 69 | 6e 6e 69 6e 67 2d 6f 66 |nil begi|nning-of|
|00000980| 2d 6c 69 6e 65 20 31 20 | 73 6b 69 70 2d 63 68 61 |-line 1 |skip-cha|
|00000990| 72 73 2d 66 6f 72 77 61 | 72 64 20 22 20 09 22 5d |rs-forwa|rd " ."]|
|000009a0| 20 33 29 29 0a 0a 28 64 | 65 66 75 6e 20 6e 65 77 | 3))..(d|efun new|
|000009b0| 6c 69 6e 65 2d 61 6e 64 | 2d 69 6e 64 65 6e 74 20 |line-and|-indent |
|000009c0| 6e 69 6c 20 22 5c 0a 49 | 6e 73 65 72 74 20 61 20 |nil "\.I|nsert a |
|000009d0| 6e 65 77 6c 69 6e 65 2c | 20 74 68 65 6e 20 69 6e |newline,| then in|
|000009e0| 64 65 6e 74 20 61 63 63 | 6f 72 64 69 6e 67 20 74 |dent acc|ording t|
|000009f0| 6f 20 6d 61 6a 6f 72 20 | 6d 6f 64 65 2e 0a 49 6e |o major |mode..In|
|00000a00| 64 65 6e 74 61 74 69 6f | 6e 20 69 73 20 64 6f 6e |dentatio|n is don|
|00000a10| 65 20 75 73 69 6e 67 20 | 74 68 65 20 63 75 72 72 |e using |the curr|
|00000a20| 65 6e 74 20 69 6e 64 65 | 6e 74 2d 6c 69 6e 65 2d |ent inde|nt-line-|
|00000a30| 66 75 6e 63 74 69 6f 6e | 2e 0a 49 6e 20 70 72 6f |function|..In pro|
|00000a40| 67 72 61 6d 6d 69 6e 67 | 20 6c 61 6e 67 75 61 67 |gramming| languag|
|00000a50| 65 20 6d 6f 64 65 73 2c | 20 74 68 69 73 20 69 73 |e modes,| this is|
|00000a60| 20 74 68 65 20 73 61 6d | 65 20 61 73 20 54 41 42 | the sam|e as TAB|
|00000a70| 2e 0a 49 6e 20 73 6f 6d | 65 20 74 65 78 74 20 6d |..In som|e text m|
|00000a80| 6f 64 65 73 2c 20 77 68 | 65 72 65 20 54 41 42 20 |odes, wh|ere TAB |
|00000a90| 69 6e 73 65 72 74 73 20 | 61 20 74 61 62 2c 20 74 |inserts |a tab, t|
|00000aa0| 68 69 73 20 69 6e 64 65 | 6e 74 73 20 74 6f 20 74 |his inde|nts to t|
|00000ab0| 68 65 0a 73 70 65 63 69 | 66 69 65 64 20 6c 65 66 |he.speci|fied lef|
|00000ac0| 74 2d 6d 61 72 67 69 6e | 20 63 6f 6c 75 6d 6e 2e |t-margin| column.|
|00000ad0| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 20 22 |" (inter|active "|
|00000ae0| 2a 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |*") (byt|e-code "|
|00000af0| c0 88 c1 60 c2 c3 21 88 | 60 5c 22 88 c4 20 88 c5 |...`..!.|`\".. ..|
|00000b00| 20 87 22 20 5b 6e 69 6c | 20 64 65 6c 65 74 65 2d | ." [nil| delete-|
|00000b10| 72 65 67 69 6f 6e 20 73 | 6b 69 70 2d 63 68 61 72 |region s|kip-char|
|00000b20| 73 2d 62 61 63 6b 77 61 | 72 64 20 22 20 09 22 20 |s-backwa|rd " ." |
|00000b30| 6e 65 77 6c 69 6e 65 20 | 69 6e 64 65 6e 74 2d 61 |newline |indent-a|
|00000b40| 63 63 6f 72 64 69 6e 67 | 2d 74 6f 2d 6d 6f 64 65 |ccording|-to-mode|
|00000b50| 5d 20 35 29 29 0a 0a 28 | 64 65 66 75 6e 20 72 65 |] 5))..(|defun re|
|00000b60| 69 6e 64 65 6e 74 2d 74 | 68 65 6e 2d 6e 65 77 6c |indent-t|hen-newl|
|00000b70| 69 6e 65 2d 61 6e 64 2d | 69 6e 64 65 6e 74 20 6e |ine-and-|indent n|
|00000b80| 69 6c 20 22 5c 0a 52 65 | 69 6e 64 65 6e 74 20 63 |il "\.Re|indent c|
|00000b90| 75 72 72 65 6e 74 20 6c | 69 6e 65 2c 20 69 6e 73 |urrent l|ine, ins|
|00000ba0| 65 72 74 20 6e 65 77 6c | 69 6e 65 2c 20 74 68 65 |ert newl|ine, the|
|00000bb0| 6e 20 69 6e 64 65 6e 74 | 20 74 68 65 20 6e 65 77 |n indent| the new|
|00000bc0| 20 6c 69 6e 65 2e 0a 49 | 6e 64 65 6e 74 61 74 69 | line..I|ndentati|
|00000bd0| 6f 6e 20 6f 66 20 62 6f | 74 68 20 6c 69 6e 65 73 |on of bo|th lines|
|00000be0| 20 69 73 20 64 6f 6e 65 | 20 61 63 63 6f 72 64 69 | is done| accordi|
|00000bf0| 6e 67 20 74 6f 20 74 68 | 65 20 63 75 72 72 65 6e |ng to th|e curren|
|00000c00| 74 20 6d 61 6a 6f 72 20 | 6d 6f 64 65 2c 0a 77 68 |t major |mode,.wh|
|00000c10| 69 63 68 20 6d 65 61 6e | 73 20 74 68 61 74 20 74 |ich mean|s that t|
|00000c20| 68 65 20 63 75 72 72 65 | 6e 74 20 76 61 6c 75 65 |he curre|nt value|
|00000c30| 20 6f 66 20 69 6e 64 65 | 6e 74 2d 6c 69 6e 65 2d | of inde|nt-line-|
|00000c40| 66 75 6e 63 74 69 6f 6e | 20 69 73 20 63 61 6c 6c |function| is call|
|00000c50| 65 64 2e 0a 49 6e 20 70 | 72 6f 67 72 61 6d 6d 69 |ed..In p|rogrammi|
|00000c60| 6e 67 20 6c 61 6e 67 75 | 61 67 65 20 6d 6f 64 65 |ng langu|age mode|
|00000c70| 73 2c 20 74 68 69 73 20 | 69 73 20 74 68 65 20 73 |s, this |is the s|
|00000c80| 61 6d 65 20 61 73 20 54 | 41 42 2e 0a 49 6e 20 73 |ame as T|AB..In s|
|00000c90| 6f 6d 65 20 74 65 78 74 | 20 6d 6f 64 65 73 2c 20 |ome text| modes, |
|00000ca0| 77 68 65 72 65 20 54 41 | 42 20 69 6e 73 65 72 74 |where TA|B insert|
|00000cb0| 73 20 61 20 74 61 62 2c | 20 74 68 69 73 20 69 6e |s a tab,| this in|
|00000cc0| 64 65 6e 74 73 20 74 6f | 20 74 68 65 0a 73 70 65 |dents to| the.spe|
|00000cd0| 63 69 66 69 65 64 20 6c | 65 66 74 2d 6d 61 72 67 |cified l|eft-marg|
|00000ce0| 69 6e 20 63 6f 6c 75 6d | 6e 2e 22 20 28 69 6e 74 |in colum|n." (int|
|00000cf0| 65 72 61 63 74 69 76 65 | 20 22 2a 22 29 20 28 62 |eractive| "*") (b|
|00000d00| 79 74 65 2d 63 6f 64 65 | 20 22 c0 88 8a c1 60 c2 |yte-code| "....`.|
|00000d10| c3 21 88 60 5c 22 88 c4 | 20 29 88 c5 20 88 c4 20 |.!.`\"..| ).. .. |
|00000d20| 87 22 20 5b 6e 69 6c 20 | 64 65 6c 65 74 65 2d 72 |." [nil |delete-r|
|00000d30| 65 67 69 6f 6e 20 73 6b | 69 70 2d 63 68 61 72 73 |egion sk|ip-chars|
|00000d40| 2d 62 61 63 6b 77 61 72 | 64 20 22 20 09 22 20 69 |-backwar|d " ." i|
|00000d50| 6e 64 65 6e 74 2d 61 63 | 63 6f 72 64 69 6e 67 2d |ndent-ac|cording-|
|00000d60| 74 6f 2d 6d 6f 64 65 20 | 6e 65 77 6c 69 6e 65 5d |to-mode |newline]|
|00000d70| 20 36 29 29 0a 0a 28 64 | 65 66 75 6e 20 6b 69 6c | 6))..(d|efun kil|
|00000d80| 6c 2d 66 6f 72 77 61 72 | 64 2d 63 68 61 72 73 20 |l-forwar|d-chars |
|00000d90| 28 61 72 67 29 20 28 62 | 79 74 65 2d 63 6f 64 65 |(arg) (b|yte-code|
|00000da0| 20 22 08 3c 85 09 00 08 | 40 89 10 88 08 c1 3d 85 | ".<....|@.....=.|
|00000db0| 13 00 c2 89 10 88 c3 60 | 60 08 5c 5c 5c 22 87 22 |.......`|`.\\\"."|
|00000dc0| 20 5b 61 72 67 20 2d 20 | 2d 31 20 6b 69 6c 6c 2d | [arg - |-1 kill-|
|00000dd0| 72 65 67 69 6f 6e 5d 20 | 34 29 29 0a 0a 28 64 65 |region] |4))..(de|
|00000de0| 66 75 6e 20 6b 69 6c 6c | 2d 62 61 63 6b 77 61 72 |fun kill|-backwar|
|00000df0| 64 2d 63 68 61 72 73 20 | 28 61 72 67 29 20 28 62 |d-chars |(arg) (b|
|00000e00| 79 74 65 2d 63 6f 64 65 | 20 22 08 3c 85 09 00 08 |yte-code| ".<....|
|00000e10| 40 89 10 88 08 c1 3d 85 | 13 00 c2 89 10 88 c3 60 |@.....=.|.......`|
|00000e20| 60 08 5a 5c 22 87 22 20 | 5b 61 72 67 20 2d 20 2d |`.Z\"." |[arg - -|
|00000e30| 31 20 6b 69 6c 6c 2d 72 | 65 67 69 6f 6e 5d 20 34 |1 kill-r|egion] 4|
|00000e40| 29 29 0a 0a 28 64 65 66 | 75 6e 20 62 61 63 6b 77 |))..(def|un backw|
|00000e50| 61 72 64 2d 64 65 6c 65 | 74 65 2d 63 68 61 72 2d |ard-dele|te-char-|
|00000e60| 75 6e 74 61 62 69 66 79 | 20 28 61 72 67 20 26 6f |untabify| (arg &o|
|00000e70| 70 74 69 6f 6e 61 6c 20 | 6b 69 6c 6c 70 29 20 22 |ptional |killp) "|
|00000e80| 5c 0a 44 65 6c 65 74 65 | 20 63 68 61 72 61 63 74 |\.Delete| charact|
|00000e90| 65 72 73 20 62 61 63 6b | 77 61 72 64 2c 20 63 68 |ers back|ward, ch|
|00000ea0| 61 6e 67 69 6e 67 20 74 | 61 62 73 20 69 6e 74 6f |anging t|abs into|
|00000eb0| 20 73 70 61 63 65 73 2e | 0a 44 65 6c 65 74 65 20 | spaces.|.Delete |
|00000ec0| 41 52 47 20 63 68 61 72 | 73 2c 20 61 6e 64 20 6b |ARG char|s, and k|
|00000ed0| 69 6c 6c 20 28 73 61 76 | 65 20 69 6e 20 6b 69 6c |ill (sav|e in kil|
|00000ee0| 6c 20 72 69 6e 67 29 20 | 69 66 20 4b 49 4c 4c 50 |l ring) |if KILLP|
|00000ef0| 20 69 73 20 6e 6f 6e 2d | 6e 69 6c 2e 0a 49 6e 74 | is non-|nil..Int|
|00000f00| 65 72 61 63 74 69 76 65 | 6c 79 2c 20 41 52 47 20 |eractive|ly, ARG |
|00000f10| 69 73 20 74 68 65 20 70 | 72 65 66 69 78 20 61 72 |is the p|refix ar|
|00000f20| 67 20 28 64 65 66 61 75 | 6c 74 20 31 29 0a 61 6e |g (defau|lt 1).an|
|00000f30| 64 20 4b 49 4c 4c 50 20 | 69 73 20 74 20 69 66 20 |d KILLP |is t if |
|00000f40| 70 72 65 66 69 78 20 61 | 72 67 20 69 73 20 77 61 |prefix a|rg is wa|
|00000f50| 73 20 73 70 65 63 69 66 | 69 65 64 2e 22 20 28 69 |s specif|ied." (i|
|00000f60| 6e 74 65 72 61 63 74 69 | 76 65 20 22 2a 70 0a 50 |nteracti|ve "*p.P|
|00000f70| 22 29 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 c4 |") (byte|-code ".|
|00000f80| 88 09 18 8a 08 c5 56 85 | 0d 00 6f 3f 85 38 00 68 |......V.|..o?.8.h|
|00000f90| c6 55 85 2b 00 69 1a c7 | c8 21 88 0a 69 5a 89 12 |.U.+.i..|.!..iZ..|
|00000fa0| 88 c9 ca 0a 5c 22 88 cb | cc 21 29 88 c7 c8 21 88 |....\"..|.!)...!.|
|00000fb0| 08 53 89 10 88 82 05 00 | 29 29 88 cd 09 0b 5c 22 |.S......|))....\"|
|00000fc0| 87 22 20 5b 63 6f 75 6e | 74 20 61 72 67 20 63 6f |." [coun|t arg co|
|00000fd0| 6c 20 6b 69 6c 6c 70 20 | 6e 69 6c 20 30 20 39 20 |l killp |nil 0 9 |
|00000fe0| 66 6f 72 77 61 72 64 2d | 63 68 61 72 20 2d 31 20 |forward-|char -1 |
|00000ff0| 69 6e 73 65 72 74 2d 63 | 68 61 72 20 33 32 20 64 |insert-c|har 32 d|
|00001000| 65 6c 65 74 65 2d 63 68 | 61 72 20 31 20 64 65 6c |elete-ch|ar 1 del|
|00001010| 65 74 65 2d 62 61 63 6b | 77 61 72 64 2d 63 68 61 |ete-back|ward-cha|
|00001020| 72 5d 20 37 29 29 0a 0a | 28 64 65 66 75 6e 20 7a |r] 7))..|(defun z|
|00001030| 61 70 2d 74 6f 2d 63 68 | 61 72 20 28 61 72 67 20 |ap-to-ch|ar (arg |
|00001040| 63 68 61 72 29 20 22 5c | 0a 4b 69 6c 6c 20 75 70 |char) "\|.Kill up|
|00001050| 20 74 6f 20 28 62 75 74 | 20 6e 6f 74 20 69 6e 63 | to (but| not inc|
|00001060| 6c 75 64 69 6e 67 29 20 | 41 52 47 27 74 68 20 6f |luding) |ARG'th o|
|00001070| 63 63 75 72 72 65 6e 63 | 65 20 6f 66 20 43 48 41 |ccurrenc|e of CHA|
|00001080| 52 2e 0a 47 6f 65 73 20 | 62 61 63 6b 77 61 72 64 |R..Goes |backward|
|00001090| 20 69 66 20 41 52 47 20 | 69 73 20 6e 65 67 61 74 | if ARG |is negat|
|000010a0| 69 76 65 3b 20 67 6f 65 | 73 20 74 6f 20 65 6e 64 |ive; goe|s to end|
|000010b0| 20 6f 66 20 62 75 66 66 | 65 72 20 69 66 20 43 48 | of buff|er if CH|
|000010c0| 41 52 20 6e 6f 74 20 66 | 6f 75 6e 64 2e 22 20 28 |AR not f|ound." (|
|000010d0| 69 6e 74 65 72 61 63 74 | 69 76 65 20 22 2a 70 0a |interact|ive "*p.|
|000010e0| 63 5a 61 70 20 74 6f 20 | 63 68 61 72 3a 20 22 29 |cZap to |char: ")|
|000010f0| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c1 88 c4 | (byte-c|ode "...|
|00001100| 60 c5 c6 08 21 c1 c2 0b | 24 83 5c 22 00 0b c7 56 |`...!...|$.\"...V|
|00001110| 83 1a 00 60 53 82 1c 00 | 60 54 62 88 60 82 2d 00 |...`S...|`Tb.`.-.|
|00001120| 0b c7 56 83 2c 00 64 82 | 2d 00 65 5c 22 87 22 20 |..V.,.d.|-.e\"." |
|00001130| 5b 63 68 61 72 20 6e 69 | 6c 20 74 20 61 72 67 20 |[char ni|l t arg |
|00001140| 6b 69 6c 6c 2d 72 65 67 | 69 6f 6e 20 73 65 61 72 |kill-reg|ion sear|
|00001150| 63 68 2d 66 6f 72 77 61 | 72 64 20 63 68 61 72 2d |ch-forwa|rd char-|
|00001160| 74 6f 2d 73 74 72 69 6e | 67 20 30 5d 20 38 29 29 |to-strin|g 0] 8))|
|00001170| 0a 0a 28 64 65 66 75 6e | 20 62 65 67 69 6e 6e 69 |..(defun| beginni|
|00001180| 6e 67 2d 6f 66 2d 62 75 | 66 66 65 72 20 28 26 6f |ng-of-bu|ffer (&o|
|00001190| 70 74 69 6f 6e 61 6c 20 | 61 72 67 29 20 22 5c 0a |ptional |arg) "\.|
|000011a0| 4d 6f 76 65 20 70 6f 69 | 6e 74 20 74 6f 20 74 68 |Move poi|nt to th|
|000011b0| 65 20 62 65 67 69 6e 6e | 69 6e 67 20 6f 66 20 74 |e beginn|ing of t|
|000011c0| 68 65 20 62 75 66 66 65 | 72 3b 20 6c 65 61 76 65 |he buffe|r; leave|
|000011d0| 20 6d 61 72 6b 20 61 74 | 20 70 72 65 76 69 6f 75 | mark at| previou|
|000011e0| 73 20 70 6f 73 69 74 69 | 6f 6e 2e 0a 57 69 74 68 |s positi|on..With|
|000011f0| 20 61 72 67 20 4e 2c 20 | 70 75 74 20 70 6f 69 6e | arg N, |put poin|
|00001200| 74 20 4e 2f 31 30 20 6f | 66 20 74 68 65 20 77 61 |t N/10 o|f the wa|
|00001210| 79 20 66 72 6f 6d 20 74 | 68 65 20 74 72 75 65 20 |y from t|he true |
|00001220| 62 65 67 69 6e 6e 69 6e | 67 2e 0a 44 6f 6e 27 74 |beginnin|g..Don't|
|00001230| 20 75 73 65 20 74 68 69 | 73 20 69 6e 20 4c 69 73 | use thi|s in Lis|
|00001240| 70 20 70 72 6f 67 72 61 | 6d 73 21 0a 28 67 6f 74 |p progra|ms!.(got|
|00001250| 6f 2d 63 68 61 72 20 28 | 70 6f 69 6e 74 2d 6d 69 |o-char (|point-mi|
|00001260| 6e 29 29 20 69 73 20 66 | 61 73 74 65 72 20 61 6e |n)) is f|aster an|
|00001270| 64 20 64 6f 65 73 20 6e | 6f 74 20 73 65 74 20 74 |d does n|ot set t|
|00001280| 68 65 20 6d 61 72 6b 2e | 22 20 28 69 6e 74 65 72 |he mark.|" (inter|
|00001290| 61 63 74 69 76 65 20 22 | 50 22 29 20 28 62 79 74 |active "|P") (byt|
|000012a0| 65 2d 63 6f 64 65 20 22 | c1 88 c2 20 88 08 83 2c |e-code "|... ...,|
|000012b0| 00 c3 20 c4 56 83 1d 00 | c5 c6 08 21 c7 c3 20 c8 |.. .V...|...!.. .|
|000012c0| 5c 22 5c 22 82 29 00 c7 | c8 c5 c3 20 c6 08 21 5c |\"\".)..|... ..!\|
|000012d0| 22 5c 5c c8 5c 22 82 2d | 00 65 62 88 08 85 36 00 |"\\.\".-|.eb...6.|
|000012e0| c9 ca 21 87 22 20 5b 61 | 72 67 20 6e 69 6c 20 70 |..!." [a|rg nil p|
|000012f0| 75 73 68 2d 6d 61 72 6b | 20 62 75 66 66 65 72 2d |ush-mark| buffer-|
|00001300| 73 69 7a 65 20 31 30 30 | 30 30 20 2a 20 70 72 65 |size 100|00 * pre|
|00001310| 66 69 78 2d 6e 75 6d 65 | 72 69 63 2d 76 61 6c 75 |fix-nume|ric-valu|
|00001320| 65 20 2f 20 31 30 20 66 | 6f 72 77 61 72 64 2d 6c |e / 10 f|orward-l|
|00001330| 69 6e 65 20 31 5d 20 31 | 33 29 29 0a 0a 28 64 65 |ine 1] 1|3))..(de|
|00001340| 66 75 6e 20 65 6e 64 2d | 6f 66 2d 62 75 66 66 65 |fun end-|of-buffe|
|00001350| 72 20 28 26 6f 70 74 69 | 6f 6e 61 6c 20 61 72 67 |r (&opti|onal arg|
|00001360| 29 20 22 5c 0a 4d 6f 76 | 65 20 70 6f 69 6e 74 20 |) "\.Mov|e point |
|00001370| 74 6f 20 74 68 65 20 65 | 6e 64 20 6f 66 20 74 68 |to the e|nd of th|
|00001380| 65 20 62 75 66 66 65 72 | 3b 20 6c 65 61 76 65 20 |e buffer|; leave |
|00001390| 6d 61 72 6b 20 61 74 20 | 70 72 65 76 69 6f 75 73 |mark at |previous|
|000013a0| 20 70 6f 73 69 74 69 6f | 6e 2e 0a 57 69 74 68 20 | positio|n..With |
|000013b0| 61 72 67 20 4e 2c 20 70 | 75 74 20 70 6f 69 6e 74 |arg N, p|ut point|
|000013c0| 20 4e 2f 31 30 20 6f 66 | 20 74 68 65 20 77 61 79 | N/10 of| the way|
|000013d0| 20 66 72 6f 6d 20 74 68 | 65 20 74 72 75 65 20 65 | from th|e true e|
|000013e0| 6e 64 2e 0a 44 6f 6e 27 | 74 20 75 73 65 20 74 68 |nd..Don'|t use th|
|000013f0| 69 73 20 69 6e 20 4c 69 | 73 70 20 70 72 6f 67 72 |is in Li|sp progr|
|00001400| 61 6d 73 21 0a 28 67 6f | 74 6f 2d 63 68 61 72 20 |ams!.(go|to-char |
|00001410| 28 70 6f 69 6e 74 2d 6d | 61 78 29 29 20 69 73 20 |(point-m|ax)) is |
|00001420| 66 61 73 74 65 72 20 61 | 6e 64 20 64 6f 65 73 20 |faster a|nd does |
|00001430| 6e 6f 74 20 73 65 74 20 | 74 68 65 20 6d 61 72 6b |not set |the mark|
|00001440| 2e 22 20 28 69 6e 74 65 | 72 61 63 74 69 76 65 20 |." (inte|ractive |
|00001450| 22 50 22 29 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |"P") (by|te-code |
|00001460| 22 c1 88 c2 20 88 08 83 | 2e 00 c3 20 54 c3 20 c4 |"... ...|... T. .|
|00001470| 56 83 20 00 c5 c6 08 21 | c7 c3 20 c8 5c 22 5c 22 |V. ....!|.. .\"\"|
|00001480| 82 2a 00 c7 c5 c3 20 c6 | 08 21 5c 22 c8 5c 22 5a |.*.... .|.!\".\"Z|
|00001490| 82 2f 00 64 62 88 08 85 | 38 00 c9 ca 21 87 22 20 |./.db...|8...!." |
|000014a0| 5b 61 72 67 20 6e 69 6c | 20 70 75 73 68 2d 6d 61 |[arg nil| push-ma|
|000014b0| 72 6b 20 62 75 66 66 65 | 72 2d 73 69 7a 65 20 31 |rk buffe|r-size 1|
|000014c0| 30 30 30 30 20 2a 20 70 | 72 65 66 69 78 2d 6e 75 |0000 * p|refix-nu|
|000014d0| 6d 65 72 69 63 2d 76 61 | 6c 75 65 20 2f 20 31 30 |meric-va|lue / 10|
|000014e0| 20 66 6f 72 77 61 72 64 | 2d 6c 69 6e 65 20 31 5d | forward|-line 1]|
|000014f0| 20 31 34 29 29 0a 0a 28 | 64 65 66 75 6e 20 6d 61 | 14))..(|defun ma|
|00001500| 72 6b 2d 77 68 6f 6c 65 | 2d 62 75 66 66 65 72 20 |rk-whole|-buffer |
|00001510| 6e 69 6c 20 22 5c 0a 50 | 75 74 20 70 6f 69 6e 74 |nil "\.P|ut point|
|00001520| 20 61 74 20 62 65 67 69 | 6e 6e 69 6e 67 20 61 6e | at begi|nning an|
|00001530| 64 20 6d 61 72 6b 20 61 | 74 20 65 6e 64 20 6f 66 |d mark a|t end of|
|00001540| 20 62 75 66 66 65 72 2e | 22 20 28 69 6e 74 65 72 | buffer.|" (inter|
|00001550| 61 63 74 69 76 65 29 20 | 28 62 79 74 65 2d 63 6f |active) |(byte-co|
|00001560| 64 65 20 22 c0 88 c1 60 | 21 88 c1 64 21 88 65 62 |de "...`|!..d!.eb|
|00001570| 87 22 20 5b 6e 69 6c 20 | 70 75 73 68 2d 6d 61 72 |." [nil |push-mar|
|00001580| 6b 5d 20 33 29 29 0a 0a | 28 64 65 66 75 6e 20 63 |k] 3))..|(defun c|
|00001590| 6f 75 6e 74 2d 6c 69 6e | 65 73 2d 72 65 67 69 6f |ount-lin|es-regio|
|000015a0| 6e 20 28 73 74 61 72 74 | 20 65 6e 64 29 20 22 5c |n (start| end) "\|
|000015b0| 0a 50 72 69 6e 74 20 6e | 75 6d 62 65 72 20 6f 66 |.Print n|umber of|
|000015c0| 20 6c 69 6e 65 73 20 69 | 6e 20 74 68 65 20 72 65 | lines i|n the re|
|000015d0| 67 69 6f 6e 2e 22 20 28 | 69 6e 74 65 72 61 63 74 |gion." (|interact|
|000015e0| 69 76 65 20 22 72 22 29 | 20 28 62 79 74 65 2d 63 |ive "r")| (byte-c|
|000015f0| 6f 64 65 20 22 c2 88 c3 | c4 c5 08 09 5c 22 5c 22 |ode "...|....\"\"|
|00001600| 87 22 20 5b 73 74 61 72 | 74 20 65 6e 64 20 6e 69 |." [star|t end ni|
|00001610| 6c 20 6d 65 73 73 61 67 | 65 20 22 52 65 67 69 6f |l messag|e "Regio|
|00001620| 6e 20 68 61 73 20 25 64 | 20 6c 69 6e 65 73 22 20 |n has %d| lines" |
|00001630| 63 6f 75 6e 74 2d 6c 69 | 6e 65 73 5d 20 35 29 29 |count-li|nes] 5))|
|00001640| 0a 0a 28 64 65 66 75 6e | 20 77 68 61 74 2d 6c 69 |..(defun| what-li|
|00001650| 6e 65 20 6e 69 6c 20 22 | 5c 0a 50 72 69 6e 74 20 |ne nil "|\.Print |
|00001660| 74 68 65 20 63 75 72 72 | 65 6e 74 20 6c 69 6e 65 |the curr|ent line|
|00001670| 20 6e 75 6d 62 65 72 20 | 28 69 6e 20 74 68 65 20 | number |(in the |
|00001680| 62 75 66 66 65 72 29 20 | 6f 66 20 70 6f 69 6e 74 |buffer) |of point|
|00001690| 2e 22 20 28 69 6e 74 65 | 72 61 63 74 69 76 65 29 |." (inte|ractive)|
|000016a0| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c0 88 8c | (byte-c|ode "...|
|000016b0| c1 20 88 8a c2 20 88 c3 | c4 c5 c6 60 5c 22 54 5c |. ... ..|...`\"T\|
|000016c0| 22 29 29 87 22 20 5b 6e | 69 6c 20 77 69 64 65 6e |"))." [n|il widen|
|000016d0| 20 62 65 67 69 6e 6e 69 | 6e 67 2d 6f 66 2d 6c 69 | beginni|ng-of-li|
|000016e0| 6e 65 20 6d 65 73 73 61 | 67 65 20 22 4c 69 6e 65 |ne messa|ge "Line|
|000016f0| 20 25 64 22 20 63 6f 75 | 6e 74 2d 6c 69 6e 65 73 | %d" cou|nt-lines|
|00001700| 20 31 5d 20 37 29 29 0a | 0a 28 64 65 66 75 6e 20 | 1] 7)).|.(defun |
|00001710| 63 6f 75 6e 74 2d 6c 69 | 6e 65 73 20 28 73 74 61 |count-li|nes (sta|
|00001720| 72 74 20 65 6e 64 29 20 | 22 5c 0a 52 65 74 75 72 |rt end) |"\.Retur|
|00001730| 6e 20 6e 75 6d 62 65 72 | 20 6f 66 20 6e 65 77 6c |n number| of newl|
|00001740| 69 6e 65 73 20 62 65 74 | 77 65 65 6e 20 53 54 41 |ines bet|ween STA|
|00001750| 52 54 20 61 6e 64 20 45 | 4e 44 2e 22 20 28 62 79 |RT and E|ND." (by|
|00001760| 74 65 2d 63 6f 64 65 20 | 22 8a 8c c2 08 09 5c 22 |te-code |".....\"|
|00001770| 88 65 62 88 c3 20 c4 c3 | 20 21 5a 29 29 87 22 20 |.eb.. ..| !Z))." |
|00001780| 5b 73 74 61 72 74 20 65 | 6e 64 20 6e 61 72 72 6f |[start e|nd narro|
|00001790| 77 2d 74 6f 2d 72 65 67 | 69 6f 6e 20 62 75 66 66 |w-to-reg|ion buff|
|000017a0| 65 72 2d 73 69 7a 65 20 | 66 6f 72 77 61 72 64 2d |er-size |forward-|
|000017b0| 6c 69 6e 65 5d 20 36 29 | 29 0a 0a 28 64 65 66 75 |line] 6)|)..(defu|
|000017c0| 6e 20 77 68 61 74 2d 63 | 75 72 73 6f 72 2d 70 6f |n what-c|ursor-po|
|000017d0| 73 69 74 69 6f 6e 20 6e | 69 6c 20 22 5c 0a 50 72 |sition n|il "\.Pr|
|000017e0| 69 6e 74 20 69 6e 66 6f | 20 6f 6e 20 63 75 72 73 |int info| on curs|
|000017f0| 6f 72 20 70 6f 73 69 74 | 69 6f 6e 20 28 6f 6e 20 |or posit|ion (on |
|00001800| 73 63 72 65 65 6e 20 61 | 6e 64 20 77 69 74 68 69 |screen a|nd withi|
|00001810| 6e 20 62 75 66 66 65 72 | 29 2e 22 20 28 69 6e 74 |n buffer|)." (int|
|00001820| 65 72 61 63 74 69 76 65 | 29 20 28 62 79 74 65 2d |eractive|) (byte-|
|00001830| 63 6f 64 65 20 22 c8 88 | 67 18 65 19 64 1a 60 1b |code "..|g.e.d.`.|
|00001840| c9 20 1c 0c ca 56 83 25 | 00 cb cb 0c cc 5c 22 0b |. ...V.%|.....\".|
|00001850| 53 5c 5c cb 0c cd 5c 22 | ce 5d 5c 22 82 34 00 cb |S\\...\"|.]\".4..|
|00001860| cb 0c cf 5c 22 d0 cd 0b | 53 5c 22 5c 5c 0c ce 5d |...\"...|S\"\\..]|
|00001870| 5c 22 1d d1 20 d2 55 83 | 40 00 d3 82 45 00 d4 d5 |\".. .U.|@...E...|
|00001880| d1 20 5c 22 1e 06 69 1e | 07 0b 0a 55 83 7d 00 d6 |. \"..i.|...U.}..|
|00001890| 09 ce 5c 22 86 5c 5c 00 | d6 0a 0c 54 5c 22 83 6f |..\".\\.|...T\".o|
|000018a0| 00 d7 d8 0b 0c 0d 09 0a | 0e 07 0e 06 26 08 82 7a |........|....&..z|
|000018b0| 00 d7 d9 0b 0c 0d 0e 07 | 0e 06 26 06 82 af 00 d6 |........|..&.....|
|000018c0| 09 ce 5c 22 86 89 00 d6 | 0a 0c 54 5c 22 83 a0 00 |..\"....|..T\"...|
|000018d0| d7 da db 08 21 08 0b 0c | 0d 09 0a 0e 07 0e 06 26 |....!...|.......&|
|000018e0| 0a 82 af 00 d7 dc db 08 | 21 08 0b 0c 0d 0e 07 0e |........|!.......|
|000018f0| 06 26 08 2e 08 87 22 20 | 5b 63 68 61 72 20 62 65 |.&...." |[char be|
|00001900| 67 20 65 6e 64 20 70 6f | 73 20 74 6f 74 61 6c 20 |g end po|s total |
|00001910| 70 65 72 63 65 6e 74 20 | 68 73 63 72 6f 6c 6c 20 |percent |hscroll |
|00001920| 63 6f 6c 20 6e 69 6c 20 | 62 75 66 66 65 72 2d 73 |col nil |buffer-s|
|00001930| 69 7a 65 20 35 30 30 30 | 30 20 2f 20 32 30 30 20 |ize 5000|0 / 200 |
|00001940| 31 30 30 20 31 20 32 20 | 2a 20 77 69 6e 64 6f 77 |100 1 2 |* window|
|00001950| 2d 68 73 63 72 6f 6c 6c | 20 30 20 22 22 20 66 6f |-hscroll| 0 "" fo|
|00001960| 72 6d 61 74 20 22 20 48 | 73 63 72 6f 6c 6c 3d 25 |rmat " H|scroll=%|
|00001970| 64 22 20 2f 3d 20 6d 65 | 73 73 61 67 65 20 22 70 |d" /= me|ssage "p|
|00001980| 6f 69 6e 74 3d 25 64 20 | 6f 66 20 25 64 28 25 64 |oint=%d |of %d(%d|
|00001990| 25 25 29 20 3c 25 64 20 | 2d 20 25 64 3e 20 20 63 |%%) <%d |- %d> c|
|000019a0| 6f 6c 75 6d 6e 20 25 64 | 20 25 73 22 20 22 70 6f |olumn %d| %s" "po|
|000019b0| 69 6e 74 3d 25 64 20 6f | 66 20 25 64 28 25 64 25 |int=%d o|f %d(%d%|
|000019c0| 25 29 20 20 63 6f 6c 75 | 6d 6e 20 25 64 20 25 73 |%) colu|mn %d %s|
|000019d0| 22 20 22 43 68 61 72 3a | 20 25 73 20 28 30 25 6f |" "Char:| %s (0%o|
|000019e0| 29 20 20 70 6f 69 6e 74 | 3d 25 64 20 6f 66 20 25 |) point|=%d of %|
|000019f0| 64 28 25 64 25 25 29 20 | 3c 25 64 20 2d 20 25 64 |d(%d%%) |<%d - %d|
|00001a00| 3e 20 20 63 6f 6c 75 6d | 6e 20 25 64 20 25 73 22 |> colum|n %d %s"|
|00001a10| 20 73 69 6e 67 6c 65 2d | 6b 65 79 2d 64 65 73 63 | single-|key-desc|
|00001a20| 72 69 70 74 69 6f 6e 20 | 22 43 68 61 72 3a 20 25 |ription |"Char: %|
|00001a30| 73 20 28 30 25 6f 29 20 | 20 70 6f 69 6e 74 3d 25 |s (0%o) | point=%|
|00001a40| 64 20 6f 66 20 25 64 28 | 25 64 25 25 29 20 20 63 |d of %d(|%d%%) c|
|00001a50| 6f 6c 75 6d 6e 20 25 64 | 20 25 73 22 5d 20 32 38 |olumn %d| %s"] 28|
|00001a60| 29 29 0a 0a 28 64 65 66 | 75 6e 20 66 75 6e 64 61 |))..(def|un funda|
|00001a70| 6d 65 6e 74 61 6c 2d 6d | 6f 64 65 20 6e 69 6c 20 |mental-m|ode nil |
|00001a80| 22 5c 0a 4d 61 6a 6f 72 | 20 6d 6f 64 65 20 6e 6f |"\.Major| mode no|
|00001a90| 74 20 73 70 65 63 69 61 | 6c 69 7a 65 64 20 66 6f |t specia|lized fo|
|00001aa0| 72 20 61 6e 79 74 68 69 | 6e 67 20 69 6e 20 70 61 |r anythi|ng in pa|
|00001ab0| 72 74 69 63 75 6c 61 72 | 2e 0a 4f 74 68 65 72 20 |rticular|..Other |
|00001ac0| 6d 61 6a 6f 72 20 6d 6f | 64 65 73 20 61 72 65 20 |major mo|des are |
|00001ad0| 64 65 66 69 6e 65 64 20 | 62 79 20 63 6f 6d 70 61 |defined |by compa|
|00001ae0| 72 69 73 6f 6e 20 77 69 | 74 68 20 74 68 69 73 20 |rison wi|th this |
|00001af0| 6f 6e 65 2e 22 20 28 69 | 6e 74 65 72 61 63 74 69 |one." (i|nteracti|
|00001b00| 76 65 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |ve) (byt|e-code "|
|00001b10| c0 88 c1 20 87 22 20 5b | 6e 69 6c 20 6b 69 6c 6c |... ." [|nil kill|
|00001b20| 2d 61 6c 6c 2d 6c 6f 63 | 61 6c 2d 76 61 72 69 61 |-all-loc|al-varia|
|00001b30| 62 6c 65 73 5d 20 32 29 | 29 0a 0a 28 70 75 74 20 |bles] 2)|)..(put |
|00001b40| 28 71 75 6f 74 65 20 65 | 76 61 6c 2d 65 78 70 72 |(quote e|val-expr|
|00001b50| 65 73 73 69 6f 6e 29 20 | 28 71 75 6f 74 65 20 64 |ession) |(quote d|
|00001b60| 69 73 61 62 6c 65 64 29 | 20 74 29 0a 0a 28 64 65 |isabled)| t)..(de|
|00001b70| 66 75 6e 20 65 76 61 6c | 2d 65 78 70 72 65 73 73 |fun eval|-express|
|00001b80| 69 6f 6e 20 28 65 78 70 | 72 65 73 73 69 6f 6e 29 |ion (exp|ression)|
|00001b90| 20 22 5c 0a 45 76 61 6c | 75 61 74 65 20 45 58 50 | "\.Eval|uate EXP|
|00001ba0| 52 45 53 53 49 4f 4e 20 | 61 6e 64 20 70 72 69 6e |RESSION |and prin|
|00001bb0| 74 20 76 61 6c 75 65 20 | 69 6e 20 6d 69 6e 69 62 |t value |in minib|
|00001bc0| 75 66 66 65 72 2e 0a 56 | 61 6c 75 65 20 69 73 20 |uffer..V|alue is |
|00001bd0| 61 6c 73 6f 20 63 6f 6e | 73 65 64 20 6f 6e 20 74 |also con|sed on t|
|00001be0| 6f 20 66 72 6f 6e 74 20 | 6f 66 20 76 61 72 69 61 |o front |of varia|
|00001bf0| 62 6c 65 20 20 76 61 6c | 75 65 73 20 20 27 73 20 |ble val|ues 's |
|00001c00| 76 61 6c 75 65 2e 22 20 | 28 69 6e 74 65 72 61 63 |value." |(interac|
|00001c10| 74 69 76 65 20 22 78 45 | 76 61 6c 3a 20 22 29 20 |tive "xE|val: ") |
|00001c20| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c3 88 c4 09 |(byte-co|de "....|
|00001c30| 21 08 42 89 10 88 c5 08 | 40 c2 5c 22 87 22 20 5b |!.B.....|@.\"." [|
|00001c40| 76 61 6c 75 65 73 20 65 | 78 70 72 65 73 73 69 6f |values e|xpressio|
|00001c50| 6e 20 74 20 6e 69 6c 20 | 65 76 61 6c 20 70 72 69 |n t nil |eval pri|
|00001c60| 6e 31 5d 20 34 29 29 0a | 0a 28 64 65 66 75 6e 20 |n1] 4)).|.(defun |
|00001c70| 65 64 69 74 2d 61 6e 64 | 2d 65 76 61 6c 2d 63 6f |edit-and|-eval-co|
|00001c80| 6d 6d 61 6e 64 20 28 70 | 72 6f 6d 70 74 20 63 6f |mmand (p|rompt co|
|00001c90| 6d 6d 61 6e 64 29 20 22 | 5c 0a 50 72 6f 6d 70 74 |mmand) "|\.Prompt|
|00001ca0| 69 6e 67 20 77 69 74 68 | 20 50 52 4f 4d 50 54 2c |ing with| PROMPT,|
|00001cb0| 20 6c 65 74 20 75 73 65 | 72 20 65 64 69 74 20 43 | let use|r edit C|
|00001cc0| 4f 4d 4d 41 4e 44 20 61 | 6e 64 20 65 76 61 6c 20 |OMMAND a|nd eval |
|00001cd0| 72 65 73 75 6c 74 2e 0a | 43 4f 4d 4d 41 4e 44 20 |result..|COMMAND |
|00001ce0| 69 73 20 61 20 4c 69 73 | 70 20 65 78 70 72 65 73 |is a Lis|p expres|
|00001cf0| 73 69 6f 6e 2e 20 20 4c | 65 74 20 75 73 65 72 20 |sion. L|et user |
|00001d00| 65 64 69 74 20 74 68 61 | 74 20 65 78 70 72 65 73 |edit tha|t expres|
|00001d10| 73 69 6f 6e 20 69 6e 0a | 74 68 65 20 6d 69 6e 69 |sion in.|the mini|
|00001d20| 62 75 66 66 65 72 2c 20 | 74 68 65 6e 20 72 65 61 |buffer, |then rea|
|00001d30| 64 20 61 6e 64 20 65 76 | 61 6c 75 61 74 65 20 74 |d and ev|aluate t|
|00001d40| 68 65 20 72 65 73 75 6c | 74 2e 22 20 28 62 79 74 |he resul|t." (byt|
|00001d50| 65 2d 63 6f 64 65 20 22 | c2 c3 08 c4 09 21 5c 22 |e-code "|.....!\"|
|00001d60| 21 87 22 20 5b 70 72 6f | 6d 70 74 20 63 6f 6d 6d |!." [pro|mpt comm|
|00001d70| 61 6e 64 20 65 76 61 6c | 20 72 65 61 64 2d 6d 69 |and eval| read-mi|
|00001d80| 6e 69 62 75 66 66 65 72 | 20 70 72 69 6e 31 2d 74 |nibuffer| prin1-t|
|00001d90| 6f 2d 73 74 72 69 6e 67 | 5d 20 35 29 29 0a 0a 28 |o-string|] 5))..(|
|00001da0| 64 65 66 76 61 72 20 72 | 65 70 65 61 74 2d 63 6f |defvar r|epeat-co|
|00001db0| 6d 70 6c 65 78 2d 63 6f | 6d 6d 61 6e 64 2d 6d 61 |mplex-co|mmand-ma|
|00001dc0| 70 20 28 63 6f 70 79 2d | 61 6c 69 73 74 20 6d 69 |p (copy-|alist mi|
|00001dd0| 6e 69 62 75 66 66 65 72 | 2d 6c 6f 63 61 6c 2d 6d |nibuffer|-local-m|
|00001de0| 61 70 29 29 0a 0a 28 64 | 65 66 69 6e 65 2d 6b 65 |ap))..(d|efine-ke|
|00001df0| 79 20 72 65 70 65 61 74 | 2d 63 6f 6d 70 6c 65 78 |y repeat|-complex|
|00001e00| 2d 63 6f 6d 6d 61 6e 64 | 2d 6d 61 70 20 22 1b 70 |-command|-map ".p|
|00001e10| 22 20 28 71 75 6f 74 65 | 20 70 72 65 76 69 6f 75 |" (quote| previou|
|00001e20| 73 2d 63 6f 6d 70 6c 65 | 78 2d 63 6f 6d 6d 61 6e |s-comple|x-comman|
|00001e30| 64 29 29 0a 0a 28 64 65 | 66 69 6e 65 2d 6b 65 79 |d))..(de|fine-key|
|00001e40| 20 72 65 70 65 61 74 2d | 63 6f 6d 70 6c 65 78 2d | repeat-|complex-|
|00001e50| 63 6f 6d 6d 61 6e 64 2d | 6d 61 70 20 22 1b 6e 22 |command-|map ".n"|
|00001e60| 20 28 71 75 6f 74 65 20 | 6e 65 78 74 2d 63 6f 6d | (quote |next-com|
|00001e70| 70 6c 65 78 2d 63 6f 6d | 6d 61 6e 64 29 29 0a 0a |plex-com|mand))..|
|00001e80| 28 64 65 66 75 6e 20 72 | 65 70 65 61 74 2d 63 6f |(defun r|epeat-co|
|00001e90| 6d 70 6c 65 78 2d 63 6f | 6d 6d 61 6e 64 20 28 72 |mplex-co|mmand (r|
|00001ea0| 65 70 65 61 74 2d 63 6f | 6d 70 6c 65 78 2d 63 6f |epeat-co|mplex-co|
|00001eb0| 6d 6d 61 6e 64 2d 61 72 | 67 29 20 22 5c 0a 45 64 |mmand-ar|g) "\.Ed|
|00001ec0| 69 74 20 61 6e 64 20 72 | 65 2d 65 76 61 6c 75 61 |it and r|e-evalua|
|00001ed0| 74 65 20 6c 61 73 74 20 | 63 6f 6d 70 6c 65 78 20 |te last |complex |
|00001ee0| 63 6f 6d 6d 61 6e 64 2c | 20 6f 72 20 41 52 47 74 |command,| or ARGt|
|00001ef0| 68 20 66 72 6f 6d 20 6c | 61 73 74 2e 0a 41 20 63 |h from l|ast..A c|
|00001f00| 6f 6d 70 6c 65 78 20 63 | 6f 6d 6d 61 6e 64 20 69 |omplex c|ommand i|
|00001f10| 73 20 6f 6e 65 20 77 68 | 69 63 68 20 75 73 65 64 |s one wh|ich used|
|00001f20| 20 74 68 65 20 6d 69 6e | 69 62 75 66 66 65 72 2e | the min|ibuffer.|
|00001f30| 0a 54 68 65 20 63 6f 6d | 6d 61 6e 64 20 69 73 20 |.The com|mand is |
|00001f40| 70 6c 61 63 65 64 20 69 | 6e 20 74 68 65 20 6d 69 |placed i|n the mi|
|00001f50| 6e 69 62 75 66 66 65 72 | 20 61 73 20 61 20 4c 69 |nibuffer| as a Li|
|00001f60| 73 70 20 66 6f 72 6d 20 | 66 6f 72 20 65 64 69 74 |sp form |for edit|
|00001f70| 69 6e 67 2e 0a 54 68 65 | 20 72 65 73 75 6c 74 20 |ing..The| result |
|00001f80| 69 73 20 65 78 65 63 75 | 74 65 64 2c 20 72 65 70 |is execu|ted, rep|
|00001f90| 65 61 74 69 6e 67 20 74 | 68 65 20 63 6f 6d 6d 61 |eating t|he comma|
|00001fa0| 6e 64 20 61 73 20 63 68 | 61 6e 67 65 64 2e 0a 49 |nd as ch|anged..I|
|00001fb0| 66 20 74 68 65 20 63 6f | 6d 6d 61 6e 64 20 68 61 |f the co|mmand ha|
|00001fc0| 73 20 62 65 65 6e 20 63 | 68 61 6e 67 65 64 20 6f |s been c|hanged o|
|00001fd0| 72 20 69 73 20 6e 6f 74 | 20 74 68 65 20 6d 6f 73 |r is not| the mos|
|00001fe0| 74 20 72 65 63 65 6e 74 | 20 70 72 65 76 69 6f 75 |t recent| previou|
|00001ff0| 73 20 63 6f 6d 6d 61 6e | 64 0a 69 74 20 69 73 20 |s comman|d.it is |
|00002000| 61 64 64 65 64 20 74 6f | 20 74 68 65 20 66 72 6f |added to| the fro|
|00002010| 6e 74 20 6f 66 20 74 68 | 65 20 63 6f 6d 6d 61 6e |nt of th|e comman|
|00002020| 64 20 68 69 73 74 6f 72 | 79 2e 0a 57 68 69 6c 73 |d histor|y..Whils|
|00002030| 74 20 65 64 69 74 69 6e | 67 20 74 68 65 20 63 6f |t editin|g the co|
|00002040| 6d 6d 61 6e 64 2c 20 74 | 68 65 20 66 6f 6c 6c 6f |mmand, t|he follo|
|00002050| 77 69 6e 67 20 63 6f 6d | 6d 61 6e 64 73 20 61 72 |wing com|mands ar|
|00002060| 65 20 61 76 61 69 6c 61 | 62 6c 65 3a 0a 5c 5c 7b |e availa|ble:.\\{|
|00002070| 72 65 70 65 61 74 2d 63 | 6f 6d 70 6c 65 78 2d 63 |repeat-c|omplex-c|
|00002080| 6f 6d 6d 61 6e 64 2d 6d | 61 70 7d 22 20 28 69 6e |ommand-m|ap}" (in|
|00002090| 74 65 72 61 63 74 69 76 | 65 20 22 70 22 29 20 28 |teractiv|e "p") (|
|000020a0| 62 79 74 65 2d 63 6f 64 | 65 20 22 c6 88 09 53 0a |byte-cod|e "...S.|
|000020b0| 38 c6 1b 18 08 83 2c 00 | c7 c8 c9 08 21 0c c5 24 |8.....,.|....!..$|
|000020c0| 89 13 88 ca 0b 0a 40 5c | 22 86 25 00 0b 0a 42 89 |......@\|".%...B.|
|000020d0| 12 88 cb 0b 21 82 2e 00 | cc 20 2a 87 22 20 5b 65 |....!...|. *." [e|
|000020e0| 6c 74 20 72 65 70 65 61 | 74 2d 63 6f 6d 70 6c 65 |lt repea|t-comple|
|000020f0| 78 2d 63 6f 6d 6d 61 6e | 64 2d 61 72 67 20 63 6f |x-comman|d-arg co|
|00002100| 6d 6d 61 6e 64 2d 68 69 | 73 74 6f 72 79 20 6e 65 |mmand-hi|story ne|
|00002110| 77 63 6d 64 20 72 65 70 | 65 61 74 2d 63 6f 6d 70 |wcmd rep|eat-comp|
|00002120| 6c 65 78 2d 63 6f 6d 6d | 61 6e 64 2d 6d 61 70 20 |lex-comm|and-map |
|00002130| 74 20 6e 69 6c 20 72 65 | 61 64 2d 66 72 6f 6d 2d |t nil re|ad-from-|
|00002140| 6d 69 6e 69 62 75 66 66 | 65 72 20 22 52 65 64 6f |minibuff|er "Redo|
|00002150| 3a 20 22 20 70 72 69 6e | 31 2d 74 6f 2d 73 74 72 |: " prin|1-to-str|
|00002160| 69 6e 67 20 65 71 75 61 | 6c 20 65 76 61 6c 20 64 |ing equa|l eval d|
|00002170| 69 6e 67 5d 20 36 29 29 | 0a 0a 28 64 65 66 75 6e |ing] 6))|..(defun|
|00002180| 20 6e 65 78 74 2d 63 6f | 6d 70 6c 65 78 2d 63 6f | next-co|mplex-co|
|00002190| 6d 6d 61 6e 64 20 28 6e | 29 20 22 5c 0a 49 6e 73 |mmand (n|) "\.Ins|
|000021a0| 65 72 74 73 20 74 68 65 | 20 6e 65 78 74 20 65 6c |erts the| next el|
|000021b0| 65 6d 65 6e 74 20 6f 66 | 20 60 63 6f 6d 6d 61 6e |ement of| `comman|
|000021c0| 64 2d 68 69 73 74 6f 72 | 79 27 20 69 6e 74 6f 20 |d-histor|y' into |
|000021d0| 74 68 65 20 6d 69 6e 69 | 62 75 66 66 65 72 2e 22 |the mini|buffer."|
|000021e0| 20 28 69 6e 74 65 72 61 | 63 74 69 76 65 20 22 70 | (intera|ctive "p|
|000021f0| 22 29 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 c4 |") (byte|-code ".|
|00002200| 88 c5 09 0a 5a 5d 0b 47 | 5e 18 09 08 55 83 21 00 |....Z].G|^...U.!.|
|00002210| c6 09 c5 55 83 1c 00 c7 | 82 1d 00 c8 21 82 32 00 |...U....|....!.2.|
|00002220| c9 20 88 08 89 11 88 ca | 09 53 0b 38 21 63 88 65 |. ......|.S.8!c.e|
|00002230| 62 29 87 22 20 5b 6e 61 | 72 67 20 72 65 70 65 61 |b)." [na|rg repea|
|00002240| 74 2d 63 6f 6d 70 6c 65 | 78 2d 63 6f 6d 6d 61 6e |t-comple|x-comman|
|00002250| 64 2d 61 72 67 20 6e 20 | 63 6f 6d 6d 61 6e 64 2d |d-arg n |command-|
|00002260| 68 69 73 74 6f 72 79 20 | 6e 69 6c 20 31 20 65 72 |history |nil 1 er|
|00002270| 72 6f 72 20 22 4e 6f 20 | 66 6f 6c 6c 6f 77 69 6e |ror "No |followin|
|00002280| 67 20 69 74 65 6d 20 69 | 6e 20 63 6f 6d 6d 61 6e |g item i|n comman|
|00002290| 64 20 68 69 73 74 6f 72 | 79 22 20 22 4e 6f 20 70 |d histor|y" "No p|
|000022a0| 72 65 63 65 65 64 69 6e | 67 20 69 74 65 6d 20 63 |receedin|g item c|
|000022b0| 6f 6d 6d 61 6e 64 20 68 | 69 73 74 6f 72 79 22 20 |ommand h|istory" |
|000022c0| 65 72 61 73 65 2d 62 75 | 66 66 65 72 20 70 72 69 |erase-bu|ffer pri|
|000022d0| 6e 31 2d 74 6f 2d 73 74 | 72 69 6e 67 5d 20 35 29 |n1-to-st|ring] 5)|
|000022e0| 29 0a 0a 28 64 65 66 75 | 6e 20 70 72 65 76 69 6f |)..(defu|n previo|
|000022f0| 75 73 2d 63 6f 6d 70 6c | 65 78 2d 63 6f 6d 6d 61 |us-compl|ex-comma|
|00002300| 6e 64 20 28 6e 29 20 22 | 5c 0a 49 6e 73 65 72 74 |nd (n) "|\.Insert|
|00002310| 73 20 74 68 65 20 70 72 | 65 76 69 6f 75 73 20 65 |s the pr|evious e|
|00002320| 6c 65 6d 65 6e 74 20 6f | 66 20 60 63 6f 6d 6d 61 |lement o|f `comma|
|00002330| 6e 64 2d 68 69 73 74 6f | 72 79 27 20 69 6e 74 6f |nd-histo|ry' into|
|00002340| 20 74 68 65 20 6d 69 6e | 69 62 75 66 66 65 72 2e | the min|ibuffer.|
|00002350| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 20 22 |" (inter|active "|
|00002360| 70 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |p") (byt|e-code "|
|00002370| c1 88 c2 08 5b 21 87 22 | 20 5b 6e 20 6e 69 6c 20 |....[!."| [n nil |
|00002380| 6e 65 78 74 2d 63 6f 6d | 70 6c 65 78 2d 63 6f 6d |next-com|plex-com|
|00002390| 6d 61 6e 64 5d 20 32 29 | 29 0a 0a 28 64 65 66 75 |mand] 2)|)..(defu|
|000023a0| 6e 20 67 6f 74 6f 2d 6c | 69 6e 65 20 28 61 72 67 |n goto-l|ine (arg|
|000023b0| 29 20 22 5c 0a 47 6f 74 | 6f 20 6c 69 6e 65 20 41 |) "\.Got|o line A|
|000023c0| 52 47 2c 20 63 6f 75 6e | 74 69 6e 67 20 66 72 6f |RG, coun|ting fro|
|000023d0| 6d 20 6c 69 6e 65 20 31 | 20 61 74 20 62 65 67 69 |m line 1| at begi|
|000023e0| 6e 6e 69 6e 67 20 6f 66 | 20 62 75 66 66 65 72 2e |nning of| buffer.|
|000023f0| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 20 22 |" (inter|active "|
|00002400| 4e 47 6f 74 6f 20 6c 69 | 6e 65 3a 20 22 29 20 28 |NGoto li|ne: ") (|
|00002410| 62 79 74 65 2d 63 6f 64 | 65 20 22 c2 88 8c c4 20 |byte-cod|e ".... |
|00002420| 88 c5 62 88 08 c1 3d 83 | 19 00 c6 c7 c2 c8 0b 53 |..b...=.|.......S|
|00002430| 24 82 1d 00 c9 0b 53 21 | 29 87 22 20 5b 73 65 6c |$.....S!|)." [sel|
|00002440| 65 63 74 69 76 65 2d 64 | 69 73 70 6c 61 79 20 74 |ective-d|isplay t|
|00002450| 20 6e 69 6c 20 61 72 67 | 20 77 69 64 65 6e 20 31 | nil arg| widen 1|
|00002460| 20 72 65 2d 73 65 61 72 | 63 68 2d 66 6f 72 77 61 | re-sear|ch-forwa|
|00002470| 72 64 20 22 5b 0a 0d 5d | 22 20 65 6e 64 20 66 6f |rd "[..]|" end fo|
|00002480| 72 77 61 72 64 2d 6c 69 | 6e 65 5d 20 36 29 29 0a |rward-li|ne] 6)).|
|00002490| 0a 28 66 73 65 74 20 28 | 71 75 6f 74 65 20 61 64 |.(fset (|quote ad|
|000024a0| 76 65 72 74 69 73 65 64 | 2d 75 6e 64 6f 29 20 28 |vertised|-undo) (|
|000024b0| 71 75 6f 74 65 20 75 6e | 64 6f 29 29 0a 0a 28 64 |quote un|do))..(d|
|000024c0| 65 66 75 6e 20 75 6e 64 | 6f 20 28 26 6f 70 74 69 |efun und|o (&opti|
|000024d0| 6f 6e 61 6c 20 61 72 67 | 29 20 22 5c 0a 55 6e 64 |onal arg|) "\.Und|
|000024e0| 6f 20 73 6f 6d 65 20 70 | 72 65 76 69 6f 75 73 20 |o some p|revious |
|000024f0| 63 68 61 6e 67 65 73 2e | 0a 52 65 70 65 61 74 20 |changes.|.Repeat |
|00002500| 74 68 69 73 20 63 6f 6d | 6d 61 6e 64 20 74 6f 20 |this com|mand to |
|00002510| 75 6e 64 6f 20 6d 6f 72 | 65 20 63 68 61 6e 67 65 |undo mor|e change|
|00002520| 73 2e 0a 41 20 6e 75 6d | 65 72 69 63 20 61 72 67 |s..A num|eric arg|
|00002530| 75 6d 65 6e 74 20 73 65 | 72 76 65 73 20 61 73 20 |ument se|rves as |
|00002540| 61 20 72 65 70 65 61 74 | 20 63 6f 75 6e 74 2e 22 |a repeat| count."|
|00002550| 20 28 69 6e 74 65 72 61 | 63 74 69 76 65 20 22 2a | (intera|ctive "*|
|00002560| 70 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |p") (byt|e-code "|
|00002570| c4 88 c5 20 18 c6 20 c7 | 20 3d 86 10 00 c8 c9 21 |... .. .| =.....!|
|00002580| 88 09 ca 3d 86 1d 00 cb | 20 88 cc cd 21 88 ca 89 |...=....| ...!...|
|00002590| 12 88 cc 0b 86 28 00 cd | 21 88 08 85 36 00 c5 20 |.....(..|!...6.. |
|000025a0| 3f 85 36 00 ce 20 29 87 | 22 20 5b 6d 6f 64 69 66 |?.6.. ).|" [modif|
|000025b0| 69 65 64 20 6c 61 73 74 | 2d 63 6f 6d 6d 61 6e 64 |ied last|-command|
|000025c0| 20 74 68 69 73 2d 63 6f | 6d 6d 61 6e 64 20 61 72 | this-co|mmand ar|
|000025d0| 67 20 6e 69 6c 20 62 75 | 66 66 65 72 2d 6d 6f 64 |g nil bu|ffer-mod|
|000025e0| 69 66 69 65 64 2d 70 20 | 73 65 6c 65 63 74 65 64 |ified-p |selected|
|000025f0| 2d 77 69 6e 64 6f 77 20 | 6d 69 6e 69 62 75 66 66 |-window |minibuff|
|00002600| 65 72 2d 77 69 6e 64 6f | 77 20 6d 65 73 73 61 67 |er-windo|w messag|
|00002610| 65 20 22 55 6e 64 6f 21 | 22 20 75 6e 64 6f 20 75 |e "Undo!|" undo u|
|00002620| 6e 64 6f 2d 73 74 61 72 | 74 20 75 6e 64 6f 2d 6d |ndo-star|t undo-m|
|00002630| 6f 72 65 20 31 20 64 65 | 6c 65 74 65 2d 61 75 74 |ore 1 de|lete-aut|
|00002640| 6f 2d 73 61 76 65 2d 66 | 69 6c 65 2d 69 66 2d 6e |o-save-f|ile-if-n|
|00002650| 65 63 65 73 73 61 72 79 | 5d 20 31 30 29 29 0a 0a |ecessary|] 10))..|
|00002660| 28 64 65 66 75 6e 20 73 | 68 65 6c 6c 2d 63 6f 6d |(defun s|hell-com|
|00002670| 6d 61 6e 64 20 28 63 6f | 6d 6d 61 6e 64 20 26 6f |mand (co|mmand &o|
|00002680| 70 74 69 6f 6e 61 6c 20 | 66 6c 61 67 29 20 22 5c |ptional |flag) "\|
|00002690| 0a 45 78 65 63 75 74 65 | 20 73 74 72 69 6e 67 20 |.Execute| string |
|000026a0| 43 4f 4d 4d 41 4e 44 20 | 69 6e 20 69 6e 66 65 72 |COMMAND |in infer|
|000026b0| 69 6f 72 20 73 68 65 6c | 6c 3b 20 64 69 73 70 6c |ior shel|l; displ|
|000026c0| 61 79 20 6f 75 74 70 75 | 74 2c 20 69 66 20 61 6e |ay outpu|t, if an|
|000026d0| 79 2e 0a 4f 70 74 69 6f | 6e 61 6c 20 73 65 63 6f |y..Optio|nal seco|
|000026e0| 6e 64 20 61 72 67 20 6e | 6f 6e 2d 6e 69 6c 20 28 |nd arg n|on-nil (|
|000026f0| 70 72 65 66 69 78 20 61 | 72 67 2c 20 69 66 20 69 |prefix a|rg, if i|
|00002700| 6e 74 65 72 61 63 74 69 | 76 65 29 0a 6d 65 61 6e |nteracti|ve).mean|
|00002710| 73 20 69 6e 73 65 72 74 | 20 6f 75 74 70 75 74 20 |s insert| output |
|00002720| 69 6e 20 63 75 72 72 65 | 6e 74 20 62 75 66 66 65 |in curre|nt buffe|
|00002730| 72 20 61 66 74 65 72 20 | 70 6f 69 6e 74 20 28 6c |r after |point (l|
|00002740| 65 61 76 65 20 6d 61 72 | 6b 20 61 66 74 65 72 20 |eave mar|k after |
|00002750| 69 74 29 2e 22 20 28 69 | 6e 74 65 72 61 63 74 69 |it)." (i|nteracti|
|00002760| 76 65 20 22 73 53 68 65 | 6c 6c 20 63 6f 6d 6d 61 |ve "sShe|ll comma|
|00002770| 6e 64 3a 20 0a 50 22 29 | 20 28 62 79 74 65 2d 63 |nd: .P")| (byte-c|
|00002780| 6f 64 65 20 22 c2 88 08 | 83 1b 00 c5 20 88 c6 20 |ode "...|.... .. |
|00002790| 88 c7 09 c2 c3 c2 c8 0c | 26 06 88 c9 20 82 21 00 |........|&... .!.|
|000027a0| ca 60 60 0c c2 24 87 22 | 20 5b 66 6c 61 67 20 73 |.``..$."| [flag s|
|000027b0| 68 65 6c 6c 2d 66 69 6c | 65 2d 6e 61 6d 65 20 6e |hell-fil|e-name n|
|000027c0| 69 6c 20 74 20 63 6f 6d | 6d 61 6e 64 20 62 61 72 |il t com|mand bar|
|000027d0| 66 2d 69 66 2d 62 75 66 | 66 65 72 2d 72 65 61 64 |f-if-buf|fer-read|
|000027e0| 2d 6f 6e 6c 79 20 70 75 | 73 68 2d 6d 61 72 6b 20 |-only pu|sh-mark |
|000027f0| 63 61 6c 6c 2d 70 72 6f | 63 65 73 73 20 22 2d 63 |call-pro|cess "-c|
|00002800| 22 20 65 78 63 68 61 6e | 67 65 2d 70 6f 69 6e 74 |" exchan|ge-point|
|00002810| 2d 61 6e 64 2d 6d 61 72 | 6b 20 73 68 65 6c 6c 2d |-and-mar|k shell-|
|00002820| 63 6f 6d 6d 61 6e 64 2d | 6f 6e 2d 72 65 67 69 6f |command-|on-regio|
|00002830| 6e 5d 20 39 29 29 0a 0a | 28 64 65 66 75 6e 20 73 |n] 9))..|(defun s|
|00002840| 68 65 6c 6c 2d 63 6f 6d | 6d 61 6e 64 2d 6f 6e 2d |hell-com|mand-on-|
|00002850| 72 65 67 69 6f 6e 20 28 | 73 74 61 72 74 20 65 6e |region (|start en|
|00002860| 64 20 63 6f 6d 6d 61 6e | 64 20 26 6f 70 74 69 6f |d comman|d &optio|
|00002870| 6e 61 6c 20 66 6c 61 67 | 20 69 6e 74 65 72 61 63 |nal flag| interac|
|00002880| 74 69 76 65 29 20 22 5c | 0a 45 78 65 63 75 74 65 |tive) "\|.Execute|
|00002890| 20 73 74 72 69 6e 67 20 | 43 4f 4d 4d 41 4e 44 20 | string |COMMAND |
|000028a0| 69 6e 20 69 6e 66 65 72 | 69 6f 72 20 73 68 65 6c |in infer|ior shel|
|000028b0| 6c 20 77 69 74 68 20 72 | 65 67 69 6f 6e 20 61 73 |l with r|egion as|
|000028c0| 20 69 6e 70 75 74 2e 0a | 4e 6f 72 6d 61 6c 6c 79 | input..|Normally|
|000028d0| 20 64 69 73 70 6c 61 79 | 20 6f 75 74 70 75 74 20 | display| output |
|000028e0| 28 69 66 20 61 6e 79 29 | 20 69 6e 20 74 65 6d 70 |(if any)| in temp|
|000028f0| 20 62 75 66 66 65 72 3b | 0a 50 72 65 66 69 78 20 | buffer;|.Prefix |
|00002900| 61 72 67 20 6d 65 61 6e | 73 20 72 65 70 6c 61 63 |arg mean|s replac|
|00002910| 65 20 74 68 65 20 72 65 | 67 69 6f 6e 20 77 69 74 |e the re|gion wit|
|00002920| 68 20 69 74 2e 0a 4e 6f | 6e 69 6e 74 65 72 61 63 |h it..No|ninterac|
|00002930| 74 69 76 65 20 61 72 67 | 73 20 61 72 65 20 53 54 |tive arg|s are ST|
|00002940| 41 52 54 2c 20 45 4e 44 | 2c 20 43 4f 4d 4d 41 4e |ART, END|, COMMAN|
|00002950| 44 2c 20 46 4c 41 47 2e | 0a 4e 6f 6e 69 6e 74 65 |D, FLAG.|.Noninte|
|00002960| 72 61 63 74 69 76 65 6c | 79 20 46 4c 41 47 20 6d |ractivel|y FLAG m|
|00002970| 65 61 6e 73 20 69 6e 73 | 65 72 74 20 6f 75 74 70 |eans ins|ert outp|
|00002980| 75 74 20 69 6e 20 70 6c | 61 63 65 20 6f 66 20 74 |ut in pl|ace of t|
|00002990| 65 78 74 20 66 72 6f 6d | 20 53 54 41 52 54 20 74 |ext from| START t|
|000029a0| 6f 20 45 4e 44 2c 0a 61 | 6e 64 20 70 75 74 20 70 |o END,.a|nd put p|
|000029b0| 6f 69 6e 74 20 61 74 20 | 74 68 65 20 65 6e 64 2c |oint at |the end,|
|000029c0| 20 62 75 74 20 64 6f 6e | 27 74 20 61 6c 74 65 72 | but don|'t alter|
|000029d0| 20 74 68 65 20 6d 61 72 | 6b 2e 22 20 28 69 6e 74 | the mar|k." (int|
|000029e0| 65 72 61 63 74 69 76 65 | 20 22 72 0a 73 53 68 65 |eractive| "r.sShe|
|000029f0| 6c 6c 20 63 6f 6d 6d 61 | 6e 64 20 6f 6e 20 72 65 |ll comma|nd on re|
|00002a00| 67 69 6f 6e 3a 20 0a 50 | 0a 70 22 29 20 28 62 79 |gion: .P|.p") (by|
|00002a10| 74 65 2d 63 6f 64 65 20 | 22 c7 88 08 83 31 00 0a |te-code |"....1..|
|00002a20| 85 0e 00 60 ca 20 57 19 | 0a 85 15 00 cb 20 88 cc |...`. W.|..... ..|
|00002a30| 0b 0c 0d c6 c6 c7 cd 0e | 08 26 08 88 0a 85 2d 00 |........|.&....-.|
|00002a40| 09 85 2d 00 ce 20 29 82 | 88 00 cf d0 21 1e 09 0e |..-.. ).|....!...|
|00002a50| 09 70 3d 83 56 00 d1 0c | 64 5c 22 88 d1 65 0b 5c |.p=.V...|d\"..e.\|
|00002a60| 22 88 cc 65 64 0d c6 c6 | c7 cd 0e 08 26 08 82 6c |"..ed...|....&..l|
|00002a70| 00 8a 0e 09 71 88 d2 20 | 29 88 cc 0b 0c 0d c7 0e |....q.. |).......|
|00002a80| 09 c7 cd 0e 08 26 08 88 | 8a 0e 09 71 88 d3 20 d4 |.....&..|...q.. .|
|00002a90| 56 29 83 84 00 d5 d6 0e | 09 21 d7 5c 22 82 87 00 |V)......|.!.\"...|
|00002aa0| d8 d9 21 29 87 22 20 5b | 66 6c 61 67 20 73 77 61 |..!)." [|flag swa|
|00002ab0| 70 20 69 6e 74 65 72 61 | 63 74 69 76 65 20 73 74 |p intera|ctive st|
|00002ac0| 61 72 74 20 65 6e 64 20 | 73 68 65 6c 6c 2d 66 69 |art end |shell-fi|
|00002ad0| 6c 65 2d 6e 61 6d 65 20 | 74 20 6e 69 6c 20 63 6f |le-name |t nil co|
|00002ae0| 6d 6d 61 6e 64 20 62 75 | 66 66 65 72 20 6d 61 72 |mmand bu|ffer mar|
|00002af0| 6b 20 70 75 73 68 2d 6d | 61 72 6b 20 63 61 6c 6c |k push-m|ark call|
|00002b00| 2d 70 72 6f 63 65 73 73 | 2d 72 65 67 69 6f 6e 20 |-process|-region |
|00002b10| 22 2d 63 22 20 65 78 63 | 68 61 6e 67 65 2d 70 6f |"-c" exc|hange-po|
|00002b20| 69 6e 74 2d 61 6e 64 2d | 6d 61 72 6b 20 67 65 74 |int-and-|mark get|
|00002b30| 2d 62 75 66 66 65 72 2d | 63 72 65 61 74 65 20 22 |-buffer-|create "|
|00002b40| 2a 53 68 65 6c 6c 20 43 | 6f 6d 6d 61 6e 64 20 4f |*Shell C|ommand O|
|00002b50| 75 74 70 75 74 2a 22 20 | 64 65 6c 65 74 65 2d 72 |utput*" |delete-r|
|00002b60| 65 67 69 6f 6e 20 65 72 | 61 73 65 2d 62 75 66 66 |egion er|ase-buff|
|00002b70| 65 72 20 62 75 66 66 65 | 72 2d 73 69 7a 65 20 30 |er buffe|r-size 0|
|00002b80| 20 73 65 74 2d 77 69 6e | 64 6f 77 2d 73 74 61 72 | set-win|dow-star|
|00002b90| 74 20 64 69 73 70 6c 61 | 79 2d 62 75 66 66 65 72 |t displa|y-buffer|
|00002ba0| 20 31 20 6d 65 73 73 61 | 67 65 20 22 28 53 68 65 | 1 messa|ge "(She|
|00002bb0| 6c 6c 20 63 6f 6d 6d 61 | 6e 64 20 63 6f 6d 70 6c |ll comma|nd compl|
|00002bc0| 65 74 65 64 20 77 69 74 | 68 20 6e 6f 20 6f 75 74 |eted wit|h no out|
|00002bd0| 70 75 74 29 22 5d 20 31 | 38 29 29 0a 0a 28 64 65 |put)"] 1|8))..(de|
|00002be0| 66 75 6e 20 75 6e 69 76 | 65 72 73 61 6c 2d 61 72 |fun univ|ersal-ar|
|00002bf0| 67 75 6d 65 6e 74 20 6e | 69 6c 20 22 5c 0a 42 65 |gument n|il "\.Be|
|00002c00| 67 69 6e 20 61 20 6e 75 | 6d 65 72 69 63 20 61 72 |gin a nu|meric ar|
|00002c10| 67 75 6d 65 6e 74 20 66 | 6f 72 20 74 68 65 20 66 |gument f|or the f|
|00002c20| 6f 6c 6c 6f 77 69 6e 67 | 20 63 6f 6d 6d 61 6e 64 |ollowing| command|
|00002c30| 2e 0a 44 69 67 69 74 73 | 20 6f 72 20 6d 69 6e 75 |..Digits| or minu|
|00002c40| 73 20 73 69 67 6e 20 66 | 6f 6c 6c 6f 77 69 6e 67 |s sign f|ollowing|
|00002c50| 20 5c 5c 5b 75 6e 69 76 | 65 72 73 61 6c 2d 61 72 | \\[univ|ersal-ar|
|00002c60| 67 75 6d 65 6e 74 5d 20 | 6d 61 6b 65 20 75 70 20 |gument] |make up |
|00002c70| 74 68 65 20 6e 75 6d 65 | 72 69 63 20 61 72 67 75 |the nume|ric argu|
|00002c80| 6d 65 6e 74 2e 0a 5c 5c | 5b 75 6e 69 76 65 72 73 |ment..\\|[univers|
|00002c90| 61 6c 2d 61 72 67 75 6d | 65 6e 74 5d 20 66 6f 6c |al-argum|ent] fol|
|00002ca0| 6c 6f 77 69 6e 67 20 74 | 68 65 20 64 69 67 69 74 |lowing t|he digit|
|00002cb0| 73 20 6f 72 20 6d 69 6e | 75 73 20 73 69 67 6e 20 |s or min|us sign |
|00002cc0| 65 6e 64 73 20 74 68 65 | 20 61 72 67 75 6d 65 6e |ends the| argumen|
|00002cd0| 74 2e 0a 5c 5c 5b 75 6e | 69 76 65 72 73 61 6c 2d |t..\\[un|iversal-|
|00002ce0| 61 72 67 75 6d 65 6e 74 | 5d 20 77 69 74 68 6f 75 |argument|] withou|
|00002cf0| 74 20 64 69 67 69 74 73 | 20 6f 72 20 6d 69 6e 75 |t digits| or minu|
|00002d00| 73 20 73 69 67 6e 20 70 | 72 6f 76 69 64 65 73 20 |s sign p|rovides |
|00002d10| 34 20 61 73 20 61 72 67 | 75 6d 65 6e 74 2e 0a 52 |4 as arg|ument..R|
|00002d20| 65 70 65 61 74 69 6e 67 | 20 5c 5c 5b 75 6e 69 76 |epeating| \\[univ|
|00002d30| 65 72 73 61 6c 2d 61 72 | 67 75 6d 65 6e 74 5d 20 |ersal-ar|gument] |
|00002d40| 77 69 74 68 6f 75 74 20 | 64 69 67 69 74 73 20 6f |without |digits o|
|00002d50| 72 20 6d 69 6e 75 73 20 | 73 69 67 6e 0a 20 6d 75 |r minus |sign. mu|
|00002d60| 6c 74 69 70 6c 69 65 73 | 20 74 68 65 20 61 72 67 |ltiplies| the arg|
|00002d70| 75 6d 65 6e 74 20 62 79 | 20 34 20 65 61 63 68 20 |ument by| 4 each |
|00002d80| 74 69 6d 65 2e 22 20 28 | 69 6e 74 65 72 61 63 74 |time." (|interact|
|00002d90| 69 76 65 20 6e 69 6c 29 | 20 28 62 79 74 65 2d 63 |ive nil)| (byte-c|
|00002da0| 6f 64 65 20 22 c0 88 c5 | 0b c0 1c 1a 19 72 89 14 |ode "...|.....r..|
|00002db0| 88 0c 0a 55 85 20 00 c6 | c5 09 5c 22 89 11 88 72 |...U. ..|..\"...r|
|00002dc0| 89 14 88 82 0c 00 88 c7 | 0c 09 c0 23 2b 87 22 20 |........|...#+." |
|00002dd0| 5b 6e 69 6c 20 63 2d 75 | 20 61 72 67 73 74 61 72 |[nil c-u| argstar|
|00002de0| 74 63 68 61 72 20 6c 61 | 73 74 2d 63 6f 6d 6d 61 |tchar la|st-comma|
|00002df0| 6e 64 2d 63 68 61 72 20 | 63 68 61 72 20 34 20 2a |nd-char |char 4 *|
|00002e00| 20 70 72 65 66 69 78 2d | 61 72 67 2d 69 6e 74 65 | prefix-|arg-inte|
|00002e10| 72 6e 61 6c 5d 20 35 29 | 29 0a 0a 28 64 65 66 75 |rnal] 5)|)..(defu|
|00002e20| 6e 20 70 72 65 66 69 78 | 2d 61 72 67 2d 69 6e 74 |n prefix|-arg-int|
|00002e30| 65 72 6e 61 6c 20 28 63 | 68 61 72 20 63 2d 75 20 |ernal (c|har c-u |
|00002e40| 76 61 6c 75 65 29 20 28 | 62 79 74 65 2d 63 6f 64 |value) (|byte-cod|
|00002e50| 65 20 22 c8 18 c9 09 21 | 85 0b 00 09 ca 57 85 14 |e "....!|.....W..|
|00002e60| 00 cb 10 09 5b 89 11 88 | 09 cc 3d 85 20 00 cb 10 |....[...|..=. ...|
|00002e70| c2 89 11 88 cd 0b 55 85 | 35 00 08 5b 10 c2 89 14 |......U.|5..[....|
|00002e80| 88 72 89 13 88 82 21 00 | 88 0b ce 59 85 3f 00 0b |.r....!.|...Y.?..|
|00002e90| cf 58 85 60 00 d0 c9 09 | 21 83 4d 00 09 82 4e 00 |.X.`....|!.M...N.|
|00002ea0| ca d1 5c 22 0b ce 5a 5c | 5c 11 c2 89 14 88 72 89 |..\"..Z\|\.....r.|
|00002eb0| 13 88 82 36 00 88 d2 0d | d3 c8 0b 5c 22 5c 22 d4 |...6....|...\"\".|
|00002ec0| 3d 85 70 00 72 89 13 88 | 0c 83 7a 00 0c 43 82 8e |=.p.r...|..z..C..|
|00002ed0| 00 c9 09 21 83 87 00 d0 | 09 08 5c 22 82 8e 00 08 |...!....|..\"....|
|00002ee0| cb 55 85 8e 00 cc 89 16 | 06 88 0b 89 16 07 29 87 |.U......|......).|
|00002ef0| 22 20 5b 73 69 67 6e 20 | 76 61 6c 75 65 20 6e 69 |" [sign |value ni|
|00002f00| 6c 20 63 68 61 72 20 63 | 2d 75 20 67 6c 6f 62 61 |l char c|-u globa|
|00002f10| 6c 2d 6d 61 70 20 70 72 | 65 66 69 78 2d 61 72 67 |l-map pr|efix-arg|
|00002f20| 20 75 6e 72 65 61 64 2d | 63 6f 6d 6d 61 6e 64 2d | unread-|command-|
|00002f30| 63 68 61 72 20 31 20 6e | 75 6d 62 65 72 70 20 30 |char 1 n|umberp 0|
|00002f40| 20 2d 31 20 2d 20 34 35 | 20 34 38 20 35 37 20 2a | -1 - 45| 48 57 *|
|00002f50| 20 31 30 20 6c 6f 6f 6b | 75 70 2d 6b 65 79 20 6d | 10 look|up-key m|
|00002f60| 61 6b 65 2d 73 74 72 69 | 6e 67 20 75 6e 69 76 65 |ake-stri|ng unive|
|00002f70| 72 73 61 6c 2d 61 72 67 | 75 6d 65 6e 74 5d 20 39 |rsal-arg|ument] 9|
|00002f80| 29 29 0a 0a 28 64 65 66 | 75 6e 20 64 69 67 69 74 |))..(def|un digit|
|00002f90| 2d 61 72 67 75 6d 65 6e | 74 20 28 61 72 67 29 20 |-argumen|t (arg) |
|00002fa0| 22 5c 0a 50 61 72 74 20 | 6f 66 20 74 68 65 20 6e |"\.Part |of the n|
|00002fb0| 75 6d 65 72 69 63 20 61 | 72 67 75 6d 65 6e 74 20 |umeric a|rgument |
|00002fc0| 66 6f 72 20 74 68 65 20 | 6e 65 78 74 20 63 6f 6d |for the |next com|
|00002fd0| 6d 61 6e 64 2e 0a 5c 5c | 5b 75 6e 69 76 65 72 73 |mand..\\|[univers|
|00002fe0| 61 6c 2d 61 72 67 75 6d | 65 6e 74 5d 20 66 6f 6c |al-argum|ent] fol|
|00002ff0| 6c 6f 77 69 6e 67 20 64 | 69 67 69 74 73 20 6f 72 |lowing d|igits or|
|00003000| 20 6d 69 6e 75 73 20 73 | 69 67 6e 20 65 6e 64 73 | minus s|ign ends|
|00003010| 20 74 68 65 20 61 72 67 | 75 6d 65 6e 74 2e 22 20 | the arg|ument." |
|00003020| 28 69 6e 74 65 72 61 63 | 74 69 76 65 20 22 50 22 |(interac|tive "P"|
|00003030| 29 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c1 88 |) (byte-|code "..|
|00003040| c3 08 c1 0a 23 87 22 20 | 5b 6c 61 73 74 2d 63 6f |....#." |[last-co|
|00003050| 6d 6d 61 6e 64 2d 63 68 | 61 72 20 6e 69 6c 20 61 |mmand-ch|ar nil a|
|00003060| 72 67 20 70 72 65 66 69 | 78 2d 61 72 67 2d 69 6e |rg prefi|x-arg-in|
|00003070| 74 65 72 6e 61 6c 5d 20 | 34 29 29 0a 0a 28 64 65 |ternal] |4))..(de|
|00003080| 66 75 6e 20 6e 65 67 61 | 74 69 76 65 2d 61 72 67 |fun nega|tive-arg|
|00003090| 75 6d 65 6e 74 20 28 61 | 72 67 29 20 22 5c 0a 42 |ument (a|rg) "\.B|
|000030a0| 65 67 69 6e 20 61 20 6e | 65 67 61 74 69 76 65 20 |egin a n|egative |
|000030b0| 6e 75 6d 65 72 69 63 20 | 61 72 67 75 6d 65 6e 74 |numeric |argument|
|000030c0| 20 66 6f 72 20 74 68 65 | 20 6e 65 78 74 20 63 6f | for the| next co|
|000030d0| 6d 6d 61 6e 64 2e 0a 5c | 5c 5b 75 6e 69 76 65 72 |mmand..\|\[univer|
|000030e0| 73 61 6c 2d 61 72 67 75 | 6d 65 6e 74 5d 20 66 6f |sal-argu|ment] fo|
|000030f0| 6c 6c 6f 77 69 6e 67 20 | 64 69 67 69 74 73 20 6f |llowing |digits o|
|00003100| 72 20 6d 69 6e 75 73 20 | 73 69 67 6e 20 65 6e 64 |r minus |sign end|
|00003110| 73 20 74 68 65 20 61 72 | 67 75 6d 65 6e 74 2e 22 |s the ar|gument."|
|00003120| 20 28 69 6e 74 65 72 61 | 63 74 69 76 65 20 22 50 | (intera|ctive "P|
|00003130| 22 29 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 c0 |") (byte|-code ".|
|00003140| 88 c2 c3 c0 09 23 87 22 | 20 5b 6e 69 6c 20 61 72 |.....#."| [nil ar|
|00003150| 67 20 70 72 65 66 69 78 | 2d 61 72 67 2d 69 6e 74 |g prefix|-arg-int|
|00003160| 65 72 6e 61 6c 20 34 35 | 5d 20 34 29 29 0a 0a 28 |ernal 45|] 4))..(|
|00003170| 64 65 66 75 6e 20 66 6f | 72 77 61 72 64 2d 74 6f |defun fo|rward-to|
|00003180| 2d 69 6e 64 65 6e 74 61 | 74 69 6f 6e 20 28 61 72 |-indenta|tion (ar|
|00003190| 67 29 20 22 5c 0a 4d 6f | 76 65 20 66 6f 72 77 61 |g) "\.Mo|ve forwa|
|000031a0| 72 64 20 41 52 47 20 6c | 69 6e 65 73 20 61 6e 64 |rd ARG l|ines and|
|000031b0| 20 70 6f 73 69 74 69 6f | 6e 20 61 74 20 66 69 72 | positio|n at fir|
|000031c0| 73 74 20 6e 6f 6e 62 6c | 61 6e 6b 20 63 68 61 72 |st nonbl|ank char|
|000031d0| 61 63 74 65 72 2e 22 20 | 28 69 6e 74 65 72 61 63 |acter." |(interac|
|000031e0| 74 69 76 65 20 22 70 22 | 29 20 28 62 79 74 65 2d |tive "p"|) (byte-|
|000031f0| 63 6f 64 65 20 22 c1 88 | c2 08 21 88 c3 c4 21 87 |code "..|..!...!.|
|00003200| 22 20 5b 61 72 67 20 6e | 69 6c 20 66 6f 72 77 61 |" [arg n|il forwa|
|00003210| 72 64 2d 6c 69 6e 65 20 | 73 6b 69 70 2d 63 68 61 |rd-line |skip-cha|
|00003220| 72 73 2d 66 6f 72 77 61 | 72 64 20 22 20 09 22 5d |rs-forwa|rd " ."]|
|00003230| 20 33 29 29 0a 0a 28 64 | 65 66 75 6e 20 62 61 63 | 3))..(d|efun bac|
|00003240| 6b 77 61 72 64 2d 74 6f | 2d 69 6e 64 65 6e 74 61 |kward-to|-indenta|
|00003250| 74 69 6f 6e 20 28 61 72 | 67 29 20 22 5c 0a 4d 6f |tion (ar|g) "\.Mo|
|00003260| 76 65 20 62 61 63 6b 77 | 61 72 64 20 41 52 47 20 |ve backw|ard ARG |
|00003270| 6c 69 6e 65 73 20 61 6e | 64 20 70 6f 73 69 74 69 |lines an|d positi|
|00003280| 6f 6e 20 61 74 20 66 69 | 72 73 74 20 6e 6f 6e 62 |on at fi|rst nonb|
|00003290| 6c 61 6e 6b 20 63 68 61 | 72 61 63 74 65 72 2e 22 |lank cha|racter."|
|000032a0| 20 28 69 6e 74 65 72 61 | 63 74 69 76 65 20 22 70 | (intera|ctive "p|
|000032b0| 22 29 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 c1 |") (byte|-code ".|
|000032c0| 88 c2 08 5b 21 88 c3 c4 | 21 87 22 20 5b 61 72 67 |...[!...|!." [arg|
|000032d0| 20 6e 69 6c 20 66 6f 72 | 77 61 72 64 2d 6c 69 6e | nil for|ward-lin|
|000032e0| 65 20 73 6b 69 70 2d 63 | 68 61 72 73 2d 66 6f 72 |e skip-c|hars-for|
|000032f0| 77 61 72 64 20 22 20 09 | 22 5d 20 33 29 29 0a 0a |ward " .|"] 3))..|
|00003300| 28 64 65 66 75 6e 20 6b | 69 6c 6c 2d 6c 69 6e 65 |(defun k|ill-line|
|00003310| 20 28 26 6f 70 74 69 6f | 6e 61 6c 20 61 72 67 29 | (&optio|nal arg)|
|00003320| 20 22 5c 0a 4b 69 6c 6c | 20 74 68 65 20 72 65 73 | "\.Kill| the res|
|00003330| 74 20 6f 66 20 74 68 65 | 20 63 75 72 72 65 6e 74 |t of the| current|
|00003340| 20 6c 69 6e 65 3b 20 69 | 66 20 6e 6f 20 6e 6f 6e | line; i|f no non|
|00003350| 62 6c 61 6e 6b 73 20 74 | 68 65 72 65 2c 20 6b 69 |blanks t|here, ki|
|00003360| 6c 6c 20 74 68 72 75 20 | 6e 65 77 6c 69 6e 65 2e |ll thru |newline.|
|00003370| 0a 57 69 74 68 20 70 72 | 65 66 69 78 20 61 72 67 |.With pr|efix arg|
|00003380| 75 6d 65 6e 74 2c 20 6b | 69 6c 6c 20 74 68 61 74 |ument, k|ill that|
|00003390| 20 6d 61 6e 79 20 6c 69 | 6e 65 73 20 66 72 6f 6d | many li|nes from|
|000033a0| 20 70 6f 69 6e 74 2e 0a | 4e 65 67 61 74 69 76 65 | point..|Negative|
|000033b0| 20 61 72 67 75 6d 65 6e | 74 73 20 6b 69 6c 6c 20 | argumen|ts kill |
|000033c0| 6c 69 6e 65 73 20 62 61 | 63 6b 77 61 72 64 2e 0a |lines ba|ckward..|
|000033d0| 0a 57 68 65 6e 20 63 61 | 6c 6c 69 6e 67 20 66 72 |.When ca|lling fr|
|000033e0| 6f 6d 20 61 20 70 72 6f | 67 72 61 6d 2c 20 6e 69 |om a pro|gram, ni|
|000033f0| 6c 20 6d 65 61 6e 73 20 | 5c 22 6e 6f 20 61 72 67 |l means |\"no arg|
|00003400| 5c 22 2c 0a 61 20 6e 75 | 6d 62 65 72 20 63 6f 75 |\",.a nu|mber cou|
|00003410| 6e 74 73 20 61 73 20 61 | 20 70 72 65 66 69 78 20 |nts as a| prefix |
|00003420| 61 72 67 2e 22 20 28 69 | 6e 74 65 72 61 63 74 69 |arg." (i|nteracti|
|00003430| 76 65 20 22 2a 50 22 29 | 20 28 62 79 74 65 2d 63 |ve "*P")| (byte-c|
|00003440| 6f 64 65 20 22 c1 88 c2 | 60 08 83 10 00 c3 c4 08 |ode "...|`.......|
|00003450| 21 21 82 27 00 6d 85 18 | 00 c5 c6 c1 5c 22 88 c7 |!!.'.m..|....\"..|
|00003460| c8 21 83 25 00 c3 c9 21 | 82 27 00 ca 20 88 60 5c |.!.%...!|.'.. .`\|
|00003470| 22 87 22 20 5b 61 72 67 | 20 6e 69 6c 20 6b 69 6c |"." [arg| nil kil|
|00003480| 6c 2d 72 65 67 69 6f 6e | 20 66 6f 72 77 61 72 64 |l-region| forward|
|00003490| 2d 6c 69 6e 65 20 70 72 | 65 66 69 78 2d 6e 75 6d |-line pr|efix-num|
|000034a0| 65 72 69 63 2d 76 61 6c | 75 65 20 73 69 67 6e 61 |eric-val|ue signa|
|000034b0| 6c 20 65 6e 64 2d 6f 66 | 2d 62 75 66 66 65 72 20 |l end-of|-buffer |
|000034c0| 6c 6f 6f 6b 69 6e 67 2d | 61 74 20 22 5b 20 09 5d |looking-|at "[ .]|
|000034d0| 2a 24 22 20 31 20 65 6e | 64 2d 6f 66 2d 6c 69 6e |*$" 1 en|d-of-lin|
|000034e0| 65 5d 20 39 29 29 0a 0a | 28 64 65 66 76 61 72 20 |e] 9))..|(defvar |
|000034f0| 6b 69 6c 6c 2d 72 69 6e | 67 20 6e 69 6c 20 22 5c |kill-rin|g nil "\|
|00003500| 0a 4c 69 73 74 20 6f 66 | 20 6b 69 6c 6c 65 64 20 |.List of| killed |
|00003510| 74 65 78 74 20 73 65 71 | 75 65 6e 63 65 73 2e 22 |text seq|uences."|
|00003520| 29 0a 0a 28 64 65 66 63 | 6f 6e 73 74 20 6b 69 6c |)..(defc|onst kil|
|00003530| 6c 2d 72 69 6e 67 2d 6d | 61 78 20 33 30 20 22 5c |l-ring-m|ax 30 "\|
|00003540| 0a 2a 4d 61 78 69 6d 75 | 6d 20 6c 65 6e 67 74 68 |.*Maximu|m length|
|00003550| 20 6f 66 20 6b 69 6c 6c | 20 72 69 6e 67 20 62 65 | of kill| ring be|
|00003560| 66 6f 72 65 20 6f 6c 64 | 65 73 74 20 65 6c 65 6d |fore old|est elem|
|00003570| 65 6e 74 73 20 61 72 65 | 20 74 68 72 6f 77 6e 20 |ents are| thrown |
|00003580| 61 77 61 79 2e 22 29 0a | 0a 28 64 65 66 76 61 72 |away.").|.(defvar|
|00003590| 20 6b 69 6c 6c 2d 72 69 | 6e 67 2d 79 61 6e 6b 2d | kill-ri|ng-yank-|
|000035a0| 70 6f 69 6e 74 65 72 20 | 6e 69 6c 20 22 5c 0a 54 |pointer |nil "\.T|
|000035b0| 68 65 20 74 61 69 6c 20 | 6f 66 20 74 68 65 20 6b |he tail |of the k|
|000035c0| 69 6c 6c 20 72 69 6e 67 | 20 77 68 6f 73 65 20 63 |ill ring| whose c|
|000035d0| 61 72 20 69 73 20 74 68 | 65 20 6c 61 73 74 20 74 |ar is th|e last t|
|000035e0| 68 69 6e 67 20 79 61 6e | 6b 65 64 2e 22 29 0a 0a |hing yan|ked.")..|
|000035f0| 28 69 66 20 28 65 71 20 | 73 79 73 74 65 6d 2d 74 |(if (eq |system-t|
|00003600| 79 70 65 20 28 71 75 6f | 74 65 20 61 6d 69 67 61 |ype (quo|te amiga|
|00003610| 6f 73 29 29 20 28 70 72 | 6f 67 6e 20 28 64 65 66 |os)) (pr|ogn (def|
|00003620| 75 6e 20 73 61 66 65 2d | 61 6d 69 67 61 2d 70 61 |un safe-|amiga-pa|
|00003630| 73 74 65 20 6e 69 6c 20 | 22 50 61 73 74 65 20 66 |ste nil |"Paste f|
|00003640| 72 6f 6d 20 74 68 65 20 | 61 6d 69 67 61 20 63 6c |rom the |amiga cl|
|00003650| 69 70 62 6f 61 72 64 2c | 20 74 72 61 70 70 69 6e |ipboard,| trappin|
|00003660| 67 20 61 6e 79 20 65 72 | 72 6f 72 73 2e 22 20 28 |g any er|rors." (|
|00003670| 63 6f 6e 64 69 74 69 6f | 6e 2d 63 61 73 65 20 6e |conditio|n-case n|
|00003680| 69 6c 20 28 61 6d 69 67 | 61 2d 70 61 73 74 65 29 |il (amig|a-paste)|
|00003690| 20 28 65 72 72 6f 72 20 | 6e 69 6c 29 29 29 20 28 | (error |nil))) (|
|000036a0| 64 65 66 75 6e 20 63 68 | 65 63 6b 2d 63 6c 69 70 |defun ch|eck-clip|
|000036b0| 62 6f 61 72 64 20 6e 69 | 6c 20 22 49 66 20 74 68 |board ni|l "If th|
|000036c0| 65 72 65 20 69 73 20 61 | 6e 79 74 68 69 6e 67 20 |ere is a|nything |
|000036d0| 6e 65 77 20 69 6e 20 74 | 68 65 20 63 6c 69 70 62 |new in t|he clipb|
|000036e0| 6f 61 72 64 2c 20 61 64 | 64 20 69 74 20 74 6f 20 |oard, ad|d it to |
|000036f0| 74 68 65 20 65 6d 61 63 | 73 20 6b 69 6c 6c 20 72 |the emac|s kill r|
|00003700| 69 6e 67 2e 0a 52 65 74 | 75 72 6e 73 20 74 20 69 |ing..Ret|urns t i|
|00003710| 66 20 74 68 65 72 65 20 | 77 61 73 20 73 6f 6d 65 |f there |was some|
|00003720| 74 68 69 6e 67 20 61 64 | 64 65 64 2c 20 6e 69 6c |thing ad|ded, nil|
|00003730| 20 6f 74 68 65 72 77 69 | 73 65 2e 22 20 28 6c 65 | otherwi|se." (le|
|00003740| 74 20 28 61 64 64 65 64 | 29 20 28 69 66 20 61 6d |t (added|) (if am|
|00003750| 69 67 61 2d 6e 65 77 2d | 63 6c 69 70 20 28 6c 65 |iga-new-|clip (le|
|00003760| 74 20 28 28 73 74 72 20 | 28 73 61 66 65 2d 61 6d |t ((str |(safe-am|
|00003770| 69 67 61 2d 70 61 73 74 | 65 29 29 29 20 28 73 65 |iga-past|e))) (se|
|00003780| 74 71 20 61 6d 69 67 61 | 2d 6e 65 77 2d 63 6c 69 |tq amiga|-new-cli|
|00003790| 70 20 6e 69 6c 29 20 28 | 69 66 20 73 74 72 20 28 |p nil) (|if str (|
|000037a0| 70 72 6f 67 6e 20 28 6b | 69 6c 6c 2d 61 64 64 20 |progn (k|ill-add |
|000037b0| 73 74 72 29 20 28 73 65 | 74 71 20 61 64 64 65 64 |str) (se|tq added|
|000037c0| 20 74 29 20 28 73 65 74 | 71 20 6b 69 6c 6c 2d 72 | t) (set|q kill-r|
|000037d0| 69 6e 67 2d 79 61 6e 6b | 2d 70 6f 69 6e 74 65 72 |ing-yank|-pointer|
|000037e0| 20 6b 69 6c 6c 2d 72 69 | 6e 67 29 29 29 29 29 20 | kill-ri|ng))))) |
|000037f0| 61 64 64 65 64 29 29 20 | 28 64 65 66 75 6e 20 75 |added)) |(defun u|
|00003800| 70 64 61 74 65 2d 63 6c | 69 70 62 6f 61 72 64 20 |pdate-cl|ipboard |
|00003810| 28 73 74 72 29 20 28 61 | 6d 69 67 61 2d 63 75 74 |(str) (a|miga-cut|
|00003820| 20 73 74 72 29 20 28 73 | 65 74 71 20 61 6d 69 67 | str) (s|etq amig|
|00003830| 61 2d 6e 65 77 2d 63 6c | 69 70 20 6e 69 6c 29 29 |a-new-cl|ip nil))|
|00003840| 29 20 28 70 72 6f 67 6e | 20 28 64 65 66 75 6e 20 |) (progn| (defun |
|00003850| 63 68 65 63 6b 2d 63 6c | 69 70 62 6f 61 72 64 20 |check-cl|ipboard |
|00003860| 6e 69 6c 20 6e 69 6c 29 | 20 28 64 65 66 75 6e 20 |nil nil)| (defun |
|00003870| 75 70 64 61 74 65 2d 63 | 6c 69 70 62 6f 61 72 64 |update-c|lipboard|
|00003880| 20 6e 69 6c 20 6e 69 6c | 29 29 29 0a 0a 28 64 65 | nil nil|)))..(de|
|00003890| 66 75 6e 20 6b 69 6c 6c | 2d 61 70 70 65 6e 64 20 |fun kill|-append |
|000038a0| 28 73 74 72 69 6e 67 20 | 62 65 66 6f 72 65 2d 70 |(string |before-p|
|000038b0| 29 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c3 08 |) (byte-|code "..|
|000038c0| 09 83 0d 00 0a 08 40 50 | 82 11 00 08 40 0a 50 5c |......@P|....@.P\|
|000038d0| 22 88 c4 08 40 21 87 22 | 20 5b 6b 69 6c 6c 2d 72 |"...@!."| [kill-r|
|000038e0| 69 6e 67 20 62 65 66 6f | 72 65 2d 70 20 73 74 72 |ing befo|re-p str|
|000038f0| 69 6e 67 20 73 65 74 63 | 61 72 20 75 70 64 61 74 |ing setc|ar updat|
|00003900| 65 2d 63 6c 69 70 62 6f | 61 72 64 5d 20 34 29 29 |e-clipbo|ard] 4))|
|00003910| 0a 0a 28 64 65 66 75 6e | 20 6b 69 6c 6c 2d 61 64 |..(defun| kill-ad|
|00003920| 64 20 28 73 74 72 69 6e | 67 29 20 28 62 79 74 65 |d (strin|g) (byte|
|00003930| 2d 63 6f 64 65 20 22 c4 | 20 88 09 08 42 89 10 88 |-code ".| ...B...|
|00003940| c5 09 21 88 08 47 0a 56 | 85 1c 00 c6 c7 0a 53 08 |..!..G.V|......S.|
|00003950| 5c 22 c3 5c 22 87 22 20 | 5b 6b 69 6c 6c 2d 72 69 |\".\"." |[kill-ri|
|00003960| 6e 67 20 73 74 72 69 6e | 67 20 6b 69 6c 6c 2d 72 |ng strin|g kill-r|
|00003970| 69 6e 67 2d 6d 61 78 20 | 6e 69 6c 20 63 68 65 63 |ing-max |nil chec|
|00003980| 6b 2d 63 6c 69 70 62 6f | 61 72 64 20 75 70 64 61 |k-clipbo|ard upda|
|00003990| 74 65 2d 63 6c 69 70 62 | 6f 61 72 64 20 73 65 74 |te-clipb|oard set|
|000039a0| 63 64 72 20 6e 74 68 63 | 64 72 5d 20 36 29 29 0a |cdr nthc|dr] 6)).|
|000039b0| 0a 28 64 65 66 75 6e 20 | 6b 69 6c 6c 2d 72 65 67 |.(defun |kill-reg|
|000039c0| 69 6f 6e 20 28 62 65 67 | 20 65 6e 64 29 20 22 5c |ion (beg| end) "\|
|000039d0| 0a 4b 69 6c 6c 20 62 65 | 74 77 65 65 6e 20 70 6f |.Kill be|tween po|
|000039e0| 69 6e 74 20 61 6e 64 20 | 6d 61 72 6b 2e 0a 54 68 |int and |mark..Th|
|000039f0| 65 20 74 65 78 74 20 69 | 73 20 64 65 6c 65 74 65 |e text i|s delete|
|00003a00| 64 20 62 75 74 20 73 61 | 76 65 64 20 69 6e 20 74 |d but sa|ved in t|
|00003a10| 68 65 20 6b 69 6c 6c 20 | 72 69 6e 67 2e 0a 54 68 |he kill |ring..Th|
|00003a20| 65 20 63 6f 6d 6d 61 6e | 64 20 5c 5c 5b 79 61 6e |e comman|d \\[yan|
|00003a30| 6b 5d 20 63 61 6e 20 72 | 65 74 72 69 65 76 65 20 |k] can r|etrieve |
|00003a40| 69 74 20 66 72 6f 6d 20 | 74 68 65 72 65 2e 0a 28 |it from |there..(|
|00003a50| 49 66 20 79 6f 75 20 77 | 61 6e 74 20 74 6f 20 6b |If you w|ant to k|
|00003a60| 69 6c 6c 20 61 6e 64 20 | 74 68 65 6e 20 79 61 6e |ill and |then yan|
|00003a70| 6b 20 69 6d 6d 65 64 69 | 61 74 65 6c 79 2c 20 75 |k immedi|ately, u|
|00003a80| 73 65 20 5c 5c 5b 63 6f | 70 79 2d 72 65 67 69 6f |se \\[co|py-regio|
|00003a90| 6e 2d 61 73 2d 6b 69 6c | 6c 5d 2e 29 0a 0a 54 68 |n-as-kil|l].)..Th|
|00003aa0| 69 73 20 69 73 20 74 68 | 65 20 70 72 69 6d 69 74 |is is th|e primit|
|00003ab0| 69 76 65 20 66 6f 72 20 | 70 72 6f 67 72 61 6d 73 |ive for |programs|
|00003ac0| 20 74 6f 20 6b 69 6c 6c | 20 74 65 78 74 20 28 61 | to kill| text (a|
|00003ad0| 73 20 6f 70 70 6f 73 65 | 64 20 74 6f 20 64 65 6c |s oppose|d to del|
|00003ae0| 65 74 69 6e 67 20 69 74 | 29 2e 0a 53 75 70 70 6c |eting it|)..Suppl|
|00003af0| 79 20 74 77 6f 20 61 72 | 67 75 6d 65 6e 74 73 2c |y two ar|guments,|
|00003b00| 20 63 68 61 72 61 63 74 | 65 72 20 6e 75 6d 62 65 | charact|er numbe|
|00003b10| 72 73 20 69 6e 64 69 63 | 61 74 69 6e 67 20 74 68 |rs indic|ating th|
|00003b20| 65 20 73 74 72 65 74 63 | 68 20 6f 66 20 74 65 78 |e stretc|h of tex|
|00003b30| 74 0a 20 74 6f 20 62 65 | 20 6b 69 6c 6c 65 64 2e |t. to be| killed.|
|00003b40| 0a 41 6e 79 20 63 6f 6d | 6d 61 6e 64 20 74 68 61 |.Any com|mand tha|
|00003b50| 74 20 63 61 6c 6c 73 20 | 74 68 69 73 20 66 75 6e |t calls |this fun|
|00003b60| 63 74 69 6f 6e 20 69 73 | 20 61 20 5c 22 6b 69 6c |ction is| a \"kil|
|00003b70| 6c 20 63 6f 6d 6d 61 6e | 64 5c 22 2e 0a 49 66 20 |l comman|d\"..If |
|00003b80| 74 68 65 20 70 72 65 76 | 69 6f 75 73 20 63 6f 6d |the prev|ious com|
|00003b90| 6d 61 6e 64 20 77 61 73 | 20 61 6c 73 6f 20 61 20 |mand was| also a |
|00003ba0| 6b 69 6c 6c 20 63 6f 6d | 6d 61 6e 64 2c 0a 74 68 |kill com|mand,.th|
|00003bb0| 65 20 74 65 78 74 20 6b | 69 6c 6c 65 64 20 74 68 |e text k|illed th|
|00003bc0| 69 73 20 74 69 6d 65 20 | 61 70 70 65 6e 64 73 20 |is time |appends |
|00003bd0| 74 6f 20 74 68 65 20 74 | 65 78 74 20 6b 69 6c 6c |to the t|ext kill|
|00003be0| 65 64 20 6c 61 73 74 20 | 74 69 6d 65 0a 74 6f 20 |ed last |time.to |
|00003bf0| 6d 61 6b 65 20 6f 6e 65 | 20 65 6e 74 72 79 20 69 |make one| entry i|
|00003c00| 6e 20 74 68 65 20 6b 69 | 6c 6c 20 72 69 6e 67 2e |n the ki|ll ring.|
|00003c10| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 20 22 |" (inter|active "|
|00003c20| 2a 72 22 29 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |*r") (by|te-code |
|00003c30| 22 ca 88 08 c1 3d 3f 85 | 19 00 0a cb 3d 3f 85 19 |"....=?.|....=?..|
|00003c40| 00 0b 0c 3d 3f 85 19 00 | 0d 3f 83 40 00 0b 0c 5d |...=?...|.?.@...]|
|00003c50| 0b 0c 5e 5a cc 5c 5c 1e | 06 cd 0b 0c 5c 22 88 ce |..^Z.\\.|....\"..|
|00003c60| 08 40 40 21 88 cb 89 16 | 07 88 0e 09 89 16 08 29 |.@@!....|.......)|
|00003c70| 82 49 00 cf 0b 0c 5c 22 | 88 cd 0b 0c 5c 22 87 22 |.I....\"|....\"."|
|00003c80| 20 5b 62 75 66 66 65 72 | 2d 75 6e 64 6f 2d 6c 69 | [buffer|-undo-li|
|00003c90| 73 74 20 74 20 6c 61 73 | 74 2d 63 6f 6d 6d 61 6e |st t las|t-comman|
|00003ca0| 64 20 62 65 67 20 65 6e | 64 20 62 75 66 66 65 72 |d beg en|d buffer|
|00003cb0| 2d 72 65 61 64 2d 6f 6e | 6c 79 20 75 6e 64 6f 2d |-read-on|ly undo-|
|00003cc0| 68 69 67 68 2d 74 68 72 | 65 73 68 6f 6c 64 20 74 |high-thr|eshold t|
|00003cd0| 68 69 73 2d 63 6f 6d 6d | 61 6e 64 20 6b 69 6c 6c |his-comm|and kill|
|00003ce0| 2d 72 69 6e 67 2d 79 61 | 6e 6b 2d 70 6f 69 6e 74 |-ring-ya|nk-point|
|00003cf0| 65 72 20 6b 69 6c 6c 2d | 72 69 6e 67 20 6e 69 6c |er kill-|ring nil|
|00003d00| 20 6b 69 6c 6c 2d 72 65 | 67 69 6f 6e 20 31 30 30 | kill-re|gion 100|
|00003d10| 20 64 65 6c 65 74 65 2d | 72 65 67 69 6f 6e 20 6b | delete-|region k|
|00003d20| 69 6c 6c 2d 61 64 64 20 | 63 6f 70 79 2d 72 65 67 |ill-add |copy-reg|
|00003d30| 69 6f 6e 2d 61 73 2d 6b | 69 6c 6c 5d 20 36 29 29 |ion-as-k|ill] 6))|
|00003d40| 0a 0a 28 66 73 65 74 20 | 28 71 75 6f 74 65 20 6b |..(fset |(quote k|
|00003d50| 69 6c 6c 2d 72 69 6e 67 | 2d 73 61 76 65 29 20 28 |ill-ring|-save) (|
|00003d60| 71 75 6f 74 65 20 63 6f | 70 79 2d 72 65 67 69 6f |quote co|py-regio|
|00003d70| 6e 2d 61 73 2d 6b 69 6c | 6c 29 29 0a 0a 28 64 65 |n-as-kil|l))..(de|
|00003d80| 66 75 6e 20 63 6f 70 79 | 2d 72 65 67 69 6f 6e 2d |fun copy|-region-|
|00003d90| 61 73 2d 6b 69 6c 6c 20 | 28 62 65 67 20 65 6e 64 |as-kill |(beg end|
|00003da0| 29 20 22 5c 0a 53 61 76 | 65 20 74 68 65 20 72 65 |) "\.Sav|e the re|
|00003db0| 67 69 6f 6e 20 61 73 20 | 69 66 20 6b 69 6c 6c 65 |gion as |if kille|
|00003dc0| 64 2c 20 62 75 74 20 64 | 6f 6e 27 74 20 6b 69 6c |d, but d|on't kil|
|00003dd0| 6c 20 69 74 2e 22 20 28 | 69 6e 74 65 72 61 63 74 |l it." (|interact|
|00003de0| 69 76 65 20 22 72 22 29 | 20 28 62 79 74 65 2d 63 |ive "r")| (byte-c|
|00003df0| 6f 64 65 20 22 c6 88 08 | c7 3d 85 0b 00 c8 20 3f |ode "...|.=.... ?|
|00003e00| 83 1a 00 c9 ca 09 0a 5c | 22 0a 09 57 5c 22 82 20 |.......\|"..W\". |
|00003e10| 00 cb ca 09 0a 5c 22 21 | 88 c7 89 13 88 0d 89 14 |.....\"!|........|
|00003e20| 87 22 20 5b 6c 61 73 74 | 2d 63 6f 6d 6d 61 6e 64 |." [last|-command|
|00003e30| 20 62 65 67 20 65 6e 64 | 20 74 68 69 73 2d 63 6f | beg end| this-co|
|00003e40| 6d 6d 61 6e 64 20 6b 69 | 6c 6c 2d 72 69 6e 67 2d |mmand ki|ll-ring-|
|00003e50| 79 61 6e 6b 2d 70 6f 69 | 6e 74 65 72 20 6b 69 6c |yank-poi|nter kil|
|00003e60| 6c 2d 72 69 6e 67 20 6e | 69 6c 20 6b 69 6c 6c 2d |l-ring n|il kill-|
|00003e70| 72 65 67 69 6f 6e 20 63 | 68 65 63 6b 2d 63 6c 69 |region c|heck-cli|
|00003e80| 70 62 6f 61 72 64 20 6b | 69 6c 6c 2d 61 70 70 65 |pboard k|ill-appe|
|00003e90| 6e 64 20 62 75 66 66 65 | 72 2d 73 75 62 73 74 72 |nd buffe|r-substr|
|00003ea0| 69 6e 67 20 6b 69 6c 6c | 2d 61 64 64 5d 20 37 29 |ing kill|-add] 7)|
|00003eb0| 29 0a 0a 28 64 65 66 75 | 6e 20 61 70 70 65 6e 64 |)..(defu|n append|
|00003ec0| 2d 6e 65 78 74 2d 6b 69 | 6c 6c 20 6e 69 6c 20 22 |-next-ki|ll nil "|
|00003ed0| 5c 0a 43 61 75 73 65 20 | 66 6f 6c 6c 6f 77 69 6e |\.Cause |followin|
|00003ee0| 67 20 63 6f 6d 6d 61 6e | 64 2c 20 69 66 20 6b 69 |g comman|d, if ki|
|00003ef0| 6c 6c 2c 20 74 6f 20 61 | 70 70 65 6e 64 20 74 6f |ll, to a|ppend to|
|00003f00| 20 70 72 65 76 69 6f 75 | 73 20 6b 69 6c 6c 2e 22 | previou|s kill."|
|00003f10| 20 28 69 6e 74 65 72 61 | 63 74 69 76 65 29 20 28 | (intera|ctive) (|
|00003f20| 62 79 74 65 2d 63 6f 64 | 65 20 22 c2 88 74 83 0c |byte-cod|e "..t..|
|00003f30| 00 c3 89 10 82 0f 00 c3 | 89 11 87 22 20 5b 74 68 |........|..." [th|
|00003f40| 69 73 2d 63 6f 6d 6d 61 | 6e 64 20 6c 61 73 74 2d |is-comma|nd last-|
|00003f50| 63 6f 6d 6d 61 6e 64 20 | 6e 69 6c 20 6b 69 6c 6c |command |nil kill|
|00003f60| 2d 72 65 67 69 6f 6e 5d | 20 32 29 29 0a 0a 28 64 |-region]| 2))..(d|
|00003f70| 65 66 75 6e 20 72 6f 74 | 61 74 65 2d 79 61 6e 6b |efun rot|ate-yank|
|00003f80| 2d 70 6f 69 6e 74 65 72 | 20 28 61 72 67 29 20 22 |-pointer| (arg) "|
|00003f90| 5c 0a 52 6f 74 61 74 65 | 20 74 68 65 20 79 61 6e |\.Rotate| the yan|
|00003fa0| 6b 69 6e 67 20 70 6f 69 | 6e 74 20 69 6e 20 74 68 |king poi|nt in th|
|00003fb0| 65 20 6b 69 6c 6c 20 72 | 69 6e 67 2e 22 20 28 69 |e kill r|ing." (i|
|00003fc0| 6e 74 65 72 61 63 74 69 | 76 65 20 22 70 22 29 20 |nteracti|ve "p") |
|00003fd0| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c4 88 09 47 |(byte-co|de "...G|
|00003fe0| 18 c5 08 21 83 11 00 c6 | c7 21 82 1f 00 c8 c9 0b |...!....|.!......|
|00003ff0| 08 0a 47 5a 5c 5c 08 5c | 22 09 5c 22 89 12 29 87 |..GZ\\.\|".\"..).|
|00004000| 22 20 5b 6c 65 6e 67 74 | 68 20 6b 69 6c 6c 2d 72 |" [lengt|h kill-r|
|00004010| 69 6e 67 20 6b 69 6c 6c | 2d 72 69 6e 67 2d 79 61 |ing kill|-ring-ya|
|00004020| 6e 6b 2d 70 6f 69 6e 74 | 65 72 20 61 72 67 20 6e |nk-point|er arg n|
|00004030| 69 6c 20 7a 65 72 6f 70 | 20 65 72 72 6f 72 20 22 |il zerop| error "|
|00004040| 4b 69 6c 6c 20 72 69 6e | 67 20 69 73 20 65 6d 70 |Kill rin|g is emp|
|00004050| 74 79 22 20 6e 74 68 63 | 64 72 20 25 5d 20 37 29 |ty" nthc|dr %] 7)|
|00004060| 29 0a 0a 28 64 65 66 75 | 6e 20 79 61 6e 6b 2d 70 |)..(defu|n yank-p|
|00004070| 6f 70 20 28 61 72 67 29 | 20 22 5c 0a 52 65 70 6c |op (arg)| "\.Repl|
|00004080| 61 63 65 20 6a 75 73 74 | 2d 79 61 6e 6b 65 64 20 |ace just|-yanked |
|00004090| 73 74 72 65 74 63 68 20 | 6f 66 20 6b 69 6c 6c 65 |stretch |of kille|
|000040a0| 64 2d 74 65 78 74 20 77 | 69 74 68 20 61 20 64 69 |d-text w|ith a di|
|000040b0| 66 66 65 72 65 6e 74 20 | 73 74 72 65 74 63 68 2e |fferent |stretch.|
|000040c0| 0a 54 68 69 73 20 63 6f | 6d 6d 61 6e 64 20 69 73 |.This co|mmand is|
|000040d0| 20 61 6c 6c 6f 77 65 64 | 20 6f 6e 6c 79 20 69 6d | allowed| only im|
|000040e0| 6d 65 64 69 61 74 65 6c | 79 20 61 66 74 65 72 20 |mediatel|y after |
|000040f0| 61 20 20 79 61 6e 6b 20 | 20 6f 72 20 61 20 20 79 |a yank | or a y|
|00004100| 61 6e 6b 2d 70 6f 70 2e | 0a 41 74 20 73 75 63 68 |ank-pop.|.At such|
|00004110| 20 61 20 74 69 6d 65 2c | 20 74 68 65 20 72 65 67 | a time,| the reg|
|00004120| 69 6f 6e 20 63 6f 6e 74 | 61 69 6e 73 20 61 20 73 |ion cont|ains a s|
|00004130| 74 72 65 74 63 68 20 6f | 66 20 72 65 69 6e 73 65 |tretch o|f reinse|
|00004140| 72 74 65 64 0a 70 72 65 | 76 69 6f 75 73 6c 79 2d |rted.pre|viously-|
|00004150| 6b 69 6c 6c 65 64 20 74 | 65 78 74 2e 20 20 79 61 |killed t|ext. ya|
|00004160| 6e 6b 2d 70 6f 70 20 20 | 64 65 6c 65 74 65 73 20 |nk-pop |deletes |
|00004170| 74 68 61 74 20 74 65 78 | 74 20 61 6e 64 20 69 6e |that tex|t and in|
|00004180| 73 65 72 74 73 20 69 6e | 20 69 74 73 0a 70 6c 61 |serts in| its.pla|
|00004190| 63 65 20 61 20 64 69 66 | 66 65 72 65 6e 74 20 73 |ce a dif|ferent s|
|000041a0| 74 72 65 74 63 68 20 6f | 66 20 6b 69 6c 6c 65 64 |tretch o|f killed|
|000041b0| 20 74 65 78 74 2e 0a 0a | 57 69 74 68 20 6e 6f 20 | text...|With no |
|000041c0| 61 72 67 75 6d 65 6e 74 | 2c 20 74 68 65 20 70 72 |argument|, the pr|
|000041d0| 65 76 69 6f 75 73 20 6b | 69 6c 6c 20 69 73 20 69 |evious k|ill is i|
|000041e0| 6e 73 65 72 74 65 64 2e | 0a 57 69 74 68 20 61 72 |nserted.|.With ar|
|000041f0| 67 75 6d 65 6e 74 20 6e | 2c 20 74 68 65 20 6e 27 |gument n|, the n'|
|00004200| 74 68 20 70 72 65 76 69 | 6f 75 73 20 6b 69 6c 6c |th previ|ous kill|
|00004210| 20 69 73 20 69 6e 73 65 | 72 74 65 64 2e 0a 49 66 | is inse|rted..If|
|00004220| 20 6e 20 69 73 20 6e 65 | 67 61 74 69 76 65 2c 20 | n is ne|gative, |
|00004230| 74 68 69 73 20 69 73 20 | 61 20 6d 6f 72 65 20 72 |this is |a more r|
|00004240| 65 63 65 6e 74 20 6b 69 | 6c 6c 2e 0a 0a 54 68 65 |ecent ki|ll...The|
|00004250| 20 73 65 71 75 65 6e 63 | 65 20 6f 66 20 6b 69 6c | sequenc|e of kil|
|00004260| 6c 73 20 77 72 61 70 73 | 20 61 72 6f 75 6e 64 2c |ls wraps| around,|
|00004270| 20 73 6f 20 74 68 61 74 | 20 61 66 74 65 72 20 74 | so that| after t|
|00004280| 68 65 20 6f 6c 64 65 73 | 74 20 6f 6e 65 0a 63 6f |he oldes|t one.co|
|00004290| 6d 65 73 20 74 68 65 20 | 6e 65 77 65 73 74 20 6f |mes the |newest o|
|000042a0| 6e 65 2e 22 20 28 69 6e | 74 65 72 61 63 74 69 76 |ne." (in|teractiv|
|000042b0| 65 20 22 2a 70 22 29 20 | 28 62 79 74 65 2d 63 6f |e "*p") |(byte-co|
|000042c0| 64 65 20 22 c5 88 08 c6 | 3d 3f 85 0c 00 c7 c8 21 |de "....|=?.....!|
|000042d0| 88 c6 89 11 88 60 c9 20 | 57 1a ca 60 c9 20 5c 22 |.....`. |W..`. \"|
|000042e0| 88 cb 0b 21 88 cc 60 21 | 88 0c 40 63 88 0a 85 2e |...!..`!|..@c....|
|000042f0| 00 cd 20 29 87 22 20 5b | 6c 61 73 74 2d 63 6f 6d |.. )." [|last-com|
|00004300| 6d 61 6e 64 20 74 68 69 | 73 2d 63 6f 6d 6d 61 6e |mand thi|s-comman|
|00004310| 64 20 62 65 66 6f 72 65 | 20 61 72 67 20 6b 69 6c |d before| arg kil|
|00004320| 6c 2d 72 69 6e 67 2d 79 | 61 6e 6b 2d 70 6f 69 6e |l-ring-y|ank-poin|
|00004330| 74 65 72 20 6e 69 6c 20 | 79 61 6e 6b 20 65 72 72 |ter nil |yank err|
|00004340| 6f 72 20 22 50 72 65 76 | 69 6f 75 73 20 63 6f 6d |or "Prev|ious com|
|00004350| 6d 61 6e 64 20 77 61 73 | 20 6e 6f 74 20 61 20 79 |mand was| not a y|
|00004360| 61 6e 6b 22 20 6d 61 72 | 6b 20 64 65 6c 65 74 65 |ank" mar|k delete|
|00004370| 2d 72 65 67 69 6f 6e 20 | 72 6f 74 61 74 65 2d 79 |-region |rotate-y|
|00004380| 61 6e 6b 2d 70 6f 69 6e | 74 65 72 20 73 65 74 2d |ank-poin|ter set-|
|00004390| 6d 61 72 6b 20 65 78 63 | 68 61 6e 67 65 2d 70 6f |mark exc|hange-po|
|000043a0| 69 6e 74 2d 61 6e 64 2d | 6d 61 72 6b 5d 20 38 29 |int-and-|mark] 8)|
|000043b0| 29 0a 0a 28 64 65 66 75 | 6e 20 79 61 6e 6b 20 28 |)..(defu|n yank (|
|000043c0| 26 6f 70 74 69 6f 6e 61 | 6c 20 61 72 67 29 20 22 |&optiona|l arg) "|
|000043d0| 5c 0a 52 65 69 6e 73 65 | 72 74 20 74 68 65 20 6c |\.Reinse|rt the l|
|000043e0| 61 73 74 20 73 74 72 65 | 74 63 68 20 6f 66 20 6b |ast stre|tch of k|
|000043f0| 69 6c 6c 65 64 20 74 65 | 78 74 2e 0a 4d 6f 72 65 |illed te|xt..More|
|00004400| 20 70 72 65 63 69 73 65 | 6c 79 2c 20 72 65 69 6e | precise|ly, rein|
|00004410| 73 65 72 74 20 74 68 65 | 20 73 74 72 65 74 63 68 |sert the| stretch|
|00004420| 20 6f 66 20 6b 69 6c 6c | 65 64 20 74 65 78 74 20 | of kill|ed text |
|00004430| 6d 6f 73 74 20 72 65 63 | 65 6e 74 6c 79 0a 6b 69 |most rec|ently.ki|
|00004440| 6c 6c 65 64 20 4f 52 20 | 79 61 6e 6b 65 64 2e 0a |lled OR |yanked..|
|00004450| 57 69 74 68 20 6a 75 73 | 74 20 43 2d 55 20 61 73 |With jus|t C-U as|
|00004460| 20 61 72 67 75 6d 65 6e | 74 2c 20 73 61 6d 65 20 | argumen|t, same |
|00004470| 62 75 74 20 70 75 74 20 | 70 6f 69 6e 74 20 69 6e |but put |point in|
|00004480| 20 66 72 6f 6e 74 20 28 | 61 6e 64 20 6d 61 72 6b | front (|and mark|
|00004490| 20 61 74 20 65 6e 64 29 | 2e 0a 57 69 74 68 20 61 | at end)|..With a|
|000044a0| 72 67 75 6d 65 6e 74 20 | 6e 2c 20 72 65 69 6e 73 |rgument |n, reins|
|000044b0| 65 72 74 20 74 68 65 20 | 6e 74 68 20 6d 6f 73 74 |ert the |nth most|
|000044c0| 20 72 65 63 65 6e 74 6c | 79 20 6b 69 6c 6c 65 64 | recentl|y killed|
|000044d0| 20 73 74 72 65 74 63 68 | 20 6f 66 20 6b 69 6c 6c | stretch| of kill|
|000044e0| 65 64 0a 74 65 78 74 2e | 0a 53 65 65 20 61 6c 73 |ed.text.|.See als|
|000044f0| 6f 20 74 68 65 20 63 6f | 6d 6d 61 6e 64 20 5c 5c |o the co|mmand \\|
|00004500| 5b 79 61 6e 6b 2d 70 6f | 70 5d 2e 22 20 28 69 6e |[yank-po|p]." (in|
|00004510| 74 65 72 61 63 74 69 76 | 65 20 22 2a 50 22 29 20 |teractiv|e "*P") |
|00004520| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c2 88 c3 20 |(byte-co|de "... |
|00004530| 88 c4 08 3c 83 0f 00 c5 | 82 1b 00 08 c6 3d 83 19 |...<....|.....=..|
|00004540| 00 c7 82 1b 00 08 53 21 | 88 c8 60 21 88 09 40 63 |......S!|..`!..@c|
|00004550| 88 08 3a 85 2c 00 c9 20 | 87 22 20 5b 61 72 67 20 |..:.,.. |." [arg |
|00004560| 6b 69 6c 6c 2d 72 69 6e | 67 2d 79 61 6e 6b 2d 70 |kill-rin|g-yank-p|
|00004570| 6f 69 6e 74 65 72 20 6e | 69 6c 20 63 68 65 63 6b |ointer n|il check|
|00004580| 2d 63 6c 69 70 62 6f 61 | 72 64 20 72 6f 74 61 74 |-clipboa|rd rotat|
|00004590| 65 2d 79 61 6e 6b 2d 70 | 6f 69 6e 74 65 72 20 30 |e-yank-p|ointer 0|
|000045a0| 20 2d 20 2d 31 20 70 75 | 73 68 2d 6d 61 72 6b 20 | - -1 pu|sh-mark |
|000045b0| 65 78 63 68 61 6e 67 65 | 2d 70 6f 69 6e 74 2d 61 |exchange|-point-a|
|000045c0| 6e 64 2d 6d 61 72 6b 5d | 20 35 29 29 0a 0a 28 64 |nd-mark]| 5))..(d|
|000045d0| 65 66 75 6e 20 69 6e 73 | 65 72 74 2d 62 75 66 66 |efun ins|ert-buff|
|000045e0| 65 72 20 28 62 75 66 66 | 65 72 29 20 22 5c 0a 49 |er (buff|er) "\.I|
|000045f0| 6e 73 65 72 74 20 61 66 | 74 65 72 20 70 6f 69 6e |nsert af|ter poin|
|00004600| 74 20 74 68 65 20 63 6f | 6e 74 65 6e 74 73 20 6f |t the co|ntents o|
|00004610| 66 20 42 55 46 46 45 52 | 2e 0a 50 75 74 73 20 6d |f BUFFER|..Puts m|
|00004620| 61 72 6b 20 61 66 74 65 | 72 20 74 68 65 20 69 6e |ark afte|r the in|
|00004630| 73 65 72 74 65 64 20 74 | 65 78 74 2e 0a 42 55 46 |serted t|ext..BUF|
|00004640| 46 45 52 20 6d 61 79 20 | 62 65 20 61 20 62 75 66 |FER may |be a buf|
|00004650| 66 65 72 20 6f 72 20 61 | 20 62 75 66 66 65 72 20 |fer or a| buffer |
|00004660| 6e 61 6d 65 2e 22 20 28 | 69 6e 74 65 72 61 63 74 |name." (|interact|
|00004670| 69 76 65 20 22 2a 62 49 | 6e 73 65 72 74 20 62 75 |ive "*bI|nsert bu|
|00004680| 66 66 65 72 3a 20 22 29 | 20 28 62 79 74 65 2d 63 |ffer: ")| (byte-c|
|00004690| 6f 64 65 20 22 c4 88 c5 | 08 21 86 0d 00 c6 08 21 |ode "...|.!.....!|
|000046a0| 89 10 88 c4 c4 c4 1b 1a | 19 8a 8a 08 71 88 65 11 |........|....q.e.|
|000046b0| 64 89 12 29 88 c7 08 09 | 0a 23 88 60 89 13 29 88 |d..)....|.#.`..).|
|000046c0| c8 0b 21 2b 87 22 20 5b | 62 75 66 66 65 72 20 73 |..!+." [|buffer s|
|000046d0| 74 61 72 74 20 65 6e 64 | 20 6e 65 77 6d 61 72 6b |tart end| newmark|
|000046e0| 20 6e 69 6c 20 62 75 66 | 66 65 72 70 20 67 65 74 | nil buf|ferp get|
|000046f0| 2d 62 75 66 66 65 72 20 | 69 6e 73 65 72 74 2d 62 |-buffer |insert-b|
|00004700| 75 66 66 65 72 2d 73 75 | 62 73 74 72 69 6e 67 20 |uffer-su|bstring |
|00004710| 70 75 73 68 2d 6d 61 72 | 6b 5d 20 36 29 29 0a 0a |push-mar|k] 6))..|
|00004720| 28 64 65 66 75 6e 20 61 | 70 70 65 6e 64 2d 74 6f |(defun a|ppend-to|
|00004730| 2d 62 75 66 66 65 72 20 | 28 62 75 66 66 65 72 20 |-buffer |(buffer |
|00004740| 73 74 61 72 74 20 65 6e | 64 29 20 22 5c 0a 41 70 |start en|d) "\.Ap|
|00004750| 70 65 6e 64 20 74 6f 20 | 73 70 65 63 69 66 69 65 |pend to |specifie|
|00004760| 64 20 62 75 66 66 65 72 | 20 74 68 65 20 74 65 78 |d buffer| the tex|
|00004770| 74 20 6f 66 20 74 68 65 | 20 72 65 67 69 6f 6e 2e |t of the| region.|
|00004780| 0a 49 74 20 69 73 20 69 | 6e 73 65 72 74 65 64 20 |.It is i|nserted |
|00004790| 69 6e 74 6f 20 74 68 61 | 74 20 62 75 66 66 65 72 |into tha|t buffer|
|000047a0| 20 62 65 66 6f 72 65 20 | 69 74 73 20 70 6f 69 6e | before |its poin|
|000047b0| 74 2e 0a 0a 57 68 65 6e | 20 63 61 6c 6c 69 6e 67 |t...When| calling|
|000047c0| 20 66 72 6f 6d 20 61 20 | 70 72 6f 67 72 61 6d 2c | from a |program,|
|000047d0| 20 67 69 76 65 20 74 68 | 72 65 65 20 61 72 67 75 | give th|ree argu|
|000047e0| 6d 65 6e 74 73 3a 0a 61 | 20 62 75 66 66 65 72 20 |ments:.a| buffer |
|000047f0| 6f 72 20 74 68 65 20 6e | 61 6d 65 20 6f 66 20 6f |or the n|ame of o|
|00004800| 6e 65 2c 20 61 6e 64 20 | 74 77 6f 20 63 68 61 72 |ne, and |two char|
|00004810| 61 63 74 65 72 20 6e 75 | 6d 62 65 72 73 0a 73 70 |acter nu|mbers.sp|
|00004820| 65 63 69 66 79 69 6e 67 | 20 74 68 65 20 70 6f 72 |ecifying| the por|
|00004830| 74 69 6f 6e 20 6f 66 20 | 74 68 65 20 63 75 72 72 |tion of |the curr|
|00004840| 65 6e 74 20 62 75 66 66 | 65 72 20 74 6f 20 62 65 |ent buff|er to be|
|00004850| 20 63 6f 70 69 65 64 2e | 22 20 28 69 6e 74 65 72 | copied.|" (inter|
|00004860| 61 63 74 69 76 65 20 22 | 42 41 70 70 65 6e 64 20 |active "|BAppend |
|00004870| 74 6f 20 62 75 66 66 65 | 72 3a 20 0a 72 22 29 20 |to buffe|r: .r") |
|00004880| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c4 88 70 18 |(byte-co|de "..p.|
|00004890| 8a c5 09 21 71 88 c6 08 | 0a 0b 23 29 29 87 22 20 |...!q...|..#))." |
|000048a0| 5b 6f 6c 64 62 75 66 20 | 62 75 66 66 65 72 20 73 |[oldbuf |buffer s|
|000048b0| 74 61 72 74 20 65 6e 64 | 20 6e 69 6c 20 67 65 74 |tart end| nil get|
|000048c0| 2d 62 75 66 66 65 72 2d | 63 72 65 61 74 65 20 69 |-buffer-|create i|
|000048d0| 6e 73 65 72 74 2d 62 75 | 66 66 65 72 2d 73 75 62 |nsert-bu|ffer-sub|
|000048e0| 73 74 72 69 6e 67 5d 20 | 35 29 29 0a 0a 28 64 65 |string] |5))..(de|
|000048f0| 66 75 6e 20 70 72 65 70 | 65 6e 64 2d 74 6f 2d 62 |fun prep|end-to-b|
|00004900| 75 66 66 65 72 20 28 62 | 75 66 66 65 72 20 73 74 |uffer (b|uffer st|
|00004910| 61 72 74 20 65 6e 64 29 | 20 22 5c 0a 50 72 65 70 |art end)| "\.Prep|
|00004920| 65 6e 64 20 74 6f 20 73 | 70 65 63 69 66 69 65 64 |end to s|pecified|
|00004930| 20 62 75 66 66 65 72 20 | 74 68 65 20 74 65 78 74 | buffer |the text|
|00004940| 20 6f 66 20 74 68 65 20 | 72 65 67 69 6f 6e 2e 0a | of the |region..|
|00004950| 49 74 20 69 73 20 69 6e | 73 65 72 74 65 64 20 69 |It is in|serted i|
|00004960| 6e 74 6f 20 74 68 61 74 | 20 62 75 66 66 65 72 20 |nto that| buffer |
|00004970| 61 66 74 65 72 20 69 74 | 73 20 70 6f 69 6e 74 2e |after it|s point.|
|00004980| 0a 0a 57 68 65 6e 20 63 | 61 6c 6c 69 6e 67 20 66 |..When c|alling f|
|00004990| 72 6f 6d 20 61 20 70 72 | 6f 67 72 61 6d 2c 20 67 |rom a pr|ogram, g|
|000049a0| 69 76 65 20 74 68 72 65 | 65 20 61 72 67 75 6d 65 |ive thre|e argume|
|000049b0| 6e 74 73 3a 0a 61 20 62 | 75 66 66 65 72 20 6f 72 |nts:.a b|uffer or|
|000049c0| 20 74 68 65 20 6e 61 6d | 65 20 6f 66 20 6f 6e 65 | the nam|e of one|
|000049d0| 2c 20 61 6e 64 20 74 77 | 6f 20 63 68 61 72 61 63 |, and tw|o charac|
|000049e0| 74 65 72 20 6e 75 6d 62 | 65 72 73 0a 73 70 65 63 |ter numb|ers.spec|
|000049f0| 69 66 79 69 6e 67 20 74 | 68 65 20 70 6f 72 74 69 |ifying t|he porti|
|00004a00| 6f 6e 20 6f 66 20 74 68 | 65 20 63 75 72 72 65 6e |on of th|e curren|
|00004a10| 74 20 62 75 66 66 65 72 | 20 74 6f 20 62 65 20 63 |t buffer| to be c|
|00004a20| 6f 70 69 65 64 2e 22 20 | 28 69 6e 74 65 72 61 63 |opied." |(interac|
|00004a30| 74 69 76 65 20 22 42 50 | 72 65 70 65 6e 64 20 74 |tive "BP|repend t|
|00004a40| 6f 20 62 75 66 66 65 72 | 3a 20 0a 72 22 29 20 28 |o buffer|: .r") (|
|00004a50| 62 79 74 65 2d 63 6f 64 | 65 20 22 c4 88 70 18 8a |byte-cod|e "..p..|
|00004a60| c5 09 21 71 88 8a c6 08 | 0a 0b 23 29 29 29 87 22 |..!q....|..#)))."|
|00004a70| 20 5b 6f 6c 64 62 75 66 | 20 62 75 66 66 65 72 20 | [oldbuf| buffer |
|00004a80| 73 74 61 72 74 20 65 6e | 64 20 6e 69 6c 20 67 65 |start en|d nil ge|
|00004a90| 74 2d 62 75 66 66 65 72 | 2d 63 72 65 61 74 65 20 |t-buffer|-create |
|00004aa0| 69 6e 73 65 72 74 2d 62 | 75 66 66 65 72 2d 73 75 |insert-b|uffer-su|
|00004ab0| 62 73 74 72 69 6e 67 5d | 20 35 29 29 0a 0a 28 64 |bstring]| 5))..(d|
|00004ac0| 65 66 75 6e 20 63 6f 70 | 79 2d 74 6f 2d 62 75 66 |efun cop|y-to-buf|
|00004ad0| 66 65 72 20 28 62 75 66 | 66 65 72 20 73 74 61 72 |fer (buf|fer star|
|00004ae0| 74 20 65 6e 64 29 20 22 | 5c 0a 43 6f 70 79 20 74 |t end) "|\.Copy t|
|00004af0| 6f 20 73 70 65 63 69 66 | 69 65 64 20 62 75 66 66 |o specif|ied buff|
|00004b00| 65 72 20 74 68 65 20 74 | 65 78 74 20 6f 66 20 74 |er the t|ext of t|
|00004b10| 68 65 20 72 65 67 69 6f | 6e 2e 0a 49 74 20 69 73 |he regio|n..It is|
|00004b20| 20 69 6e 73 65 72 74 65 | 64 20 69 6e 74 6f 20 74 | inserte|d into t|
|00004b30| 68 61 74 20 62 75 66 66 | 65 72 2c 20 72 65 70 6c |hat buff|er, repl|
|00004b40| 61 63 69 6e 67 20 65 78 | 69 73 74 69 6e 67 20 74 |acing ex|isting t|
|00004b50| 65 78 74 20 74 68 65 72 | 65 2e 0a 0a 57 68 65 6e |ext ther|e...When|
|00004b60| 20 63 61 6c 6c 69 6e 67 | 20 66 72 6f 6d 20 61 20 | calling| from a |
|00004b70| 70 72 6f 67 72 61 6d 2c | 20 67 69 76 65 20 74 68 |program,| give th|
|00004b80| 72 65 65 20 61 72 67 75 | 6d 65 6e 74 73 3a 0a 61 |ree argu|ments:.a|
|00004b90| 20 62 75 66 66 65 72 20 | 6f 72 20 74 68 65 20 6e | buffer |or the n|
|00004ba0| 61 6d 65 20 6f 66 20 6f | 6e 65 2c 20 61 6e 64 20 |ame of o|ne, and |
|00004bb0| 74 77 6f 20 63 68 61 72 | 61 63 74 65 72 20 6e 75 |two char|acter nu|
|00004bc0| 6d 62 65 72 73 0a 73 70 | 65 63 69 66 79 69 6e 67 |mbers.sp|ecifying|
|00004bd0| 20 74 68 65 20 70 6f 72 | 74 69 6f 6e 20 6f 66 20 | the por|tion of |
|00004be0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 62 75 66 66 |the curr|ent buff|
|00004bf0| 65 72 20 74 6f 20 62 65 | 20 63 6f 70 69 65 64 2e |er to be| copied.|
|00004c00| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 20 22 |" (inter|active "|
|00004c10| 42 43 6f 70 79 20 74 6f | 20 62 75 66 66 65 72 3a |BCopy to| buffer:|
|00004c20| 20 0a 72 22 29 20 28 62 | 79 74 65 2d 63 6f 64 65 | .r") (b|yte-code|
|00004c30| 20 22 c4 88 70 18 8a c5 | 09 21 71 88 c6 20 88 8a | "..p...|.!q.. ..|
|00004c40| c7 08 0a 0b 23 29 29 29 | 87 22 20 5b 6f 6c 64 62 |....#)))|." [oldb|
|00004c50| 75 66 20 62 75 66 66 65 | 72 20 73 74 61 72 74 20 |uf buffe|r start |
|00004c60| 65 6e 64 20 6e 69 6c 20 | 67 65 74 2d 62 75 66 66 |end nil |get-buff|
|00004c70| 65 72 2d 63 72 65 61 74 | 65 20 65 72 61 73 65 2d |er-creat|e erase-|
|00004c80| 62 75 66 66 65 72 20 69 | 6e 73 65 72 74 2d 62 75 |buffer i|nsert-bu|
|00004c90| 66 66 65 72 2d 73 75 62 | 73 74 72 69 6e 67 5d 20 |ffer-sub|string] |
|00004ca0| 36 29 29 0a 0a 28 64 65 | 66 75 6e 20 6d 61 72 6b |6))..(de|fun mark|
|00004cb0| 20 6e 69 6c 20 22 5c 0a | 52 65 74 75 72 6e 20 74 | nil "\.|Return t|
|00004cc0| 68 69 73 20 62 75 66 66 | 65 72 27 73 20 6d 61 72 |his buff|er's mar|
|00004cd0| 6b 20 76 61 6c 75 65 20 | 61 73 20 69 6e 74 65 67 |k value |as integ|
|00004ce0| 65 72 2c 20 6f 72 20 6e | 69 6c 20 69 66 20 6e 6f |er, or n|il if no|
|00004cf0| 20 6d 61 72 6b 2e 0a 49 | 66 20 79 6f 75 20 61 72 | mark..I|f you ar|
|00004d00| 65 20 75 73 69 6e 67 20 | 74 68 69 73 20 69 6e 20 |e using |this in |
|00004d10| 61 6e 20 65 64 69 74 69 | 6e 67 20 63 6f 6d 6d 61 |an editi|ng comma|
|00004d20| 6e 64 2c 20 79 6f 75 20 | 61 72 65 20 6d 6f 73 74 |nd, you |are most|
|00004d30| 20 6c 69 6b 65 6c 79 20 | 6d 61 6b 69 6e 67 0a 61 | likely |making.a|
|00004d40| 20 6d 69 73 74 61 6b 65 | 3b 20 73 65 65 20 74 68 | mistake|; see th|
|00004d50| 65 20 64 6f 63 75 6d 65 | 6e 74 61 74 69 6f 6e 20 |e docume|ntation |
|00004d60| 6f 66 20 60 73 65 74 2d | 6d 61 72 6b 27 2e 22 20 |of `set-|mark'." |
|00004d70| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c0 c1 20 21 |(byte-co|de ".. !|
|00004d80| 87 22 20 5b 6d 61 72 6b | 65 72 2d 70 6f 73 69 74 |." [mark|er-posit|
|00004d90| 69 6f 6e 20 6d 61 72 6b | 2d 6d 61 72 6b 65 72 5d |ion mark|-marker]|
|00004da0| 20 33 29 29 0a 0a 28 64 | 65 66 75 6e 20 73 65 74 | 3))..(d|efun set|
|00004db0| 2d 6d 61 72 6b 20 28 70 | 6f 73 29 20 22 5c 0a 53 |-mark (p|os) "\.S|
|00004dc0| 65 74 20 74 68 69 73 20 | 62 75 66 66 65 72 27 73 |et this |buffer's|
|00004dd0| 20 6d 61 72 6b 20 74 6f | 20 50 4f 53 2e 20 20 44 | mark to| POS. D|
|00004de0| 6f 6e 27 74 20 75 73 65 | 20 74 68 69 73 20 66 75 |on't use| this fu|
|00004df0| 6e 63 74 69 6f 6e 21 0a | 54 68 61 74 20 69 73 20 |nction!.|That is |
|00004e00| 74 6f 20 73 61 79 2c 20 | 64 6f 6e 27 74 20 75 73 |to say, |don't us|
|00004e10| 65 20 74 68 69 73 20 66 | 75 6e 63 74 69 6f 6e 20 |e this f|unction |
|00004e20| 75 6e 6c 65 73 73 20 79 | 6f 75 20 77 61 6e 74 0a |unless y|ou want.|
|00004e30| 74 68 65 20 75 73 65 72 | 20 74 6f 20 73 65 65 20 |the user| to see |
|00004e40| 74 68 61 74 20 74 68 65 | 20 6d 61 72 6b 20 68 61 |that the| mark ha|
|00004e50| 73 20 6d 6f 76 65 64 2c | 20 61 6e 64 20 79 6f 75 |s moved,| and you|
|00004e60| 20 77 61 6e 74 20 74 68 | 65 20 70 72 65 76 69 6f | want th|e previo|
|00004e70| 75 73 0a 6d 61 72 6b 20 | 70 6f 73 69 74 69 6f 6e |us.mark |position|
|00004e80| 20 74 6f 20 62 65 20 6c | 6f 73 74 2e 0a 0a 4e 6f | to be l|ost...No|
|00004e90| 72 6d 61 6c 6c 79 2c 20 | 77 68 65 6e 20 61 20 6e |rmally, |when a n|
|00004ea0| 65 77 20 6d 61 72 6b 20 | 69 73 20 73 65 74 2c 20 |ew mark |is set, |
|00004eb0| 74 68 65 20 6f 6c 64 20 | 6f 6e 65 20 73 68 6f 75 |the old |one shou|
|00004ec0| 6c 64 20 67 6f 20 6f 6e | 20 74 68 65 20 73 74 61 |ld go on| the sta|
|00004ed0| 63 6b 2e 0a 54 68 69 73 | 20 69 73 20 77 68 79 20 |ck..This| is why |
|00004ee0| 6d 6f 73 74 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |most app|lication|
|00004ef0| 73 20 73 68 6f 75 6c 64 | 20 75 73 65 20 70 75 73 |s should| use pus|
|00004f00| 68 2d 6d 61 72 6b 2c 20 | 6e 6f 74 20 73 65 74 2d |h-mark, |not set-|
|00004f10| 6d 61 72 6b 2e 0a 0a 4e | 6f 76 69 63 65 20 65 6d |mark...N|ovice em|
|00004f20| 61 63 73 2d 6c 69 73 70 | 20 70 72 6f 67 72 61 6d |acs-lisp| program|
|00004f30| 6d 65 72 73 20 6f 66 74 | 65 6e 20 74 72 79 20 74 |mers oft|en try t|
|00004f40| 6f 20 75 73 65 20 74 68 | 65 20 6d 61 72 6b 20 66 |o use th|e mark f|
|00004f50| 6f 72 20 74 68 65 20 77 | 72 6f 6e 67 0a 70 75 72 |or the w|rong.pur|
|00004f60| 70 6f 73 65 73 2e 20 20 | 54 68 65 20 6d 61 72 6b |poses. |The mark|
|00004f70| 20 73 61 76 65 73 20 61 | 20 6c 6f 63 61 74 69 6f | saves a| locatio|
|00004f80| 6e 20 66 6f 72 20 74 68 | 65 20 75 73 65 72 27 73 |n for th|e user's|
|00004f90| 20 63 6f 6e 76 65 6e 69 | 65 6e 63 65 2e 0a 4d 6f | conveni|ence..Mo|
|00004fa0| 73 74 20 65 64 69 74 69 | 6e 67 20 63 6f 6d 6d 61 |st editi|ng comma|
|00004fb0| 6e 64 73 20 73 68 6f 75 | 6c 64 20 6e 6f 74 20 61 |nds shou|ld not a|
|00004fc0| 6c 74 65 72 20 74 68 65 | 20 6d 61 72 6b 2e 0a 54 |lter the| mark..T|
|00004fd0| 6f 20 72 65 6d 65 6d 62 | 65 72 20 61 20 6c 6f 63 |o rememb|er a loc|
|00004fe0| 61 74 69 6f 6e 20 66 6f | 72 20 69 6e 74 65 72 6e |ation fo|r intern|
|00004ff0| 61 6c 20 75 73 65 20 69 | 6e 20 74 68 65 20 4c 69 |al use i|n the Li|
|00005000| 73 70 20 70 72 6f 67 72 | 61 6d 2c 0a 73 74 6f 72 |sp progr|am,.stor|
|00005010| 65 20 69 74 20 69 6e 20 | 61 20 4c 69 73 70 20 76 |e it in |a Lisp v|
|00005020| 61 72 69 61 62 6c 65 2e | 20 20 45 78 61 6d 70 6c |ariable.| Exampl|
|00005030| 65 3a 0a 0a 20 20 20 28 | 6c 65 74 20 28 28 62 65 |e:.. (|let ((be|
|00005040| 67 20 28 70 6f 69 6e 74 | 29 29 29 20 28 66 6f 72 |g (point|))) (for|
|00005050| 77 61 72 64 2d 6c 69 6e | 65 20 31 29 20 28 64 65 |ward-lin|e 1) (de|
|00005060| 6c 65 74 65 2d 72 65 67 | 69 6f 6e 20 62 65 67 20 |lete-reg|ion beg |
|00005070| 28 70 6f 69 6e 74 29 29 | 29 2e 22 20 28 62 79 74 |(point))|)." (byt|
|00005080| 65 2d 63 6f 64 65 20 22 | c1 c2 20 08 70 23 87 22 |e-code "|.. .p#."|
|00005090| 20 5b 70 6f 73 20 73 65 | 74 2d 6d 61 72 6b 65 72 | [pos se|t-marker|
|000050a0| 20 6d 61 72 6b 2d 6d 61 | 72 6b 65 72 5d 20 35 29 | mark-ma|rker] 5)|
|000050b0| 29 0a 0a 28 64 65 66 76 | 61 72 20 6d 61 72 6b 2d |)..(defv|ar mark-|
|000050c0| 72 69 6e 67 20 6e 69 6c | 20 22 5c 0a 54 68 65 20 |ring nil| "\.The |
|000050d0| 6c 69 73 74 20 6f 66 20 | 73 61 76 65 64 20 66 6f |list of |saved fo|
|000050e0| 72 6d 65 72 20 6d 61 72 | 6b 73 20 6f 66 20 74 68 |rmer mar|ks of th|
|000050f0| 65 20 63 75 72 72 65 6e | 74 20 62 75 66 66 65 72 |e curren|t buffer|
|00005100| 2c 0a 6d 6f 73 74 20 72 | 65 63 65 6e 74 20 66 69 |,.most r|ecent fi|
|00005110| 72 73 74 2e 22 29 0a 0a | 28 6d 61 6b 65 2d 76 61 |rst.")..|(make-va|
|00005120| 72 69 61 62 6c 65 2d 62 | 75 66 66 65 72 2d 6c 6f |riable-b|uffer-lo|
|00005130| 63 61 6c 20 28 71 75 6f | 74 65 20 6d 61 72 6b 2d |cal (quo|te mark-|
|00005140| 72 69 6e 67 29 29 0a 0a | 28 64 65 66 63 6f 6e 73 |ring))..|(defcons|
|00005150| 74 20 6d 61 72 6b 2d 72 | 69 6e 67 2d 6d 61 78 20 |t mark-r|ing-max |
|00005160| 31 36 20 22 5c 0a 2a 4d | 61 78 69 6d 75 6d 20 73 |16 "\.*M|aximum s|
|00005170| 69 7a 65 20 6f 66 20 6d | 61 72 6b 20 72 69 6e 67 |ize of m|ark ring|
|00005180| 2e 20 20 53 74 61 72 74 | 20 64 69 73 63 61 72 64 |. Start| discard|
|00005190| 69 6e 67 20 6f 66 66 20 | 65 6e 64 20 69 66 20 67 |ing off |end if g|
|000051a0| 65 74 73 20 74 68 69 73 | 20 62 69 67 2e 22 29 0a |ets this| big.").|
|000051b0| 0a 28 64 65 66 75 6e 20 | 73 65 74 2d 6d 61 72 6b |.(defun |set-mark|
|000051c0| 2d 63 6f 6d 6d 61 6e 64 | 20 28 61 72 67 29 20 22 |-command| (arg) "|
|000051d0| 5c 0a 53 65 74 20 6d 61 | 72 6b 20 61 74 20 77 68 |\.Set ma|rk at wh|
|000051e0| 65 72 65 20 70 6f 69 6e | 74 20 69 73 2c 20 6f 72 |ere poin|t is, or|
|000051f0| 20 6a 75 6d 70 20 74 6f | 20 6d 61 72 6b 2e 0a 57 | jump to| mark..W|
|00005200| 69 74 68 20 6e 6f 20 70 | 72 65 66 69 78 20 61 72 |ith no p|refix ar|
|00005210| 67 75 6d 65 6e 74 2c 20 | 73 65 74 20 6d 61 72 6b |gument, |set mark|
|00005220| 2c 20 61 6e 64 20 70 75 | 73 68 20 70 72 65 76 69 |, and pu|sh previ|
|00005230| 6f 75 73 20 6d 61 72 6b | 20 6f 6e 20 6d 61 72 6b |ous mark| on mark|
|00005240| 20 72 69 6e 67 2e 0a 57 | 69 74 68 20 61 72 67 75 | ring..W|ith argu|
|00005250| 6d 65 6e 74 2c 20 6a 75 | 6d 70 20 74 6f 20 6d 61 |ment, ju|mp to ma|
|00005260| 72 6b 2c 20 61 6e 64 20 | 70 6f 70 20 69 6e 74 6f |rk, and |pop into|
|00005270| 20 6d 61 72 6b 20 6f 66 | 66 20 74 68 65 20 6d 61 | mark of|f the ma|
|00005280| 72 6b 20 72 69 6e 67 2e | 0a 0a 4e 6f 76 69 63 65 |rk ring.|..Novice|
|00005290| 20 65 6d 61 63 73 2d 6c | 69 73 70 20 70 72 6f 67 | emacs-l|isp prog|
|000052a0| 72 61 6d 6d 65 72 73 20 | 6f 66 74 65 6e 20 74 72 |rammers |often tr|
|000052b0| 79 20 74 6f 20 75 73 65 | 20 74 68 65 20 6d 61 72 |y to use| the mar|
|000052c0| 6b 20 66 6f 72 20 74 68 | 65 20 77 72 6f 6e 67 0a |k for th|e wrong.|
|000052d0| 70 75 72 70 6f 73 65 73 | 2e 20 20 53 65 65 20 74 |purposes|. See t|
|000052e0| 68 65 20 64 6f 63 75 6d | 65 6e 74 61 74 69 6f 6e |he docum|entation|
|000052f0| 20 6f 66 20 60 73 65 74 | 2d 6d 61 72 6b 27 20 66 | of `set|-mark' f|
|00005300| 6f 72 20 6d 6f 72 65 20 | 69 6e 66 6f 72 6d 61 74 |or more |informat|
|00005310| 69 6f 6e 2e 22 20 28 69 | 6e 74 65 72 61 63 74 69 |ion." (i|nteracti|
|00005320| 76 65 20 22 50 22 29 20 | 28 62 79 74 65 2d 63 6f |ve "P") |(byte-co|
|00005330| 64 65 20 22 c1 88 08 3f | 83 0c 00 c2 20 82 1e 00 |de "...?|.... ...|
|00005340| c3 20 3f 83 18 00 c4 c5 | 21 82 1e 00 c3 20 62 88 |. ?.....|!.... b.|
|00005350| c6 20 87 22 20 5b 61 72 | 67 20 6e 69 6c 20 70 75 |. ." [ar|g nil pu|
|00005360| 73 68 2d 6d 61 72 6b 20 | 6d 61 72 6b 20 65 72 72 |sh-mark |mark err|
|00005370| 6f 72 20 22 4e 6f 20 6d | 61 72 6b 20 73 65 74 20 |or "No m|ark set |
|00005380| 69 6e 20 74 68 69 73 20 | 62 75 66 66 65 72 22 20 |in this |buffer" |
|00005390| 70 6f 70 2d 6d 61 72 6b | 5d 20 36 29 29 0a 0a 28 |pop-mark|] 6))..(|
|000053a0| 64 65 66 75 6e 20 70 75 | 73 68 2d 6d 61 72 6b 20 |defun pu|sh-mark |
|000053b0| 28 26 6f 70 74 69 6f 6e | 61 6c 20 6c 6f 63 61 74 |(&option|al locat|
|000053c0| 69 6f 6e 20 6e 6f 6d 73 | 67 29 20 22 5c 0a 53 65 |ion noms|g) "\.Se|
|000053d0| 74 20 6d 61 72 6b 20 61 | 74 20 4c 4f 43 41 54 49 |t mark a|t LOCATI|
|000053e0| 4f 4e 20 28 70 6f 69 6e | 74 2c 20 62 79 20 64 65 |ON (poin|t, by de|
|000053f0| 66 61 75 6c 74 29 20 61 | 6e 64 20 70 75 73 68 20 |fault) a|nd push |
|00005400| 6f 6c 64 20 6d 61 72 6b | 20 6f 6e 20 6d 61 72 6b |old mark| on mark|
|00005410| 20 72 69 6e 67 2e 0a 44 | 69 73 70 6c 61 79 73 20 | ring..D|isplays |
|00005420| 5c 22 4d 61 72 6b 20 73 | 65 74 5c 22 20 75 6e 6c |\"Mark s|et\" unl|
|00005430| 65 73 73 20 74 68 65 20 | 6f 70 74 69 6f 6e 61 6c |ess the |optional|
|00005440| 20 73 65 63 6f 6e 64 20 | 61 72 67 20 4e 4f 4d 53 | second |arg NOMS|
|00005450| 47 20 69 73 20 6e 6f 6e | 2d 6e 69 6c 2e 0a 0a 4e |G is non|-nil...N|
|00005460| 6f 76 69 63 65 20 65 6d | 61 63 73 2d 6c 69 73 70 |ovice em|acs-lisp|
|00005470| 20 70 72 6f 67 72 61 6d | 6d 65 72 73 20 6f 66 74 | program|mers oft|
|00005480| 65 6e 20 74 72 79 20 74 | 6f 20 75 73 65 20 74 68 |en try t|o use th|
|00005490| 65 20 6d 61 72 6b 20 66 | 6f 72 20 74 68 65 20 77 |e mark f|or the w|
|000054a0| 72 6f 6e 67 0a 70 75 72 | 70 6f 73 65 73 2e 20 20 |rong.pur|poses. |
|000054b0| 53 65 65 20 74 68 65 20 | 64 6f 63 75 6d 65 6e 74 |See the |document|
|000054c0| 61 74 69 6f 6e 20 6f 66 | 20 60 73 65 74 2d 6d 61 |ation of| `set-ma|
|000054d0| 72 6b 27 20 66 6f 72 20 | 6d 6f 72 65 20 69 6e 66 |rk' for |more inf|
|000054e0| 6f 72 6d 61 74 69 6f 6e | 2e 22 20 28 62 79 74 65 |ormation|." (byte|
|000054f0| 2d 63 6f 64 65 20 22 c6 | 20 3f 83 0a 00 c0 82 2b |-code ".| ?.....+|
|00005500| 00 c7 c8 20 21 09 42 89 | 11 88 09 47 0a 56 85 2b |... !.B.|...G.V.+|
|00005510| 00 c9 ca 0a 09 5c 22 40 | c0 5c 22 88 cb ca 0a 53 |.....\"@|.\"....S|
|00005520| 09 5c 22 c0 5c 22 88 cc | 0b 86 32 00 60 21 88 0c |.\".\"..|..2.`!..|
|00005530| 86 46 00 0d 86 46 00 cd | 20 ce 56 86 46 00 cf d0 |.F...F..| .V.F...|
|00005540| 21 87 22 20 5b 6e 69 6c | 20 6d 61 72 6b 2d 72 69 |!." [nil| mark-ri|
|00005550| 6e 67 20 6d 61 72 6b 2d | 72 69 6e 67 2d 6d 61 78 |ng mark-|ring-max|
|00005560| 20 6c 6f 63 61 74 69 6f | 6e 20 6e 6f 6d 73 67 20 | locatio|n nomsg |
|00005570| 65 78 65 63 75 74 69 6e | 67 2d 6d 61 63 72 6f 20 |executin|g-macro |
|00005580| 6d 61 72 6b 20 63 6f 70 | 79 2d 6d 61 72 6b 65 72 |mark cop|y-marker|
|00005590| 20 6d 61 72 6b 2d 6d 61 | 72 6b 65 72 20 6d 6f 76 | mark-ma|rker mov|
|000055a0| 65 2d 6d 61 72 6b 65 72 | 20 6e 74 68 63 64 72 20 |e-marker| nthcdr |
|000055b0| 73 65 74 63 64 72 20 73 | 65 74 2d 6d 61 72 6b 20 |setcdr s|et-mark |
|000055c0| 6d 69 6e 69 62 75 66 66 | 65 72 2d 64 65 70 74 68 |minibuff|er-depth|
|000055d0| 20 30 20 6d 65 73 73 61 | 67 65 20 22 4d 61 72 6b | 0 messa|ge "Mark|
|000055e0| 20 73 65 74 22 5d 20 31 | 31 29 29 0a 0a 28 64 65 | set"] 1|1))..(de|
|000055f0| 66 75 6e 20 70 6f 70 2d | 6d 61 72 6b 20 6e 69 6c |fun pop-|mark nil|
|00005600| 20 22 5c 0a 50 6f 70 20 | 6f 66 66 20 6d 61 72 6b | "\.Pop |off mark|
|00005610| 20 72 69 6e 67 20 69 6e | 74 6f 20 74 68 65 20 62 | ring in|to the b|
|00005620| 75 66 66 65 72 27 73 20 | 61 63 74 75 61 6c 20 6d |uffer's |actual m|
|00005630| 61 72 6b 2e 0a 44 6f 65 | 73 20 6e 6f 74 20 73 65 |ark..Doe|s not se|
|00005640| 74 20 70 6f 69 6e 74 2e | 20 20 44 6f 65 73 20 6e |t point.| Does n|
|00005650| 6f 74 68 69 6e 67 20 69 | 66 20 6d 61 72 6b 20 72 |othing i|f mark r|
|00005660| 69 6e 67 20 69 73 20 65 | 6d 70 74 79 2e 22 20 28 |ing is e|mpty." (|
|00005670| 62 79 74 65 2d 63 6f 64 | 65 20 22 08 85 29 00 c2 |byte-cod|e "..)..|
|00005680| 08 c3 c4 20 21 43 5c 22 | 89 10 88 c5 c6 08 40 5c |... !C\"|......@\|
|00005690| 5c 21 88 c7 08 40 c1 5c | 22 88 c8 20 3f 85 24 00 |\!...@.\|".. ?.$.|
|000056a0| c9 20 88 08 41 89 10 87 | 22 20 5b 6d 61 72 6b 2d |. ..A...|" [mark-|
|000056b0| 72 69 6e 67 20 6e 69 6c | 20 6e 63 6f 6e 63 20 63 |ring nil| nconc c|
|000056c0| 6f 70 79 2d 6d 61 72 6b | 65 72 20 6d 61 72 6b 2d |opy-mark|er mark-|
|000056d0| 6d 61 72 6b 65 72 20 73 | 65 74 2d 6d 61 72 6b 20 |marker s|et-mark |
|000056e0| 30 20 6d 6f 76 65 2d 6d | 61 72 6b 65 72 20 6d 61 |0 move-m|arker ma|
|000056f0| 72 6b 20 64 69 6e 67 5d | 20 39 29 29 0a 0a 28 66 |rk ding]| 9))..(f|
|00005700| 73 65 74 20 28 71 75 6f | 74 65 20 65 78 63 68 61 |set (quo|te excha|
|00005710| 6e 67 65 2d 64 6f 74 2d | 61 6e 64 2d 6d 61 72 6b |nge-dot-|and-mark|
|00005720| 29 20 28 71 75 6f 74 65 | 20 65 78 63 68 61 6e 67 |) (quote| exchang|
|00005730| 65 2d 70 6f 69 6e 74 2d | 61 6e 64 2d 6d 61 72 6b |e-point-|and-mark|
|00005740| 29 29 0a 0a 28 64 65 66 | 75 6e 20 65 78 63 68 61 |))..(def|un excha|
|00005750| 6e 67 65 2d 70 6f 69 6e | 74 2d 61 6e 64 2d 6d 61 |nge-poin|t-and-ma|
|00005760| 72 6b 20 6e 69 6c 20 22 | 5c 0a 50 75 74 20 74 68 |rk nil "|\.Put th|
|00005770| 65 20 6d 61 72 6b 20 77 | 68 65 72 65 20 70 6f 69 |e mark w|here poi|
|00005780| 6e 74 20 69 73 20 6e 6f | 77 2c 20 61 6e 64 20 70 |nt is no|w, and p|
|00005790| 6f 69 6e 74 20 77 68 65 | 72 65 20 74 68 65 20 6d |oint whe|re the m|
|000057a0| 61 72 6b 20 69 73 20 6e | 6f 77 2e 22 20 28 69 6e |ark is n|ow." (in|
|000057b0| 74 65 72 61 63 74 69 76 | 65 20 6e 69 6c 29 20 28 |teractiv|e nil) (|
|000057c0| 62 79 74 65 2d 63 6f 64 | 65 20 22 c0 88 c2 20 19 |byte-cod|e "... .|
|000057d0| 09 3f 85 0d 00 c3 c4 21 | 88 c5 60 21 88 09 62 88 |.?.....!|..`!..b.|
|000057e0| c0 29 87 22 20 5b 6e 69 | 6c 20 6f 6d 61 72 6b 20 |.)." [ni|l omark |
|000057f0| 6d 61 72 6b 20 65 72 72 | 6f 72 20 22 4e 6f 20 6d |mark err|or "No m|
|00005800| 61 72 6b 20 73 65 74 20 | 69 6e 20 74 68 69 73 20 |ark set |in this |
|00005810| 62 75 66 66 65 72 22 20 | 73 65 74 2d 6d 61 72 6b |buffer" |set-mark|
|00005820| 5d 20 34 29 29 0a 0a 28 | 64 65 66 75 6e 20 6e 65 |] 4))..(|defun ne|
|00005830| 78 74 2d 6c 69 6e 65 20 | 28 61 72 67 29 20 22 5c |xt-line |(arg) "\|
|00005840| 0a 4d 6f 76 65 20 63 75 | 72 73 6f 72 20 76 65 72 |.Move cu|rsor ver|
|00005850| 74 69 63 61 6c 6c 79 20 | 64 6f 77 6e 20 41 52 47 |tically |down ARG|
|00005860| 20 6c 69 6e 65 73 2e 0a | 49 66 20 74 68 65 72 65 | lines..|If there|
|00005870| 20 69 73 20 6e 6f 20 63 | 68 61 72 61 63 74 65 72 | is no c|haracter|
|00005880| 20 69 6e 20 74 68 65 20 | 74 61 72 67 65 74 20 6c | in the |target l|
|00005890| 69 6e 65 20 65 78 61 63 | 74 6c 79 20 75 6e 64 65 |ine exac|tly unde|
|000058a0| 72 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 63 6f |r the cu|rrent co|
|000058b0| 6c 75 6d 6e 2c 0a 74 68 | 65 20 63 75 72 73 6f 72 |lumn,.th|e cursor|
|000058c0| 20 69 73 20 70 6f 73 69 | 74 69 6f 6e 65 64 20 61 | is posi|tioned a|
|000058d0| 66 74 65 72 20 74 68 65 | 20 63 68 61 72 61 63 74 |fter the| charact|
|000058e0| 65 72 20 69 6e 20 74 68 | 61 74 20 6c 69 6e 65 20 |er in th|at line |
|000058f0| 77 68 69 63 68 20 73 70 | 61 6e 73 20 74 68 69 73 |which sp|ans this|
|00005900| 0a 63 6f 6c 75 6d 6e 2c | 20 6f 72 20 61 74 20 74 |.column,| or at t|
|00005910| 68 65 20 65 6e 64 20 6f | 66 20 74 68 65 20 6c 69 |he end o|f the li|
|00005920| 6e 65 20 69 66 20 69 74 | 20 69 73 20 6e 6f 74 20 |ne if it| is not |
|00005930| 6c 6f 6e 67 20 65 6e 6f | 75 67 68 2e 0a 49 66 20 |long eno|ugh..If |
|00005940| 74 68 65 72 65 20 69 73 | 20 6e 6f 20 6c 69 6e 65 |there is| no line|
|00005950| 20 69 6e 20 74 68 65 20 | 62 75 66 66 65 72 20 61 | in the |buffer a|
|00005960| 66 74 65 72 20 74 68 69 | 73 20 6f 6e 65 2c 0a 61 |fter thi|s one,.a|
|00005970| 20 6e 65 77 6c 69 6e 65 | 20 63 68 61 72 61 63 74 | newline| charact|
|00005980| 65 72 20 69 73 20 69 6e | 73 65 72 74 65 64 20 74 |er is in|serted t|
|00005990| 6f 20 63 72 65 61 74 65 | 20 61 20 6c 69 6e 65 0a |o create| a line.|
|000059a0| 61 6e 64 20 74 68 65 20 | 63 75 72 73 6f 72 20 6d |and the |cursor m|
|000059b0| 6f 76 65 73 20 74 6f 20 | 74 68 61 74 20 6c 69 6e |oves to |that lin|
|000059c0| 65 2e 0a 0a 54 68 65 20 | 63 6f 6d 6d 61 6e 64 20 |e...The |command |
|000059d0| 5c 5c 5b 73 65 74 2d 67 | 6f 61 6c 2d 63 6f 6c 75 |\\[set-g|oal-colu|
|000059e0| 6d 6e 5d 20 63 61 6e 20 | 62 65 20 75 73 65 64 20 |mn] can |be used |
|000059f0| 74 6f 20 63 72 65 61 74 | 65 0a 61 20 73 65 6d 69 |to creat|e.a semi|
|00005a00| 70 65 72 6d 61 6e 65 6e | 74 20 67 6f 61 6c 20 63 |permanen|t goal c|
|00005a10| 6f 6c 75 6d 6e 20 74 6f | 20 77 68 69 63 68 20 74 |olumn to| which t|
|00005a20| 68 69 73 20 63 6f 6d 6d | 61 6e 64 20 61 6c 77 61 |his comm|and alwa|
|00005a30| 79 73 20 6d 6f 76 65 73 | 2e 0a 54 68 65 6e 20 69 |ys moves|..Then i|
|00005a40| 74 20 64 6f 65 73 20 6e | 6f 74 20 74 72 79 20 74 |t does n|ot try t|
|00005a50| 6f 20 6d 6f 76 65 20 76 | 65 72 74 69 63 61 6c 6c |o move v|erticall|
|00005a60| 79 2e 0a 0a 49 66 20 79 | 6f 75 20 61 72 65 20 74 |y...If y|ou are t|
|00005a70| 68 69 6e 6b 69 6e 67 20 | 6f 66 20 75 73 69 6e 67 |hinking |of using|
|00005a80| 20 74 68 69 73 20 69 6e | 20 61 20 4c 69 73 70 20 | this in| a Lisp |
|00005a90| 70 72 6f 67 72 61 6d 2c | 20 63 6f 6e 73 69 64 65 |program,| conside|
|00005aa0| 72 0a 75 73 69 6e 67 20 | 60 66 6f 72 77 61 72 64 |r.using |`forward|
|00005ab0| 2d 6c 69 6e 65 27 20 69 | 6e 73 74 65 61 64 2e 20 |-line' i|nstead. |
|00005ac0| 20 49 74 20 69 73 20 75 | 73 75 61 6c 6c 79 20 65 | It is u|sually e|
|00005ad0| 61 73 69 65 72 20 74 6f | 20 75 73 65 0a 61 6e 64 |asier to| use.and|
|00005ae0| 20 6d 6f 72 65 20 72 65 | 6c 69 61 62 6c 65 20 28 | more re|liable (|
|00005af0| 6e 6f 20 64 65 70 65 6e | 64 65 6e 63 65 20 6f 6e |no depen|dence on|
|00005b00| 20 67 6f 61 6c 20 63 6f | 6c 75 6d 6e 2c 20 65 74 | goal co|lumn, et|
|00005b10| 63 2e 29 2e 22 20 28 69 | 6e 74 65 72 61 63 74 69 |c.)." (i|nteracti|
|00005b20| 76 65 20 22 70 22 29 20 | 28 62 79 74 65 2d 63 6f |ve "p") |(byte-co|
|00005b30| 64 65 20 22 c2 88 08 c3 | 55 83 2a 00 60 19 c4 c3 |de "....|U.*.`...|
|00005b40| 21 88 09 60 55 86 18 00 | 68 c5 3d 3f 83 20 00 c5 |!..`U...|h.=?. ..|
|00005b50| 63 82 26 00 09 62 88 c6 | 08 21 29 82 2d 00 c6 08 |c.&..b..|.!).-...|
|00005b60| 21 88 c2 87 22 20 5b 61 | 72 67 20 6f 70 6f 69 6e |!..." [a|rg opoin|
|00005b70| 74 20 6e 69 6c 20 31 20 | 66 6f 72 77 61 72 64 2d |t nil 1 |forward-|
|00005b80| 6c 69 6e 65 20 31 30 20 | 6e 65 78 74 2d 6c 69 6e |line 10 |next-lin|
|00005b90| 65 2d 69 6e 74 65 72 6e | 61 6c 5d 20 34 29 29 0a |e-intern|al] 4)).|
|00005ba0| 0a 28 64 65 66 75 6e 20 | 70 72 65 76 69 6f 75 73 |.(defun |previous|
|00005bb0| 2d 6c 69 6e 65 20 28 61 | 72 67 29 20 22 5c 0a 4d |-line (a|rg) "\.M|
|00005bc0| 6f 76 65 20 63 75 72 73 | 6f 72 20 76 65 72 74 69 |ove curs|or verti|
|00005bd0| 63 61 6c 6c 79 20 75 70 | 20 41 52 47 20 6c 69 6e |cally up| ARG lin|
|00005be0| 65 73 2e 0a 49 66 20 74 | 68 65 72 65 20 69 73 20 |es..If t|here is |
|00005bf0| 6e 6f 20 63 68 61 72 61 | 63 74 65 72 20 69 6e 20 |no chara|cter in |
|00005c00| 74 68 65 20 74 61 72 67 | 65 74 20 6c 69 6e 65 20 |the targ|et line |
|00005c10| 65 78 61 63 74 6c 79 20 | 6f 76 65 72 20 74 68 65 |exactly |over the|
|00005c20| 20 63 75 72 72 65 6e 74 | 20 63 6f 6c 75 6d 6e 2c | current| column,|
|00005c30| 0a 74 68 65 20 63 75 72 | 73 6f 72 20 69 73 20 70 |.the cur|sor is p|
|00005c40| 6f 73 69 74 69 6f 6e 65 | 64 20 61 66 74 65 72 20 |ositione|d after |
|00005c50| 74 68 65 20 63 68 61 72 | 61 63 74 65 72 20 69 6e |the char|acter in|
|00005c60| 20 74 68 61 74 20 6c 69 | 6e 65 20 77 68 69 63 68 | that li|ne which|
|00005c70| 20 73 70 61 6e 73 20 74 | 68 69 73 0a 63 6f 6c 75 | spans t|his.colu|
|00005c80| 6d 6e 2c 20 6f 72 20 61 | 74 20 74 68 65 20 65 6e |mn, or a|t the en|
|00005c90| 64 20 6f 66 20 74 68 65 | 20 6c 69 6e 65 20 69 66 |d of the| line if|
|00005ca0| 20 69 74 20 69 73 20 6e | 6f 74 20 6c 6f 6e 67 20 | it is n|ot long |
|00005cb0| 65 6e 6f 75 67 68 2e 0a | 0a 54 68 65 20 63 6f 6d |enough..|.The com|
|00005cc0| 6d 61 6e 64 20 5c 5c 5b | 73 65 74 2d 67 6f 61 6c |mand \\[|set-goal|
|00005cd0| 2d 63 6f 6c 75 6d 6e 5d | 20 63 61 6e 20 62 65 20 |-column]| can be |
|00005ce0| 75 73 65 64 20 74 6f 20 | 63 72 65 61 74 65 0a 61 |used to |create.a|
|00005cf0| 20 73 65 6d 69 70 65 72 | 6d 61 6e 65 6e 74 20 67 | semiper|manent g|
|00005d00| 6f 61 6c 20 63 6f 6c 75 | 6d 6e 20 74 6f 20 77 68 |oal colu|mn to wh|
|00005d10| 69 63 68 20 74 68 69 73 | 20 63 6f 6d 6d 61 6e 64 |ich this| command|
|00005d20| 20 61 6c 77 61 79 73 20 | 6d 6f 76 65 73 2e 0a 54 | always |moves..T|
|00005d30| 68 65 6e 20 69 74 20 64 | 6f 65 73 20 6e 6f 74 20 |hen it d|oes not |
|00005d40| 74 72 79 20 74 6f 20 6d | 6f 76 65 20 76 65 72 74 |try to m|ove vert|
|00005d50| 69 63 61 6c 6c 79 2e 0a | 0a 49 66 20 79 6f 75 20 |ically..|.If you |
|00005d60| 61 72 65 20 74 68 69 6e | 6b 69 6e 67 20 6f 66 20 |are thin|king of |
|00005d70| 75 73 69 6e 67 20 74 68 | 69 73 20 69 6e 20 61 20 |using th|is in a |
|00005d80| 4c 69 73 70 20 70 72 6f | 67 72 61 6d 2c 20 63 6f |Lisp pro|gram, co|
|00005d90| 6e 73 69 64 65 72 20 75 | 73 69 6e 67 0a 60 66 6f |nsider u|sing.`fo|
|00005da0| 72 77 61 72 64 2d 6c 69 | 6e 65 27 20 77 69 74 68 |rward-li|ne' with|
|00005db0| 20 6e 65 67 61 74 69 76 | 65 20 61 72 67 75 6d 65 | negativ|e argume|
|00005dc0| 6e 74 20 69 6e 73 74 65 | 61 64 2e 2e 20 20 49 74 |nt inste|ad.. It|
|00005dd0| 20 69 73 20 75 73 75 61 | 6c 6c 79 20 65 61 73 69 | is usua|lly easi|
|00005de0| 65 72 0a 74 6f 20 75 73 | 65 20 61 6e 64 20 6d 6f |er.to us|e and mo|
|00005df0| 72 65 20 72 65 6c 69 61 | 62 6c 65 20 28 6e 6f 20 |re relia|ble (no |
|00005e00| 64 65 70 65 6e 64 65 6e | 63 65 20 6f 6e 20 67 6f |dependen|ce on go|
|00005e10| 61 6c 20 63 6f 6c 75 6d | 6e 2c 20 65 74 63 2e 29 |al colum|n, etc.)|
|00005e20| 2e 22 20 28 69 6e 74 65 | 72 61 63 74 69 76 65 20 |." (inte|ractive |
|00005e30| 22 70 22 29 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |"p") (by|te-code |
|00005e40| 22 c1 88 c2 08 5b 21 88 | c1 87 22 20 5b 61 72 67 |"....[!.|.." [arg|
|00005e50| 20 6e 69 6c 20 6e 65 78 | 74 2d 6c 69 6e 65 2d 69 | nil nex|t-line-i|
|00005e60| 6e 74 65 72 6e 61 6c 5d | 20 32 29 29 0a 0a 28 64 |nternal]| 2))..(d|
|00005e70| 65 66 63 6f 6e 73 74 20 | 74 72 61 63 6b 2d 65 6f |efconst |track-eo|
|00005e80| 6c 20 6e 69 6c 20 22 5c | 0a 2a 4e 6f 6e 2d 6e 69 |l nil "\|.*Non-ni|
|00005e90| 6c 20 6d 65 61 6e 73 20 | 76 65 72 74 69 63 61 6c |l means |vertical|
|00005ea0| 20 6d 6f 74 69 6f 6e 20 | 73 74 61 72 74 69 6e 67 | motion |starting|
|00005eb0| 20 61 74 20 74 68 65 20 | 65 6e 64 20 6f 66 20 61 | at the |end of a|
|00005ec0| 20 6c 69 6e 65 20 73 68 | 6f 75 6c 64 20 6b 65 65 | line sh|ould kee|
|00005ed0| 70 20 74 6f 20 65 6e 64 | 73 20 6f 66 20 6c 69 6e |p to end|s of lin|
|00005ee0| 65 73 2e 0a 54 68 69 73 | 20 6d 65 61 6e 73 20 6d |es..This| means m|
|00005ef0| 6f 76 69 6e 67 20 74 6f | 20 74 68 65 20 65 6e 64 |oving to| the end|
|00005f00| 20 6f 66 20 65 61 63 68 | 20 6c 69 6e 65 20 6d 6f | of each| line mo|
|00005f10| 76 65 64 20 6f 6e 74 6f | 2e 22 29 0a 0a 28 64 65 |ved onto|.")..(de|
|00005f20| 66 76 61 72 20 67 6f 61 | 6c 2d 63 6f 6c 75 6d 6e |fvar goa|l-column|
|00005f30| 20 6e 69 6c 20 22 5c 0a | 2a 53 65 6d 69 70 65 72 | nil "\.|*Semiper|
|00005f40| 6d 61 6e 65 6e 74 20 67 | 6f 61 6c 20 63 6f 6c 75 |manent g|oal colu|
|00005f50| 6d 6e 20 66 6f 72 20 76 | 65 72 74 69 63 61 6c 20 |mn for v|ertical |
|00005f60| 6d 6f 74 69 6f 6e 2c 20 | 61 73 20 73 65 74 20 62 |motion, |as set b|
|00005f70| 79 20 5c 5c 5b 73 65 74 | 2d 67 6f 61 6c 2d 63 6f |y \\[set|-goal-co|
|00005f80| 6c 75 6d 6e 5d 2c 20 6f | 72 20 6e 69 6c 2e 22 29 |lumn], o|r nil.")|
|00005f90| 0a 0a 28 64 65 66 76 61 | 72 20 74 65 6d 70 6f 72 |..(defva|r tempor|
|00005fa0| 61 72 79 2d 67 6f 61 6c | 2d 63 6f 6c 75 6d 6e 20 |ary-goal|-column |
|00005fb0| 30 20 22 5c 0a 43 75 72 | 72 65 6e 74 20 67 6f 61 |0 "\.Cur|rent goa|
|00005fc0| 6c 20 63 6f 6c 75 6d 6e | 20 66 6f 72 20 76 65 72 |l column| for ver|
|00005fd0| 74 69 63 61 6c 20 6d 6f | 74 69 6f 6e 2e 0a 49 74 |tical mo|tion..It|
|00005fe0| 20 69 73 20 74 68 65 20 | 63 6f 6c 75 6d 6e 20 77 | is the |column w|
|00005ff0| 68 65 72 65 20 70 6f 69 | 6e 74 20 77 61 73 20 61 |here poi|nt was a|
|00006000| 74 20 74 68 65 20 73 74 | 61 72 74 20 6f 66 20 63 |t the st|art of c|
|00006010| 75 72 72 65 6e 74 20 72 | 75 6e 20 6f 66 20 76 65 |urrent r|un of ve|
|00006020| 72 74 69 63 61 6c 20 6d | 6f 74 69 6f 6e 20 63 6f |rtical m|otion co|
|00006030| 6d 6d 61 6e 64 73 2e 22 | 29 0a 0a 28 64 65 66 75 |mmands."|)..(defu|
|00006040| 6e 20 6e 65 78 74 2d 6c | 69 6e 65 2d 69 6e 74 65 |n next-l|ine-inte|
|00006050| 72 6e 61 6c 20 28 61 72 | 67 29 20 28 62 79 74 65 |rnal (ar|g) (byte|
|00006060| 2d 63 6f 64 65 20 22 08 | c8 3d 86 09 00 08 c9 3d |-code ".|.=.....=|
|00006070| 3f 85 1c 00 0a 85 12 00 | 6c 83 19 00 c3 82 1a 00 |?.......|l.......|
|00006080| 69 89 11 88 ca 0c 21 3f | 83 2a 00 cb 0d 21 82 5a |i.....!?|.*...!.Z|
|00006090| 00 0d cc 56 85 44 00 cd | ce 21 88 cf d0 21 88 cb |...V.D..|.!...!..|
|000060a0| ce 21 88 0d 53 89 15 88 | 82 2a 00 88 0d cc 57 85 |.!..S...|.*....W.|
|000060b0| 5a 00 cd d0 21 88 d1 20 | 88 0d 54 89 15 88 82 45 |Z...!.. |..T....E|
|000060c0| 00 88 0e 06 86 61 00 09 | c3 3d 83 6b 00 d2 20 82 |.....a..|.=.k.. .|
|000060d0| 73 00 d3 0e 06 86 72 00 | 09 21 88 c7 87 22 20 5b |s.....r.|.!..." [|
|000060e0| 6c 61 73 74 2d 63 6f 6d | 6d 61 6e 64 20 74 65 6d |last-com|mand tem|
|000060f0| 70 6f 72 61 72 79 2d 67 | 6f 61 6c 2d 63 6f 6c 75 |porary-g|oal-colu|
|00006100| 6d 6e 20 74 72 61 63 6b | 2d 65 6f 6c 20 74 20 73 |mn track|-eol t s|
|00006110| 65 6c 65 63 74 69 76 65 | 2d 64 69 73 70 6c 61 79 |elective|-display|
|00006120| 20 61 72 67 20 67 6f 61 | 6c 2d 63 6f 6c 75 6d 6e | arg goa|l-column|
|00006130| 20 6e 69 6c 20 6e 65 78 | 74 2d 6c 69 6e 65 20 70 | nil nex|t-line p|
|00006140| 72 65 76 69 6f 75 73 2d | 6c 69 6e 65 20 69 6e 74 |revious-|line int|
|00006150| 65 67 65 72 70 20 66 6f | 72 77 61 72 64 2d 6c 69 |egerp fo|rward-li|
|00006160| 6e 65 20 30 20 76 65 72 | 74 69 63 61 6c 2d 6d 6f |ne 0 ver|tical-mo|
|00006170| 74 69 6f 6e 20 31 20 66 | 6f 72 77 61 72 64 2d 63 |tion 1 f|orward-c|
|00006180| 68 61 72 20 2d 31 20 62 | 65 67 69 6e 6e 69 6e 67 |har -1 b|eginning|
|00006190| 2d 6f 66 2d 6c 69 6e 65 | 20 65 6e 64 2d 6f 66 2d |-of-line| end-of-|
|000061a0| 6c 69 6e 65 20 6d 6f 76 | 65 2d 74 6f 2d 63 6f 6c |line mov|e-to-col|
|000061b0| 75 6d 6e 5d 20 31 30 29 | 29 0a 0a 28 64 65 66 75 |umn] 10)|)..(defu|
|000061c0| 6e 20 73 65 74 2d 67 6f | 61 6c 2d 63 6f 6c 75 6d |n set-go|al-colum|
|000061d0| 6e 20 28 61 72 67 29 20 | 22 5c 0a 53 65 74 20 74 |n (arg) |"\.Set t|
|000061e0| 68 65 20 63 75 72 72 65 | 6e 74 20 68 6f 72 69 7a |he curre|nt horiz|
|000061f0| 6f 6e 74 61 6c 20 70 6f | 73 69 74 69 6f 6e 20 61 |ontal po|sition a|
|00006200| 73 20 61 20 67 6f 61 6c | 20 66 6f 72 20 5c 5c 5b |s a goal| for \\[|
|00006210| 6e 65 78 74 2d 6c 69 6e | 65 5d 20 61 6e 64 20 5c |next-lin|e] and \|
|00006220| 5c 5b 70 72 65 76 69 6f | 75 73 2d 6c 69 6e 65 5d |\[previo|us-line]|
|00006230| 2e 0a 54 68 6f 73 65 20 | 63 6f 6d 6d 61 6e 64 73 |..Those |commands|
|00006240| 20 77 69 6c 6c 20 6d 6f | 76 65 20 74 6f 20 74 68 | will mo|ve to th|
|00006250| 69 73 20 70 6f 73 69 74 | 69 6f 6e 20 69 6e 20 74 |is posit|ion in t|
|00006260| 68 65 20 6c 69 6e 65 20 | 6d 6f 76 65 64 20 74 6f |he line |moved to|
|00006270| 0a 72 61 74 68 65 72 20 | 74 68 61 6e 20 74 72 79 |.rather |than try|
|00006280| 69 6e 67 20 74 6f 20 6b | 65 65 70 20 74 68 65 20 |ing to k|eep the |
|00006290| 73 61 6d 65 20 68 6f 72 | 69 7a 6f 6e 74 61 6c 20 |same hor|izontal |
|000062a0| 70 6f 73 69 74 69 6f 6e | 2e 0a 57 69 74 68 20 61 |position|..With a|
|000062b0| 20 6e 6f 6e 2d 6e 69 6c | 20 61 72 67 75 6d 65 6e | non-nil| argumen|
|000062c0| 74 2c 20 63 6c 65 61 72 | 73 20 6f 75 74 20 74 68 |t, clear|s out th|
|000062d0| 65 20 67 6f 61 6c 20 63 | 6f 6c 75 6d 6e 0a 73 6f |e goal c|olumn.so|
|000062e0| 20 74 68 61 74 20 5c 5c | 5b 6e 65 78 74 2d 6c 69 | that \\|[next-li|
|000062f0| 6e 65 5d 20 61 6e 64 20 | 5c 5c 5b 70 72 65 76 69 |ne] and |\\[previ|
|00006300| 6f 75 73 2d 6c 69 6e 65 | 5d 20 72 65 73 75 6d 65 |ous-line|] resume|
|00006310| 20 76 65 72 74 69 63 61 | 6c 20 6d 6f 74 69 6f 6e | vertica|l motion|
|00006320| 2e 22 20 28 69 6e 74 65 | 72 61 63 74 69 76 65 20 |." (inte|ractive |
|00006330| 22 50 22 29 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |"P") (by|te-code |
|00006340| 22 c2 88 08 83 10 00 c2 | 89 11 88 c3 c4 21 82 1a |".......|.....!..|
|00006350| 00 69 89 11 88 c3 c5 c6 | 21 09 5c 22 88 c2 87 22 |.i......|!.\"..."|
|00006360| 20 5b 61 72 67 20 67 6f | 61 6c 2d 63 6f 6c 75 6d | [arg go|al-colum|
|00006370| 6e 20 6e 69 6c 20 6d 65 | 73 73 61 67 65 20 22 4e |n nil me|ssage "N|
|00006380| 6f 20 67 6f 61 6c 20 63 | 6f 6c 75 6d 6e 22 20 73 |o goal c|olumn" s|
|00006390| 75 62 73 74 69 74 75 74 | 65 2d 63 6f 6d 6d 61 6e |ubstitut|e-comman|
|000063a0| 64 2d 6b 65 79 73 20 22 | 47 6f 61 6c 20 63 6f 6c |d-keys "|Goal col|
|000063b0| 75 6d 6e 20 25 64 20 28 | 75 73 65 20 5c 5c 5b 73 |umn %d (|use \\[s|
|000063c0| 65 74 2d 67 6f 61 6c 2d | 63 6f 6c 75 6d 6e 5d 20 |et-goal-|column] |
|000063d0| 77 69 74 68 20 61 6e 20 | 61 72 67 20 74 6f 20 75 |with an |arg to u|
|000063e0| 6e 73 65 74 20 69 74 29 | 22 5d 20 35 29 29 0a 0a |nset it)|"] 5))..|
|000063f0| 28 64 65 66 75 6e 20 74 | 72 61 6e 73 70 6f 73 65 |(defun t|ranspose|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.