home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 6 / FreshFish_September1994.bin / bbs / gnu / emacs-18.59-src.lha / GNU / src / amiga / emacs-18.59 / lisp / simple.elc < prev    next >
Emacs Compiled Lisp  |  1992-11-21  |  38.3 KB

view JSON data     |     view as text     |     open on a Mac     |     open on a PC

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

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) magic Unsupported
100% file Emacs v18 byte-compiled Lisp data default
99% file data default
100% gt2 Kopftext: '(defun open-line (arg) ' 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| 64 6f 73 29 29 20 28 70 | 72 6f 67 6e 20 28 64 65 |dos)) (p|rogn (de|
|00003620| 66 75 6e 20 73 61 66 65 | 2d 61 6d 69 67 61 2d 70 |fun safe|-amiga-p|
|00003630| 61 73 74 65 20 6e 69 6c | 20 22 50 61 73 74 65 20 |aste nil| "Paste |
|00003640| 66 72 6f 6d 20 74 68 65 | 20 61 6d 69 67 61 20 63 |from the| amiga c|
|00003650| 6c 69 70 62 6f 61 72 64 | 2c 20 74 72 61 70 70 69 |lipboard|, trappi|
|00003660| 6e 67 20 61 6e 79 20 65 | 72 72 6f 72 73 2e 22 20 |ng any e|rrors." |
|00003670| 28 63 6f 6e 64 69 74 69 | 6f 6e 2d 63 61 73 65 20 |(conditi|on-case |
|00003680| 6e 69 6c 20 28 61 6d 69 | 67 61 2d 70 61 73 74 65 |nil (ami|ga-paste|
|00003690| 29 20 28 65 72 72 6f 72 | 20 6e 69 6c 29 29 29 20 |) (error| nil))) |
|000036a0| 28 64 65 66 75 6e 20 63 | 68 65 63 6b 2d 63 6c 69 |(defun c|heck-cli|
|000036b0| 70 62 6f 61 72 64 20 6e | 69 6c 20 22 49 66 20 74 |pboard n|il "If t|
|000036c0| 68 65 72 65 20 69 73 20 | 61 6e 79 74 68 69 6e 67 |here is |anything|
|000036d0| 20 6e 65 77 20 69 6e 20 | 74 68 65 20 63 6c 69 70 | new in |the clip|
|000036e0| 62 6f 61 72 64 2c 20 61 | 64 64 20 69 74 20 74 6f |board, a|dd it to|
|000036f0| 20 74 68 65 20 65 6d 61 | 63 73 20 6b 69 6c 6c 20 | the ema|cs kill |
|00003700| 72 69 6e 67 2e 0a 52 65 | 74 75 72 6e 73 20 74 20 |ring..Re|turns t |
|00003710| 69 66 20 74 68 65 72 65 | 20 77 61 73 20 73 6f 6d |if there| was som|
|00003720| 65 74 68 69 6e 67 20 61 | 64 64 65 64 2c 20 6e 69 |ething a|dded, ni|
|00003730| 6c 20 6f 74 68 65 72 77 | 69 73 65 2e 22 20 28 6c |l otherw|ise." (l|
|00003740| 65 74 20 28 61 64 64 65 | 64 29 20 28 69 66 20 61 |et (adde|d) (if a|
|00003750| 6d 69 67 61 2d 6e 65 77 | 2d 63 6c 69 70 20 28 6c |miga-new|-clip (l|
|00003760| 65 74 20 28 28 73 74 72 | 20 28 73 61 66 65 2d 61 |et ((str| (safe-a|
|00003770| 6d 69 67 61 2d 70 61 73 | 74 65 29 29 29 20 28 73 |miga-pas|te))) (s|
|00003780| 65 74 71 20 61 6d 69 67 | 61 2d 6e 65 77 2d 63 6c |etq amig|a-new-cl|
|00003790| 69 70 20 6e 69 6c 29 20 | 28 69 66 20 73 74 72 20 |ip nil) |(if str |
|000037a0| 28 70 72 6f 67 6e 20 28 | 6b 69 6c 6c 2d 61 64 64 |(progn (|kill-add|
|000037b0| 20 73 74 72 29 20 28 73 | 65 74 71 20 61 64 64 65 | str) (s|etq adde|
|000037c0| 64 20 74 29 20 28 73 65 | 74 71 20 6b 69 6c 6c 2d |d t) (se|tq kill-|
|000037d0| 72 69 6e 67 2d 79 61 6e | 6b 2d 70 6f 69 6e 74 65 |ring-yan|k-pointe|
|000037e0| 72 20 6b 69 6c 6c 2d 72 | 69 6e 67 29 29 29 29 29 |r kill-r|ing)))))|
|000037f0| 20 61 64 64 65 64 29 29 | 20 28 64 65 66 75 6e 20 | added))| (defun |
|00003800| 75 70 64 61 74 65 2d 63 | 6c 69 70 62 6f 61 72 64 |update-c|lipboard|
|00003810| 20 28 73 74 72 29 20 28 | 61 6d 69 67 61 2d 63 75 | (str) (|amiga-cu|
|00003820| 74 20 73 74 72 29 20 28 | 73 65 74 71 20 61 6d 69 |t str) (|setq ami|
|00003830| 67 61 2d 6e 65 77 2d 63 | 6c 69 70 20 6e 69 6c 29 |ga-new-c|lip nil)|
|00003840| 29 29 20 28 70 72 6f 67 | 6e 20 28 64 65 66 75 6e |)) (prog|n (defun|
|00003850| 20 63 68 65 63 6b 2d 63 | 6c 69 70 62 6f 61 72 64 | check-c|lipboard|
|00003860| 20 6e 69 6c 20 6e 69 6c | 29 20 28 64 65 66 75 6e | nil nil|) (defun|
|00003870| 20 75 70 64 61 74 65 2d | 63 6c 69 70 62 6f 61 72 | update-|clipboar|
|00003880| 64 20 6e 69 6c 20 6e 69 | 6c 29 29 29 0a 0a 28 64 |d nil ni|l)))..(d|
|00003890| 65 66 75 6e 20 6b 69 6c | 6c 2d 61 70 70 65 6e 64 |efun kil|l-append|
|000038a0| 20 28 73 74 72 69 6e 67 | 20 62 65 66 6f 72 65 2d | (string| before-|
|000038b0| 70 29 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 c3 |p) (byte|-code ".|
|000038c0| 08 09 83 0d 00 0a 08 40 | 50 82 11 00 08 40 0a 50 |.......@|P....@.P|
|000038d0| 5c 22 88 c4 08 40 21 87 | 22 20 5b 6b 69 6c 6c 2d |\"...@!.|" [kill-|
|000038e0| 72 69 6e 67 20 62 65 66 | 6f 72 65 2d 70 20 73 74 |ring bef|ore-p st|
|000038f0| 72 69 6e 67 20 73 65 74 | 63 61 72 20 75 70 64 61 |ring set|car upda|
|00003900| 74 65 2d 63 6c 69 70 62 | 6f 61 72 64 5d 20 34 29 |te-clipb|oard] 4)|
|00003910| 29 0a 0a 28 64 65 66 75 | 6e 20 6b 69 6c 6c 2d 61 |)..(defu|n kill-a|
|00003920| 64 64 20 28 73 74 72 69 | 6e 67 29 20 28 62 79 74 |dd (stri|ng) (byt|
|00003930| 65 2d 63 6f 64 65 20 22 | c4 20 88 09 08 42 89 10 |e-code "|. ...B..|
|00003940| 88 c5 09 21 88 08 47 0a | 56 85 1c 00 c6 c7 0a 53 |...!..G.|V......S|
|00003950| 08 5c 22 c3 5c 22 87 22 | 20 5b 6b 69 6c 6c 2d 72 |.\".\"."| [kill-r|
|00003960| 69 6e 67 20 73 74 72 69 | 6e 67 20 6b 69 6c 6c 2d |ing stri|ng kill-|
|00003970| 72 69 6e 67 2d 6d 61 78 | 20 6e 69 6c 20 63 68 65 |ring-max| nil che|
|00003980| 63 6b 2d 63 6c 69 70 62 | 6f 61 72 64 20 75 70 64 |ck-clipb|oard upd|
|00003990| 61 74 65 2d 63 6c 69 70 | 62 6f 61 72 64 20 73 65 |ate-clip|board se|
|000039a0| 74 63 64 72 20 6e 74 68 | 63 64 72 5d 20 36 29 29 |tcdr nth|cdr] 6))|
|000039b0| 0a 0a 28 64 65 66 75 6e | 20 6b 69 6c 6c 2d 72 65 |..(defun| kill-re|
|000039c0| 67 69 6f 6e 20 28 62 65 | 67 20 65 6e 64 29 20 22 |gion (be|g end) "|
|000039d0| 5c 0a 4b 69 6c 6c 20 62 | 65 74 77 65 65 6e 20 70 |\.Kill b|etween p|
|000039e0| 6f 69 6e 74 20 61 6e 64 | 20 6d 61 72 6b 2e 0a 54 |oint and| mark..T|
|000039f0| 68 65 20 74 65 78 74 20 | 69 73 20 64 65 6c 65 74 |he text |is delet|
|00003a00| 65 64 20 62 75 74 20 73 | 61 76 65 64 20 69 6e 20 |ed but s|aved in |
|00003a10| 74 68 65 20 6b 69 6c 6c | 20 72 69 6e 67 2e 0a 54 |the kill| ring..T|
|00003a20| 68 65 20 63 6f 6d 6d 61 | 6e 64 20 5c 5c 5b 79 61 |he comma|nd \\[ya|
|00003a30| 6e 6b 5d 20 63 61 6e 20 | 72 65 74 72 69 65 76 65 |nk] can |retrieve|
|00003a40| 20 69 74 20 66 72 6f 6d | 20 74 68 65 72 65 2e 0a | it from| there..|
|00003a50| 28 49 66 20 79 6f 75 20 | 77 61 6e 74 20 74 6f 20 |(If you |want to |
|00003a60| 6b 69 6c 6c 20 61 6e 64 | 20 74 68 65 6e 20 79 61 |kill and| then ya|
|00003a70| 6e 6b 20 69 6d 6d 65 64 | 69 61 74 65 6c 79 2c 20 |nk immed|iately, |
|00003a80| 75 73 65 20 5c 5c 5b 63 | 6f 70 79 2d 72 65 67 69 |use \\[c|opy-regi|
|00003a90| 6f 6e 2d 61 73 2d 6b 69 | 6c 6c 5d 2e 29 0a 0a 54 |on-as-ki|ll].)..T|
|00003aa0| 68 69 73 20 69 73 20 74 | 68 65 20 70 72 69 6d 69 |his is t|he primi|
|00003ab0| 74 69 76 65 20 66 6f 72 | 20 70 72 6f 67 72 61 6d |tive for| program|
|00003ac0| 73 20 74 6f 20 6b 69 6c | 6c 20 74 65 78 74 20 28 |s to kil|l text (|
|00003ad0| 61 73 20 6f 70 70 6f 73 | 65 64 20 74 6f 20 64 65 |as oppos|ed to de|
|00003ae0| 6c 65 74 69 6e 67 20 69 | 74 29 2e 0a 53 75 70 70 |leting i|t)..Supp|
|00003af0| 6c 79 20 74 77 6f 20 61 | 72 67 75 6d 65 6e 74 73 |ly two a|rguments|
|00003b00| 2c 20 63 68 61 72 61 63 | 74 65 72 20 6e 75 6d 62 |, charac|ter numb|
|00003b10| 65 72 73 20 69 6e 64 69 | 63 61 74 69 6e 67 20 74 |ers indi|cating t|
|00003b20| 68 65 20 73 74 72 65 74 | 63 68 20 6f 66 20 74 65 |he stret|ch of te|
|00003b30| 78 74 0a 20 74 6f 20 62 | 65 20 6b 69 6c 6c 65 64 |xt. to b|e killed|
|00003b40| 2e 0a 41 6e 79 20 63 6f | 6d 6d 61 6e 64 20 74 68 |..Any co|mmand th|
|00003b50| 61 74 20 63 61 6c 6c 73 | 20 74 68 69 73 20 66 75 |at calls| this fu|
|00003b60| 6e 63 74 69 6f 6e 20 69 | 73 20 61 20 5c 22 6b 69 |nction i|s a \"ki|
|00003b70| 6c 6c 20 63 6f 6d 6d 61 | 6e 64 5c 22 2e 0a 49 66 |ll comma|nd\"..If|
|00003b80| 20 74 68 65 20 70 72 65 | 76 69 6f 75 73 20 63 6f | the pre|vious co|
|00003b90| 6d 6d 61 6e 64 20 77 61 | 73 20 61 6c 73 6f 20 61 |mmand wa|s also a|
|00003ba0| 20 6b 69 6c 6c 20 63 6f | 6d 6d 61 6e 64 2c 0a 74 | kill co|mmand,.t|
|00003bb0| 68 65 20 74 65 78 74 20 | 6b 69 6c 6c 65 64 20 74 |he text |killed t|
|00003bc0| 68 69 73 20 74 69 6d 65 | 20 61 70 70 65 6e 64 73 |his time| appends|
|00003bd0| 20 74 6f 20 74 68 65 20 | 74 65 78 74 20 6b 69 6c | to the |text kil|
|00003be0| 6c 65 64 20 6c 61 73 74 | 20 74 69 6d 65 0a 74 6f |led last| time.to|
|00003bf0| 20 6d 61 6b 65 20 6f 6e | 65 20 65 6e 74 72 79 20 | make on|e entry |
|00003c00| 69 6e 20 74 68 65 20 6b | 69 6c 6c 20 72 69 6e 67 |in the k|ill ring|
|00003c10| 2e 22 20 28 69 6e 74 65 | 72 61 63 74 69 76 65 20 |." (inte|ractive |
|00003c20| 22 2a 72 22 29 20 28 62 | 79 74 65 2d 63 6f 64 65 |"*r") (b|yte-code|
|00003c30| 20 22 ca 88 08 c1 3d 3f | 85 19 00 0a cb 3d 3f 85 | "....=?|.....=?.|
|00003c40| 19 00 0b 0c 3d 3f 85 19 | 00 0d 3f 83 40 00 0b 0c |....=?..|..?.@...|
|00003c50| 5d 0b 0c 5e 5a cc 5c 5c | 1e 06 cd 0b 0c 5c 22 88 |]..^Z.\\|.....\".|
|00003c60| ce 08 40 40 21 88 cb 89 | 16 07 88 0e 09 89 16 08 |..@@!...|........|
|00003c70| 29 82 49 00 cf 0b 0c 5c | 22 88 cd 0b 0c 5c 22 87 |).I....\|"....\".|
|00003c80| 22 20 5b 62 75 66 66 65 | 72 2d 75 6e 64 6f 2d 6c |" [buffe|r-undo-l|
|00003c90| 69 73 74 20 74 20 6c 61 | 73 74 2d 63 6f 6d 6d 61 |ist t la|st-comma|
|00003ca0| 6e 64 20 62 65 67 20 65 | 6e 64 20 62 75 66 66 65 |nd beg e|nd buffe|
|00003cb0| 72 2d 72 65 61 64 2d 6f | 6e 6c 79 20 75 6e 64 6f |r-read-o|nly undo|
|00003cc0| 2d 68 69 67 68 2d 74 68 | 72 65 73 68 6f 6c 64 20 |-high-th|reshold |
|00003cd0| 74 68 69 73 2d 63 6f 6d | 6d 61 6e 64 20 6b 69 6c |this-com|mand kil|
|00003ce0| 6c 2d 72 69 6e 67 2d 79 | 61 6e 6b 2d 70 6f 69 6e |l-ring-y|ank-poin|
|00003cf0| 74 65 72 20 6b 69 6c 6c | 2d 72 69 6e 67 20 6e 69 |ter kill|-ring ni|
|00003d00| 6c 20 6b 69 6c 6c 2d 72 | 65 67 69 6f 6e 20 31 30 |l kill-r|egion 10|
|00003d10| 30 20 64 65 6c 65 74 65 | 2d 72 65 67 69 6f 6e 20 |0 delete|-region |
|00003d20| 6b 69 6c 6c 2d 61 64 64 | 20 63 6f 70 79 2d 72 65 |kill-add| copy-re|
|00003d30| 67 69 6f 6e 2d 61 73 2d | 6b 69 6c 6c 5d 20 36 29 |gion-as-|kill] 6)|
|00003d40| 29 0a 0a 28 66 73 65 74 | 20 28 71 75 6f 74 65 20 |)..(fset| (quote |
|00003d50| 6b 69 6c 6c 2d 72 69 6e | 67 2d 73 61 76 65 29 20 |kill-rin|g-save) |
|00003d60| 28 71 75 6f 74 65 20 63 | 6f 70 79 2d 72 65 67 69 |(quote c|opy-regi|
|00003d70| 6f 6e 2d 61 73 2d 6b 69 | 6c 6c 29 29 0a 0a 28 64 |on-as-ki|ll))..(d|
|00003d80| 65 66 75 6e 20 63 6f 70 | 79 2d 72 65 67 69 6f 6e |efun cop|y-region|
|00003d90| 2d 61 73 2d 6b 69 6c 6c | 20 28 62 65 67 20 65 6e |-as-kill| (beg en|
|00003da0| 64 29 20 22 5c 0a 53 61 | 76 65 20 74 68 65 20 72 |d) "\.Sa|ve the r|
|00003db0| 65 67 69 6f 6e 20 61 73 | 20 69 66 20 6b 69 6c 6c |egion as| if kill|
|00003dc0| 65 64 2c 20 62 75 74 20 | 64 6f 6e 27 74 20 6b 69 |ed, but |don't ki|
|00003dd0| 6c 6c 20 69 74 2e 22 20 | 28 69 6e 74 65 72 61 63 |ll it." |(interac|
|00003de0| 74 69 76 65 20 22 72 22 | 29 20 28 62 79 74 65 2d |tive "r"|) (byte-|
|00003df0| 63 6f 64 65 20 22 c6 88 | 08 c7 3d 85 0b 00 c8 20 |code "..|..=.... |
|00003e00| 3f 83 1a 00 c9 ca 09 0a | 5c 22 0a 09 57 5c 22 82 |?.......|\"..W\".|
|00003e10| 20 00 cb ca 09 0a 5c 22 | 21 88 c7 89 13 88 0d 89 | .....\"|!.......|
|00003e20| 14 87 22 20 5b 6c 61 73 | 74 2d 63 6f 6d 6d 61 6e |.." [las|t-comman|
|00003e30| 64 20 62 65 67 20 65 6e | 64 20 74 68 69 73 2d 63 |d beg en|d this-c|
|00003e40| 6f 6d 6d 61 6e 64 20 6b | 69 6c 6c 2d 72 69 6e 67 |ommand k|ill-ring|
|00003e50| 2d 79 61 6e 6b 2d 70 6f | 69 6e 74 65 72 20 6b 69 |-yank-po|inter ki|
|00003e60| 6c 6c 2d 72 69 6e 67 20 | 6e 69 6c 20 6b 69 6c 6c |ll-ring |nil kill|
|00003e70| 2d 72 65 67 69 6f 6e 20 | 63 68 65 63 6b 2d 63 6c |-region |check-cl|
|00003e80| 69 70 62 6f 61 72 64 20 | 6b 69 6c 6c 2d 61 70 70 |ipboard |kill-app|
|00003e90| 65 6e 64 20 62 75 66 66 | 65 72 2d 73 75 62 73 74 |end buff|er-subst|
|00003ea0| 72 69 6e 67 20 6b 69 6c | 6c 2d 61 64 64 5d 20 37 |ring kil|l-add] 7|
|00003eb0| 29 29 0a 0a 28 64 65 66 | 75 6e 20 61 70 70 65 6e |))..(def|un appen|
|00003ec0| 64 2d 6e 65 78 74 2d 6b | 69 6c 6c 20 6e 69 6c 20 |d-next-k|ill nil |
|00003ed0| 22 5c 0a 43 61 75 73 65 | 20 66 6f 6c 6c 6f 77 69 |"\.Cause| followi|
|00003ee0| 6e 67 20 63 6f 6d 6d 61 | 6e 64 2c 20 69 66 20 6b |ng comma|nd, if k|
|00003ef0| 69 6c 6c 2c 20 74 6f 20 | 61 70 70 65 6e 64 20 74 |ill, to |append t|
|00003f00| 6f 20 70 72 65 76 69 6f | 75 73 20 6b 69 6c 6c 2e |o previo|us kill.|
|00003f10| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 29 20 |" (inter|active) |
|00003f20| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c2 88 74 83 |(byte-co|de "..t.|
|00003f30| 0c 00 c3 89 10 82 0f 00 | c3 89 11 87 22 20 5b 74 |........|...." [t|
|00003f40| 68 69 73 2d 63 6f 6d 6d | 61 6e 64 20 6c 61 73 74 |his-comm|and last|
|00003f50| 2d 63 6f 6d 6d 61 6e 64 | 20 6e 69 6c 20 6b 69 6c |-command| nil kil|
|00003f60| 6c 2d 72 65 67 69 6f 6e | 5d 20 32 29 29 0a 0a 28 |l-region|] 2))..(|
|00003f70| 64 65 66 75 6e 20 72 6f | 74 61 74 65 2d 79 61 6e |defun ro|tate-yan|
|00003f80| 6b 2d 70 6f 69 6e 74 65 | 72 20 28 61 72 67 29 20 |k-pointe|r (arg) |
|00003f90| 22 5c 0a 52 6f 74 61 74 | 65 20 74 68 65 20 79 61 |"\.Rotat|e the ya|
|00003fa0| 6e 6b 69 6e 67 20 70 6f | 69 6e 74 20 69 6e 20 74 |nking po|int in t|
|00003fb0| 68 65 20 6b 69 6c 6c 20 | 72 69 6e 67 2e 22 20 28 |he kill |ring." (|
|00003fc0| 69 6e 74 65 72 61 63 74 | 69 76 65 20 22 70 22 29 |interact|ive "p")|
|00003fd0| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c4 88 09 | (byte-c|ode "...|
|00003fe0| 47 18 c5 08 21 83 11 00 | c6 c7 21 82 1f 00 c8 c9 |G...!...|..!.....|
|00003ff0| 0b 08 0a 47 5a 5c 5c 08 | 5c 22 09 5c 22 89 12 29 |...GZ\\.|\".\"..)|
|00004000| 87 22 20 5b 6c 65 6e 67 | 74 68 20 6b 69 6c 6c 2d |." [leng|th kill-|
|00004010| 72 69 6e 67 20 6b 69 6c | 6c 2d 72 69 6e 67 2d 79 |ring kil|l-ring-y|
|00004020| 61 6e 6b 2d 70 6f 69 6e | 74 65 72 20 61 72 67 20 |ank-poin|ter arg |
|00004030| 6e 69 6c 20 7a 65 72 6f | 70 20 65 72 72 6f 72 20 |nil zero|p error |
|00004040| 22 4b 69 6c 6c 20 72 69 | 6e 67 20 69 73 20 65 6d |"Kill ri|ng is em|
|00004050| 70 74 79 22 20 6e 74 68 | 63 64 72 20 25 5d 20 37 |pty" nth|cdr %] 7|
|00004060| 29 29 0a 0a 28 64 65 66 | 75 6e 20 79 61 6e 6b 2d |))..(def|un yank-|
|00004070| 70 6f 70 20 28 61 72 67 | 29 20 22 5c 0a 52 65 70 |pop (arg|) "\.Rep|
|00004080| 6c 61 63 65 20 6a 75 73 | 74 2d 79 61 6e 6b 65 64 |lace jus|t-yanked|
|00004090| 20 73 74 72 65 74 63 68 | 20 6f 66 20 6b 69 6c 6c | stretch| of kill|
|000040a0| 65 64 2d 74 65 78 74 20 | 77 69 74 68 20 61 20 64 |ed-text |with a d|
|000040b0| 69 66 66 65 72 65 6e 74 | 20 73 74 72 65 74 63 68 |ifferent| stretch|
|000040c0| 2e 0a 54 68 69 73 20 63 | 6f 6d 6d 61 6e 64 20 69 |..This c|ommand i|
|000040d0| 73 20 61 6c 6c 6f 77 65 | 64 20 6f 6e 6c 79 20 69 |s allowe|d only i|
|000040e0| 6d 6d 65 64 69 61 74 65 | 6c 79 20 61 66 74 65 72 |mmediate|ly after|
|000040f0| 20 61 20 20 79 61 6e 6b | 20 20 6f 72 20 61 20 20 | a yank| or a |
|00004100| 79 61 6e 6b 2d 70 6f 70 | 2e 0a 41 74 20 73 75 63 |yank-pop|..At suc|
|00004110| 68 20 61 20 74 69 6d 65 | 2c 20 74 68 65 20 72 65 |h a time|, the re|
|00004120| 67 69 6f 6e 20 63 6f 6e | 74 61 69 6e 73 20 61 20 |gion con|tains a |
|00004130| 73 74 72 65 74 63 68 20 | 6f 66 20 72 65 69 6e 73 |stretch |of reins|
|00004140| 65 72 74 65 64 0a 70 72 | 65 76 69 6f 75 73 6c 79 |erted.pr|eviously|
|00004150| 2d 6b 69 6c 6c 65 64 20 | 74 65 78 74 2e 20 20 79 |-killed |text. y|
|00004160| 61 6e 6b 2d 70 6f 70 20 | 20 64 65 6c 65 74 65 73 |ank-pop | deletes|
|00004170| 20 74 68 61 74 20 74 65 | 78 74 20 61 6e 64 20 69 | that te|xt and i|
|00004180| 6e 73 65 72 74 73 20 69 | 6e 20 69 74 73 0a 70 6c |nserts i|n its.pl|
|00004190| 61 63 65 20 61 20 64 69 | 66 66 65 72 65 6e 74 20 |ace a di|fferent |
|000041a0| 73 74 72 65 74 63 68 20 | 6f 66 20 6b 69 6c 6c 65 |stretch |of kille|
|000041b0| 64 20 74 65 78 74 2e 0a | 0a 57 69 74 68 20 6e 6f |d text..|.With no|
|000041c0| 20 61 72 67 75 6d 65 6e | 74 2c 20 74 68 65 20 70 | argumen|t, the p|
|000041d0| 72 65 76 69 6f 75 73 20 | 6b 69 6c 6c 20 69 73 20 |revious |kill is |
|000041e0| 69 6e 73 65 72 74 65 64 | 2e 0a 57 69 74 68 20 61 |inserted|..With a|
|000041f0| 72 67 75 6d 65 6e 74 20 | 6e 2c 20 74 68 65 20 6e |rgument |n, the n|
|00004200| 27 74 68 20 70 72 65 76 | 69 6f 75 73 20 6b 69 6c |'th prev|ious kil|
|00004210| 6c 20 69 73 20 69 6e 73 | 65 72 74 65 64 2e 0a 49 |l is ins|erted..I|
|00004220| 66 20 6e 20 69 73 20 6e | 65 67 61 74 69 76 65 2c |f n is n|egative,|
|00004230| 20 74 68 69 73 20 69 73 | 20 61 20 6d 6f 72 65 20 | this is| a more |
|00004240| 72 65 63 65 6e 74 20 6b | 69 6c 6c 2e 0a 0a 54 68 |recent k|ill...Th|
|00004250| 65 20 73 65 71 75 65 6e | 63 65 20 6f 66 20 6b 69 |e sequen|ce of ki|
|00004260| 6c 6c 73 20 77 72 61 70 | 73 20 61 72 6f 75 6e 64 |lls wrap|s around|
|00004270| 2c 20 73 6f 20 74 68 61 | 74 20 61 66 74 65 72 20 |, so tha|t after |
|00004280| 74 68 65 20 6f 6c 64 65 | 73 74 20 6f 6e 65 0a 63 |the olde|st one.c|
|00004290| 6f 6d 65 73 20 74 68 65 | 20 6e 65 77 65 73 74 20 |omes the| newest |
|000042a0| 6f 6e 65 2e 22 20 28 69 | 6e 74 65 72 61 63 74 69 |one." (i|nteracti|
|000042b0| 76 65 20 22 2a 70 22 29 | 20 28 62 79 74 65 2d 63 |ve "*p")| (byte-c|
|000042c0| 6f 64 65 20 22 c5 88 08 | c6 3d 3f 85 0c 00 c7 c8 |ode "...|.=?.....|
|000042d0| 21 88 c6 89 11 88 60 c9 | 20 57 1a ca 60 c9 20 5c |!.....`.| W..`. \|
|000042e0| 22 88 cb 0b 21 88 cc 60 | 21 88 0c 40 63 88 0a 85 |"...!..`|!..@c...|
|000042f0| 2e 00 cd 20 29 87 22 20 | 5b 6c 61 73 74 2d 63 6f |... )." |[last-co|
|00004300| 6d 6d 61 6e 64 20 74 68 | 69 73 2d 63 6f 6d 6d 61 |mmand th|is-comma|
|00004310| 6e 64 20 62 65 66 6f 72 | 65 20 61 72 67 20 6b 69 |nd befor|e arg ki|
|00004320| 6c 6c 2d 72 69 6e 67 2d | 79 61 6e 6b 2d 70 6f 69 |ll-ring-|yank-poi|
|00004330| 6e 74 65 72 20 6e 69 6c | 20 79 61 6e 6b 20 65 72 |nter nil| yank er|
|00004340| 72 6f 72 20 22 50 72 65 | 76 69 6f 75 73 20 63 6f |ror "Pre|vious co|
|00004350| 6d 6d 61 6e 64 20 77 61 | 73 20 6e 6f 74 20 61 20 |mmand wa|s not a |
|00004360| 79 61 6e 6b 22 20 6d 61 | 72 6b 20 64 65 6c 65 74 |yank" ma|rk delet|
|00004370| 65 2d 72 65 67 69 6f 6e | 20 72 6f 74 61 74 65 2d |e-region| rotate-|
|00004380| 79 61 6e 6b 2d 70 6f 69 | 6e 74 65 72 20 73 65 74 |yank-poi|nter set|
|00004390| 2d 6d 61 72 6b 20 65 78 | 63 68 61 6e 67 65 2d 70 |-mark ex|change-p|
|000043a0| 6f 69 6e 74 2d 61 6e 64 | 2d 6d 61 72 6b 5d 20 38 |oint-and|-mark] 8|
|000043b0| 29 29 0a 0a 28 64 65 66 | 75 6e 20 79 61 6e 6b 20 |))..(def|un yank |
|000043c0| 28 26 6f 70 74 69 6f 6e | 61 6c 20 61 72 67 29 20 |(&option|al arg) |
|000043d0| 22 5c 0a 52 65 69 6e 73 | 65 72 74 20 74 68 65 20 |"\.Reins|ert the |
|000043e0| 6c 61 73 74 20 73 74 72 | 65 74 63 68 20 6f 66 20 |last str|etch of |
|000043f0| 6b 69 6c 6c 65 64 20 74 | 65 78 74 2e 0a 4d 6f 72 |killed t|ext..Mor|
|00004400| 65 20 70 72 65 63 69 73 | 65 6c 79 2c 20 72 65 69 |e precis|ely, rei|
|00004410| 6e 73 65 72 74 20 74 68 | 65 20 73 74 72 65 74 63 |nsert th|e stretc|
|00004420| 68 20 6f 66 20 6b 69 6c | 6c 65 64 20 74 65 78 74 |h of kil|led text|
|00004430| 20 6d 6f 73 74 20 72 65 | 63 65 6e 74 6c 79 0a 6b | most re|cently.k|
|00004440| 69 6c 6c 65 64 20 4f 52 | 20 79 61 6e 6b 65 64 2e |illed OR| yanked.|
|00004450| 0a 57 69 74 68 20 6a 75 | 73 74 20 43 2d 55 20 61 |.With ju|st C-U a|
|00004460| 73 20 61 72 67 75 6d 65 | 6e 74 2c 20 73 61 6d 65 |s argume|nt, same|
|00004470| 20 62 75 74 20 70 75 74 | 20 70 6f 69 6e 74 20 69 | but put| point i|
|00004480| 6e 20 66 72 6f 6e 74 20 | 28 61 6e 64 20 6d 61 72 |n front |(and mar|
|00004490| 6b 20 61 74 20 65 6e 64 | 29 2e 0a 57 69 74 68 20 |k at end|)..With |
|000044a0| 61 72 67 75 6d 65 6e 74 | 20 6e 2c 20 72 65 69 6e |argument| n, rein|
|000044b0| 73 65 72 74 20 74 68 65 | 20 6e 74 68 20 6d 6f 73 |sert the| nth mos|
|000044c0| 74 20 72 65 63 65 6e 74 | 6c 79 20 6b 69 6c 6c 65 |t recent|ly kille|
|000044d0| 64 20 73 74 72 65 74 63 | 68 20 6f 66 20 6b 69 6c |d stretc|h of kil|
|000044e0| 6c 65 64 0a 74 65 78 74 | 2e 0a 53 65 65 20 61 6c |led.text|..See al|
|000044f0| 73 6f 20 74 68 65 20 63 | 6f 6d 6d 61 6e 64 20 5c |so the c|ommand \|
|00004500| 5c 5b 79 61 6e 6b 2d 70 | 6f 70 5d 2e 22 20 28 69 |\[yank-p|op]." (i|
|00004510| 6e 74 65 72 61 63 74 69 | 76 65 20 22 2a 50 22 29 |nteracti|ve "*P")|
|00004520| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c2 88 c3 | (byte-c|ode "...|
|00004530| 20 88 c4 08 3c 83 0f 00 | c5 82 1b 00 08 c6 3d 83 | ...<...|......=.|
|00004540| 19 00 c7 82 1b 00 08 53 | 21 88 c8 60 21 88 09 40 |.......S|!..`!..@|
|00004550| 63 88 08 3a 85 2c 00 c9 | 20 87 22 20 5b 61 72 67 |c..:.,..| ." [arg|
|00004560| 20 6b 69 6c 6c 2d 72 69 | 6e 67 2d 79 61 6e 6b 2d | kill-ri|ng-yank-|
|00004570| 70 6f 69 6e 74 65 72 20 | 6e 69 6c 20 63 68 65 63 |pointer |nil chec|
|00004580| 6b 2d 63 6c 69 70 62 6f | 61 72 64 20 72 6f 74 61 |k-clipbo|ard rota|
|00004590| 74 65 2d 79 61 6e 6b 2d | 70 6f 69 6e 74 65 72 20 |te-yank-|pointer |
|000045a0| 30 20 2d 20 2d 31 20 70 | 75 73 68 2d 6d 61 72 6b |0 - -1 p|ush-mark|
|000045b0| 20 65 78 63 68 61 6e 67 | 65 2d 70 6f 69 6e 74 2d | exchang|e-point-|
|000045c0| 61 6e 64 2d 6d 61 72 6b | 5d 20 35 29 29 0a 0a 28 |and-mark|] 5))..(|
|000045d0| 64 65 66 75 6e 20 69 6e | 73 65 72 74 2d 62 75 66 |defun in|sert-buf|
|000045e0| 66 65 72 20 28 62 75 66 | 66 65 72 29 20 22 5c 0a |fer (buf|fer) "\.|
|000045f0| 49 6e 73 65 72 74 20 61 | 66 74 65 72 20 70 6f 69 |Insert a|fter poi|
|00004600| 6e 74 20 74 68 65 20 63 | 6f 6e 74 65 6e 74 73 20 |nt the c|ontents |
|00004610| 6f 66 20 42 55 46 46 45 | 52 2e 0a 50 75 74 73 20 |of BUFFE|R..Puts |
|00004620| 6d 61 72 6b 20 61 66 74 | 65 72 20 74 68 65 20 69 |mark aft|er the i|
|00004630| 6e 73 65 72 74 65 64 20 | 74 65 78 74 2e 0a 42 55 |nserted |text..BU|
|00004640| 46 46 45 52 20 6d 61 79 | 20 62 65 20 61 20 62 75 |FFER may| be a bu|
|00004650| 66 66 65 72 20 6f 72 20 | 61 20 62 75 66 66 65 72 |ffer or |a buffer|
|00004660| 20 6e 61 6d 65 2e 22 20 | 28 69 6e 74 65 72 61 63 | name." |(interac|
|00004670| 74 69 76 65 20 22 2a 62 | 49 6e 73 65 72 74 20 62 |tive "*b|Insert b|
|00004680| 75 66 66 65 72 3a 20 22 | 29 20 28 62 79 74 65 2d |uffer: "|) (byte-|
|00004690| 63 6f 64 65 20 22 c4 88 | c5 08 21 86 0d 00 c6 08 |code "..|..!.....|
|000046a0| 21 89 10 88 c4 c4 c4 1b | 1a 19 8a 8a 08 71 88 65 |!.......|.....q.e|
|000046b0| 11 64 89 12 29 88 c7 08 | 09 0a 23 88 60 89 13 29 |.d..)...|..#.`..)|
|000046c0| 88 c8 0b 21 2b 87 22 20 | 5b 62 75 66 66 65 72 20 |...!+." |[buffer |
|000046d0| 73 74 61 72 74 20 65 6e | 64 20 6e 65 77 6d 61 72 |start en|d newmar|
|000046e0| 6b 20 6e 69 6c 20 62 75 | 66 66 65 72 70 20 67 65 |k nil bu|fferp ge|
|000046f0| 74 2d 62 75 66 66 65 72 | 20 69 6e 73 65 72 74 2d |t-buffer| insert-|
|00004700| 62 75 66 66 65 72 2d 73 | 75 62 73 74 72 69 6e 67 |buffer-s|ubstring|
|00004710| 20 70 75 73 68 2d 6d 61 | 72 6b 5d 20 36 29 29 0a | push-ma|rk] 6)).|
|00004720| 0a 28 64 65 66 75 6e 20 | 61 70 70 65 6e 64 2d 74 |.(defun |append-t|
|00004730| 6f 2d 62 75 66 66 65 72 | 20 28 62 75 66 66 65 72 |o-buffer| (buffer|
|00004740| 20 73 74 61 72 74 20 65 | 6e 64 29 20 22 5c 0a 41 | start e|nd) "\.A|
|00004750| 70 70 65 6e 64 20 74 6f | 20 73 70 65 63 69 66 69 |ppend to| specifi|
|00004760| 65 64 20 62 75 66 66 65 | 72 20 74 68 65 20 74 65 |ed buffe|r the te|
|00004770| 78 74 20 6f 66 20 74 68 | 65 20 72 65 67 69 6f 6e |xt of th|e region|
|00004780| 2e 0a 49 74 20 69 73 20 | 69 6e 73 65 72 74 65 64 |..It is |inserted|
|00004790| 20 69 6e 74 6f 20 74 68 | 61 74 20 62 75 66 66 65 | into th|at buffe|
|000047a0| 72 20 62 65 66 6f 72 65 | 20 69 74 73 20 70 6f 69 |r before| its poi|
|000047b0| 6e 74 2e 0a 0a 57 68 65 | 6e 20 63 61 6c 6c 69 6e |nt...Whe|n callin|
|000047c0| 67 20 66 72 6f 6d 20 61 | 20 70 72 6f 67 72 61 6d |g from a| program|
|000047d0| 2c 20 67 69 76 65 20 74 | 68 72 65 65 20 61 72 67 |, give t|hree arg|
|000047e0| 75 6d 65 6e 74 73 3a 0a | 61 20 62 75 66 66 65 72 |uments:.|a buffer|
|000047f0| 20 6f 72 20 74 68 65 20 | 6e 61 6d 65 20 6f 66 20 | or the |name of |
|00004800| 6f 6e 65 2c 20 61 6e 64 | 20 74 77 6f 20 63 68 61 |one, and| two cha|
|00004810| 72 61 63 74 65 72 20 6e | 75 6d 62 65 72 73 0a 73 |racter n|umbers.s|
|00004820| 70 65 63 69 66 79 69 6e | 67 20 74 68 65 20 70 6f |pecifyin|g the po|
|00004830| 72 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 63 75 72 |rtion of| the cur|
|00004840| 72 65 6e 74 20 62 75 66 | 66 65 72 20 74 6f 20 62 |rent buf|fer to b|
|00004850| 65 20 63 6f 70 69 65 64 | 2e 22 20 28 69 6e 74 65 |e copied|." (inte|
|00004860| 72 61 63 74 69 76 65 20 | 22 42 41 70 70 65 6e 64 |ractive |"BAppend|
|00004870| 20 74 6f 20 62 75 66 66 | 65 72 3a 20 0a 72 22 29 | to buff|er: .r")|
|00004880| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c4 88 70 | (byte-c|ode "..p|
|00004890| 18 8a c5 09 21 71 88 c6 | 08 0a 0b 23 29 29 87 22 |....!q..|...#))."|
|000048a0| 20 5b 6f 6c 64 62 75 66 | 20 62 75 66 66 65 72 20 | [oldbuf| buffer |
|000048b0| 73 74 61 72 74 20 65 6e | 64 20 6e 69 6c 20 67 65 |start en|d nil ge|
|000048c0| 74 2d 62 75 66 66 65 72 | 2d 63 72 65 61 74 65 20 |t-buffer|-create |
|000048d0| 69 6e 73 65 72 74 2d 62 | 75 66 66 65 72 2d 73 75 |insert-b|uffer-su|
|000048e0| 62 73 74 72 69 6e 67 5d | 20 35 29 29 0a 0a 28 64 |bstring]| 5))..(d|
|000048f0| 65 66 75 6e 20 70 72 65 | 70 65 6e 64 2d 74 6f 2d |efun pre|pend-to-|
|00004900| 62 75 66 66 65 72 20 28 | 62 75 66 66 65 72 20 73 |buffer (|buffer s|
|00004910| 74 61 72 74 20 65 6e 64 | 29 20 22 5c 0a 50 72 65 |tart end|) "\.Pre|
|00004920| 70 65 6e 64 20 74 6f 20 | 73 70 65 63 69 66 69 65 |pend to |specifie|
|00004930| 64 20 62 75 66 66 65 72 | 20 74 68 65 20 74 65 78 |d buffer| the tex|
|00004940| 74 20 6f 66 20 74 68 65 | 20 72 65 67 69 6f 6e 2e |t of the| region.|
|00004950| 0a 49 74 20 69 73 20 69 | 6e 73 65 72 74 65 64 20 |.It is i|nserted |
|00004960| 69 6e 74 6f 20 74 68 61 | 74 20 62 75 66 66 65 72 |into tha|t buffer|
|00004970| 20 61 66 74 65 72 20 69 | 74 73 20 70 6f 69 6e 74 | after i|ts point|
|00004980| 2e 0a 0a 57 68 65 6e 20 | 63 61 6c 6c 69 6e 67 20 |...When |calling |
|00004990| 66 72 6f 6d 20 61 20 70 | 72 6f 67 72 61 6d 2c 20 |from a p|rogram, |
|000049a0| 67 69 76 65 20 74 68 72 | 65 65 20 61 72 67 75 6d |give thr|ee argum|
|000049b0| 65 6e 74 73 3a 0a 61 20 | 62 75 66 66 65 72 20 6f |ents:.a |buffer o|
|000049c0| 72 20 74 68 65 20 6e 61 | 6d 65 20 6f 66 20 6f 6e |r the na|me of on|
|000049d0| 65 2c 20 61 6e 64 20 74 | 77 6f 20 63 68 61 72 61 |e, and t|wo chara|
|000049e0| 63 74 65 72 20 6e 75 6d | 62 65 72 73 0a 73 70 65 |cter num|bers.spe|
|000049f0| 63 69 66 79 69 6e 67 20 | 74 68 65 20 70 6f 72 74 |cifying |the port|
|00004a00| 69 6f 6e 20 6f 66 20 74 | 68 65 20 63 75 72 72 65 |ion of t|he curre|
|00004a10| 6e 74 20 62 75 66 66 65 | 72 20 74 6f 20 62 65 20 |nt buffe|r to be |
|00004a20| 63 6f 70 69 65 64 2e 22 | 20 28 69 6e 74 65 72 61 |copied."| (intera|
|00004a30| 63 74 69 76 65 20 22 42 | 50 72 65 70 65 6e 64 20 |ctive "B|Prepend |
|00004a40| 74 6f 20 62 75 66 66 65 | 72 3a 20 0a 72 22 29 20 |to buffe|r: .r") |
|00004a50| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c4 88 70 18 |(byte-co|de "..p.|
|00004a60| 8a c5 09 21 71 88 8a c6 | 08 0a 0b 23 29 29 29 87 |...!q...|...#))).|
|00004a70| 22 20 5b 6f 6c 64 62 75 | 66 20 62 75 66 66 65 72 |" [oldbu|f buffer|
|00004a80| 20 73 74 61 72 74 20 65 | 6e 64 20 6e 69 6c 20 67 | start e|nd nil g|
|00004a90| 65 74 2d 62 75 66 66 65 | 72 2d 63 72 65 61 74 65 |et-buffe|r-create|
|00004aa0| 20 69 6e 73 65 72 74 2d | 62 75 66 66 65 72 2d 73 | insert-|buffer-s|
|00004ab0| 75 62 73 74 72 69 6e 67 | 5d 20 35 29 29 0a 0a 28 |ubstring|] 5))..(|
|00004ac0| 64 65 66 75 6e 20 63 6f | 70 79 2d 74 6f 2d 62 75 |defun co|py-to-bu|
|00004ad0| 66 66 65 72 20 28 62 75 | 66 66 65 72 20 73 74 61 |ffer (bu|ffer sta|
|00004ae0| 72 74 20 65 6e 64 29 20 | 22 5c 0a 43 6f 70 79 20 |rt end) |"\.Copy |
|00004af0| 74 6f 20 73 70 65 63 69 | 66 69 65 64 20 62 75 66 |to speci|fied buf|
|00004b00| 66 65 72 20 74 68 65 20 | 74 65 78 74 20 6f 66 20 |fer the |text of |
|00004b10| 74 68 65 20 72 65 67 69 | 6f 6e 2e 0a 49 74 20 69 |the regi|on..It i|
|00004b20| 73 20 69 6e 73 65 72 74 | 65 64 20 69 6e 74 6f 20 |s insert|ed into |
|00004b30| 74 68 61 74 20 62 75 66 | 66 65 72 2c 20 72 65 70 |that buf|fer, rep|
|00004b40| 6c 61 63 69 6e 67 20 65 | 78 69 73 74 69 6e 67 20 |lacing e|xisting |
|00004b50| 74 65 78 74 20 74 68 65 | 72 65 2e 0a 0a 57 68 65 |text the|re...Whe|
|00004b60| 6e 20 63 61 6c 6c 69 6e | 67 20 66 72 6f 6d 20 61 |n callin|g from a|
|00004b70| 20 70 72 6f 67 72 61 6d | 2c 20 67 69 76 65 20 74 | program|, give t|
|00004b80| 68 72 65 65 20 61 72 67 | 75 6d 65 6e 74 73 3a 0a |hree arg|uments:.|
|00004b90| 61 20 62 75 66 66 65 72 | 20 6f 72 20 74 68 65 20 |a buffer| or the |
|00004ba0| 6e 61 6d 65 20 6f 66 20 | 6f 6e 65 2c 20 61 6e 64 |name of |one, and|
|00004bb0| 20 74 77 6f 20 63 68 61 | 72 61 63 74 65 72 20 6e | two cha|racter n|
|00004bc0| 75 6d 62 65 72 73 0a 73 | 70 65 63 69 66 79 69 6e |umbers.s|pecifyin|
|00004bd0| 67 20 74 68 65 20 70 6f | 72 74 69 6f 6e 20 6f 66 |g the po|rtion of|
|00004be0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 62 75 66 | the cur|rent buf|
|00004bf0| 66 65 72 20 74 6f 20 62 | 65 20 63 6f 70 69 65 64 |fer to b|e copied|
|00004c00| 2e 22 20 28 69 6e 74 65 | 72 61 63 74 69 76 65 20 |." (inte|ractive |
|00004c10| 22 42 43 6f 70 79 20 74 | 6f 20 62 75 66 66 65 72 |"BCopy t|o buffer|
|00004c20| 3a 20 0a 72 22 29 20 28 | 62 79 74 65 2d 63 6f 64 |: .r") (|byte-cod|
|00004c30| 65 20 22 c4 88 70 18 8a | c5 09 21 71 88 c6 20 88 |e "..p..|..!q.. .|
|00004c40| 8a c7 08 0a 0b 23 29 29 | 29 87 22 20 5b 6f 6c 64 |.....#))|)." [old|
|00004c50| 62 75 66 20 62 75 66 66 | 65 72 20 73 74 61 72 74 |buf buff|er start|
|00004c60| 20 65 6e 64 20 6e 69 6c | 20 67 65 74 2d 62 75 66 | end nil| get-buf|
|00004c70| 66 65 72 2d 63 72 65 61 | 74 65 20 65 72 61 73 65 |fer-crea|te erase|
|00004c80| 2d 62 75 66 66 65 72 20 | 69 6e 73 65 72 74 2d 62 |-buffer |insert-b|
|00004c90| 75 66 66 65 72 2d 73 75 | 62 73 74 72 69 6e 67 5d |uffer-su|bstring]|
|00004ca0| 20 36 29 29 0a 0a 28 64 | 65 66 75 6e 20 6d 61 72 | 6))..(d|efun mar|
|00004cb0| 6b 20 6e 69 6c 20 22 5c | 0a 52 65 74 75 72 6e 20 |k nil "\|.Return |
|00004cc0| 74 68 69 73 20 62 75 66 | 66 65 72 27 73 20 6d 61 |this buf|fer's ma|
|00004cd0| 72 6b 20 76 61 6c 75 65 | 20 61 73 20 69 6e 74 65 |rk value| as inte|
|00004ce0| 67 65 72 2c 20 6f 72 20 | 6e 69 6c 20 69 66 20 6e |ger, or |nil if n|
|00004cf0| 6f 20 6d 61 72 6b 2e 0a | 49 66 20 79 6f 75 20 61 |o mark..|If you a|
|00004d00| 72 65 20 75 73 69 6e 67 | 20 74 68 69 73 20 69 6e |re using| this in|
|00004d10| 20 61 6e 20 65 64 69 74 | 69 6e 67 20 63 6f 6d 6d | an edit|ing comm|
|00004d20| 61 6e 64 2c 20 79 6f 75 | 20 61 72 65 20 6d 6f 73 |and, you| are mos|
|00004d30| 74 20 6c 69 6b 65 6c 79 | 20 6d 61 6b 69 6e 67 0a |t likely| making.|
|00004d40| 61 20 6d 69 73 74 61 6b | 65 3b 20 73 65 65 20 74 |a mistak|e; see t|
|00004d50| 68 65 20 64 6f 63 75 6d | 65 6e 74 61 74 69 6f 6e |he docum|entation|
|00004d60| 20 6f 66 20 60 73 65 74 | 2d 6d 61 72 6b 27 2e 22 | of `set|-mark'."|
|00004d70| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c0 c1 20 | (byte-c|ode ".. |
|00004d80| 21 87 22 20 5b 6d 61 72 | 6b 65 72 2d 70 6f 73 69 |!." [mar|ker-posi|
|00004d90| 74 69 6f 6e 20 6d 61 72 | 6b 2d 6d 61 72 6b 65 72 |tion mar|k-marker|
|00004da0| 5d 20 33 29 29 0a 0a 28 | 64 65 66 75 6e 20 73 65 |] 3))..(|defun se|
|00004db0| 74 2d 6d 61 72 6b 20 28 | 70 6f 73 29 20 22 5c 0a |t-mark (|pos) "\.|
|00004dc0| 53 65 74 20 74 68 69 73 | 20 62 75 66 66 65 72 27 |Set this| buffer'|
|00004dd0| 73 20 6d 61 72 6b 20 74 | 6f 20 50 4f 53 2e 20 20 |s mark t|o POS. |
|00004de0| 44 6f 6e 27 74 20 75 73 | 65 20 74 68 69 73 20 66 |Don't us|e this f|
|00004df0| 75 6e 63 74 69 6f 6e 21 | 0a 54 68 61 74 20 69 73 |unction!|.That is|
|00004e00| 20 74 6f 20 73 61 79 2c | 20 64 6f 6e 27 74 20 75 | to say,| don't u|
|00004e10| 73 65 20 74 68 69 73 20 | 66 75 6e 63 74 69 6f 6e |se this |function|
|00004e20| 20 75 6e 6c 65 73 73 20 | 79 6f 75 20 77 61 6e 74 | unless |you want|
|00004e30| 0a 74 68 65 20 75 73 65 | 72 20 74 6f 20 73 65 65 |.the use|r to see|
|00004e40| 20 74 68 61 74 20 74 68 | 65 20 6d 61 72 6b 20 68 | that th|e mark h|
|00004e50| 61 73 20 6d 6f 76 65 64 | 2c 20 61 6e 64 20 79 6f |as moved|, and yo|
|00004e60| 75 20 77 61 6e 74 20 74 | 68 65 20 70 72 65 76 69 |u want t|he previ|
|00004e70| 6f 75 73 0a 6d 61 72 6b | 20 70 6f 73 69 74 69 6f |ous.mark| positio|
|00004e80| 6e 20 74 6f 20 62 65 20 | 6c 6f 73 74 2e 0a 0a 4e |n to be |lost...N|
|00004e90| 6f 72 6d 61 6c 6c 79 2c | 20 77 68 65 6e 20 61 20 |ormally,| when a |
|00004ea0| 6e 65 77 20 6d 61 72 6b | 20 69 73 20 73 65 74 2c |new mark| is set,|
|00004eb0| 20 74 68 65 20 6f 6c 64 | 20 6f 6e 65 20 73 68 6f | the old| one sho|
|00004ec0| 75 6c 64 20 67 6f 20 6f | 6e 20 74 68 65 20 73 74 |uld go o|n the st|
|00004ed0| 61 63 6b 2e 0a 54 68 69 | 73 20 69 73 20 77 68 79 |ack..Thi|s is why|
|00004ee0| 20 6d 6f 73 74 20 61 70 | 70 6c 69 63 61 74 69 6f | most ap|plicatio|
|00004ef0| 6e 73 20 73 68 6f 75 6c | 64 20 75 73 65 20 70 75 |ns shoul|d use pu|
|00004f00| 73 68 2d 6d 61 72 6b 2c | 20 6e 6f 74 20 73 65 74 |sh-mark,| not set|
|00004f10| 2d 6d 61 72 6b 2e 0a 0a | 4e 6f 76 69 63 65 20 65 |-mark...|Novice e|
|00004f20| 6d 61 63 73 2d 6c 69 73 | 70 20 70 72 6f 67 72 61 |macs-lis|p progra|
|00004f30| 6d 6d 65 72 73 20 6f 66 | 74 65 6e 20 74 72 79 20 |mmers of|ten try |
|00004f40| 74 6f 20 75 73 65 20 74 | 68 65 20 6d 61 72 6b 20 |to use t|he mark |
|00004f50| 66 6f 72 20 74 68 65 20 | 77 72 6f 6e 67 0a 70 75 |for the |wrong.pu|
|00004f60| 72 70 6f 73 65 73 2e 20 | 20 54 68 65 20 6d 61 72 |rposes. | The mar|
|00004f70| 6b 20 73 61 76 65 73 20 | 61 20 6c 6f 63 61 74 69 |k saves |a locati|
|00004f80| 6f 6e 20 66 6f 72 20 74 | 68 65 20 75 73 65 72 27 |on for t|he user'|
|00004f90| 73 20 63 6f 6e 76 65 6e | 69 65 6e 63 65 2e 0a 4d |s conven|ience..M|
|00004fa0| 6f 73 74 20 65 64 69 74 | 69 6e 67 20 63 6f 6d 6d |ost edit|ing comm|
|00004fb0| 61 6e 64 73 20 73 68 6f | 75 6c 64 20 6e 6f 74 20 |ands sho|uld not |
|00004fc0| 61 6c 74 65 72 20 74 68 | 65 20 6d 61 72 6b 2e 0a |alter th|e mark..|
|00004fd0| 54 6f 20 72 65 6d 65 6d | 62 65 72 20 61 20 6c 6f |To remem|ber a lo|
|00004fe0| 63 61 74 69 6f 6e 20 66 | 6f 72 20 69 6e 74 65 72 |cation f|or inter|
|00004ff0| 6e 61 6c 20 75 73 65 20 | 69 6e 20 74 68 65 20 4c |nal use |in the L|
|00005000| 69 73 70 20 70 72 6f 67 | 72 61 6d 2c 0a 73 74 6f |isp prog|ram,.sto|
|00005010| 72 65 20 69 74 20 69 6e | 20 61 20 4c 69 73 70 20 |re it in| a Lisp |
|00005020| 76 61 72 69 61 62 6c 65 | 2e 20 20 45 78 61 6d 70 |variable|. Examp|
|00005030| 6c 65 3a 0a 0a 20 20 20 | 28 6c 65 74 20 28 28 62 |le:.. |(let ((b|
|00005040| 65 67 20 28 70 6f 69 6e | 74 29 29 29 20 28 66 6f |eg (poin|t))) (fo|
|00005050| 72 77 61 72 64 2d 6c 69 | 6e 65 20 31 29 20 28 64 |rward-li|ne 1) (d|
|00005060| 65 6c 65 74 65 2d 72 65 | 67 69 6f 6e 20 62 65 67 |elete-re|gion beg|
|00005070| 20 28 70 6f 69 6e 74 29 | 29 29 2e 22 20 28 62 79 | (point)|))." (by|
|00005080| 74 65 2d 63 6f 64 65 20 | 22 c1 c2 20 08 70 23 87 |te-code |".. .p#.|
|00005090| 22 20 5b 70 6f 73 20 73 | 65 74 2d 6d 61 72 6b 65 |" [pos s|et-marke|
|000050a0| 72 20 6d 61 72 6b 2d 6d | 61 72 6b 65 72 5d 20 35 |r mark-m|arker] 5|
|000050b0| 29 29 0a 0a 28 64 65 66 | 76 61 72 20 6d 61 72 6b |))..(def|var mark|
|000050c0| 2d 72 69 6e 67 20 6e 69 | 6c 20 22 5c 0a 54 68 65 |-ring ni|l "\.The|
|000050d0| 20 6c 69 73 74 20 6f 66 | 20 73 61 76 65 64 20 66 | list of| saved f|
|000050e0| 6f 72 6d 65 72 20 6d 61 | 72 6b 73 20 6f 66 20 74 |ormer ma|rks of t|
|000050f0| 68 65 20 63 75 72 72 65 | 6e 74 20 62 75 66 66 65 |he curre|nt buffe|
|00005100| 72 2c 0a 6d 6f 73 74 20 | 72 65 63 65 6e 74 20 66 |r,.most |recent f|
|00005110| 69 72 73 74 2e 22 29 0a | 0a 28 6d 61 6b 65 2d 76 |irst.").|.(make-v|
|00005120| 61 72 69 61 62 6c 65 2d | 62 75 66 66 65 72 2d 6c |ariable-|buffer-l|
|00005130| 6f 63 61 6c 20 28 71 75 | 6f 74 65 20 6d 61 72 6b |ocal (qu|ote mark|
|00005140| 2d 72 69 6e 67 29 29 0a | 0a 28 64 65 66 63 6f 6e |-ring)).|.(defcon|
|00005150| 73 74 20 6d 61 72 6b 2d | 72 69 6e 67 2d 6d 61 78 |st mark-|ring-max|
|00005160| 20 31 36 20 22 5c 0a 2a | 4d 61 78 69 6d 75 6d 20 | 16 "\.*|Maximum |
|00005170| 73 69 7a 65 20 6f 66 20 | 6d 61 72 6b 20 72 69 6e |size of |mark rin|
|00005180| 67 2e 20 20 53 74 61 72 | 74 20 64 69 73 63 61 72 |g. Star|t discar|
|00005190| 64 69 6e 67 20 6f 66 66 | 20 65 6e 64 20 69 66 20 |ding off| end if |
|000051a0| 67 65 74 73 20 74 68 69 | 73 20 62 69 67 2e 22 29 |gets thi|s big.")|
|000051b0| 0a 0a 28 64 65 66 75 6e | 20 73 65 74 2d 6d 61 72 |..(defun| set-mar|
|000051c0| 6b 2d 63 6f 6d 6d 61 6e | 64 20 28 61 72 67 29 20 |k-comman|d (arg) |
|000051d0| 22 5c 0a 53 65 74 20 6d | 61 72 6b 20 61 74 20 77 |"\.Set m|ark at w|
|000051e0| 68 65 72 65 20 70 6f 69 | 6e 74 20 69 73 2c 20 6f |here poi|nt is, o|
|000051f0| 72 20 6a 75 6d 70 20 74 | 6f 20 6d 61 72 6b 2e 0a |r jump t|o mark..|
|00005200| 57 69 74 68 20 6e 6f 20 | 70 72 65 66 69 78 20 61 |With no |prefix a|
|00005210| 72 67 75 6d 65 6e 74 2c | 20 73 65 74 20 6d 61 72 |rgument,| set mar|
|00005220| 6b 2c 20 61 6e 64 20 70 | 75 73 68 20 70 72 65 76 |k, and p|ush prev|
|00005230| 69 6f 75 73 20 6d 61 72 | 6b 20 6f 6e 20 6d 61 72 |ious mar|k on mar|
|00005240| 6b 20 72 69 6e 67 2e 0a | 57 69 74 68 20 61 72 67 |k ring..|With arg|
|00005250| 75 6d 65 6e 74 2c 20 6a | 75 6d 70 20 74 6f 20 6d |ument, j|ump to m|
|00005260| 61 72 6b 2c 20 61 6e 64 | 20 70 6f 70 20 69 6e 74 |ark, and| pop int|
|00005270| 6f 20 6d 61 72 6b 20 6f | 66 66 20 74 68 65 20 6d |o mark o|ff the m|
|00005280| 61 72 6b 20 72 69 6e 67 | 2e 0a 0a 4e 6f 76 69 63 |ark ring|...Novic|
|00005290| 65 20 65 6d 61 63 73 2d | 6c 69 73 70 20 70 72 6f |e emacs-|lisp pro|
|000052a0| 67 72 61 6d 6d 65 72 73 | 20 6f 66 74 65 6e 20 74 |grammers| often t|
|000052b0| 72 79 20 74 6f 20 75 73 | 65 20 74 68 65 20 6d 61 |ry to us|e the ma|
|000052c0| 72 6b 20 66 6f 72 20 74 | 68 65 20 77 72 6f 6e 67 |rk for t|he wrong|
|000052d0| 0a 70 75 72 70 6f 73 65 | 73 2e 20 20 53 65 65 20 |.purpose|s. See |
|000052e0| 74 68 65 20 64 6f 63 75 | 6d 65 6e 74 61 74 69 6f |the docu|mentatio|
|000052f0| 6e 20 6f 66 20 60 73 65 | 74 2d 6d 61 72 6b 27 20 |n of `se|t-mark' |
|00005300| 66 6f 72 20 6d 6f 72 65 | 20 69 6e 66 6f 72 6d 61 |for more| informa|
|00005310| 74 69 6f 6e 2e 22 20 28 | 69 6e 74 65 72 61 63 74 |tion." (|interact|
|00005320| 69 76 65 20 22 50 22 29 | 20 28 62 79 74 65 2d 63 |ive "P")| (byte-c|
|00005330| 6f 64 65 20 22 c1 88 08 | 3f 83 0c 00 c2 20 82 1e |ode "...|?.... ..|
|00005340| 00 c3 20 3f 83 18 00 c4 | c5 21 82 1e 00 c3 20 62 |.. ?....|.!.... b|
|00005350| 88 c6 20 87 22 20 5b 61 | 72 67 20 6e 69 6c 20 70 |.. ." [a|rg nil p|
|00005360| 75 73 68 2d 6d 61 72 6b | 20 6d 61 72 6b 20 65 72 |ush-mark| mark er|
|00005370| 72 6f 72 20 22 4e 6f 20 | 6d 61 72 6b 20 73 65 74 |ror "No |mark set|
|00005380| 20 69 6e 20 74 68 69 73 | 20 62 75 66 66 65 72 22 | in this| buffer"|
|00005390| 20 70 6f 70 2d 6d 61 72 | 6b 5d 20 36 29 29 0a 0a | pop-mar|k] 6))..|
|000053a0| 28 64 65 66 75 6e 20 70 | 75 73 68 2d 6d 61 72 6b |(defun p|ush-mark|
|000053b0| 20 28 26 6f 70 74 69 6f | 6e 61 6c 20 6c 6f 63 61 | (&optio|nal loca|
|000053c0| 74 69 6f 6e 20 6e 6f 6d | 73 67 29 20 22 5c 0a 53 |tion nom|sg) "\.S|
|000053d0| 65 74 20 6d 61 72 6b 20 | 61 74 20 4c 4f 43 41 54 |et mark |at LOCAT|
|000053e0| 49 4f 4e 20 28 70 6f 69 | 6e 74 2c 20 62 79 20 64 |ION (poi|nt, by d|
|000053f0| 65 66 61 75 6c 74 29 20 | 61 6e 64 20 70 75 73 68 |efault) |and push|
|00005400| 20 6f 6c 64 20 6d 61 72 | 6b 20 6f 6e 20 6d 61 72 | old mar|k on mar|
|00005410| 6b 20 72 69 6e 67 2e 0a | 44 69 73 70 6c 61 79 73 |k ring..|Displays|
|00005420| 20 5c 22 4d 61 72 6b 20 | 73 65 74 5c 22 20 75 6e | \"Mark |set\" un|
|00005430| 6c 65 73 73 20 74 68 65 | 20 6f 70 74 69 6f 6e 61 |less the| optiona|
|00005440| 6c 20 73 65 63 6f 6e 64 | 20 61 72 67 20 4e 4f 4d |l second| arg NOM|
|00005450| 53 47 20 69 73 20 6e 6f | 6e 2d 6e 69 6c 2e 0a 0a |SG is no|n-nil...|
|00005460| 4e 6f 76 69 63 65 20 65 | 6d 61 63 73 2d 6c 69 73 |Novice e|macs-lis|
|00005470| 70 20 70 72 6f 67 72 61 | 6d 6d 65 72 73 20 6f 66 |p progra|mmers of|
|00005480| 74 65 6e 20 74 72 79 20 | 74 6f 20 75 73 65 20 74 |ten try |to use t|
|00005490| 68 65 20 6d 61 72 6b 20 | 66 6f 72 20 74 68 65 20 |he mark |for the |
|000054a0| 77 72 6f 6e 67 0a 70 75 | 72 70 6f 73 65 73 2e 20 |wrong.pu|rposes. |
|000054b0| 20 53 65 65 20 74 68 65 | 20 64 6f 63 75 6d 65 6e | See the| documen|
|000054c0| 74 61 74 69 6f 6e 20 6f | 66 20 60 73 65 74 2d 6d |tation o|f `set-m|
|000054d0| 61 72 6b 27 20 66 6f 72 | 20 6d 6f 72 65 20 69 6e |ark' for| more in|
|000054e0| 66 6f 72 6d 61 74 69 6f | 6e 2e 22 20 28 62 79 74 |formatio|n." (byt|
|000054f0| 65 2d 63 6f 64 65 20 22 | c6 20 3f 83 0a 00 c0 82 |e-code "|. ?.....|
|00005500| 2b 00 c7 c8 20 21 09 42 | 89 11 88 09 47 0a 56 85 |+... !.B|....G.V.|
|00005510| 2b 00 c9 ca 0a 09 5c 22 | 40 c0 5c 22 88 cb ca 0a |+.....\"|@.\"....|
|00005520| 53 09 5c 22 c0 5c 22 88 | cc 0b 86 32 00 60 21 88 |S.\".\".|...2.`!.|
|00005530| 0c 86 46 00 0d 86 46 00 | cd 20 ce 56 86 46 00 cf |..F...F.|. .V.F..|
|00005540| d0 21 87 22 20 5b 6e 69 | 6c 20 6d 61 72 6b 2d 72 |.!." [ni|l mark-r|
|00005550| 69 6e 67 20 6d 61 72 6b | 2d 72 69 6e 67 2d 6d 61 |ing mark|-ring-ma|
|00005560| 78 20 6c 6f 63 61 74 69 | 6f 6e 20 6e 6f 6d 73 67 |x locati|on nomsg|
|00005570| 20 65 78 65 63 75 74 69 | 6e 67 2d 6d 61 63 72 6f | executi|ng-macro|
|00005580| 20 6d 61 72 6b 20 63 6f | 70 79 2d 6d 61 72 6b 65 | mark co|py-marke|
|00005590| 72 20 6d 61 72 6b 2d 6d | 61 72 6b 65 72 20 6d 6f |r mark-m|arker mo|
|000055a0| 76 65 2d 6d 61 72 6b 65 | 72 20 6e 74 68 63 64 72 |ve-marke|r nthcdr|
|000055b0| 20 73 65 74 63 64 72 20 | 73 65 74 2d 6d 61 72 6b | setcdr |set-mark|
|000055c0| 20 6d 69 6e 69 62 75 66 | 66 65 72 2d 64 65 70 74 | minibuf|fer-dept|
|000055d0| 68 20 30 20 6d 65 73 73 | 61 67 65 20 22 4d 61 72 |h 0 mess|age "Mar|
|000055e0| 6b 20 73 65 74 22 5d 20 | 31 31 29 29 0a 0a 28 64 |k set"] |11))..(d|
|000055f0| 65 66 75 6e 20 70 6f 70 | 2d 6d 61 72 6b 20 6e 69 |efun pop|-mark ni|
|00005600| 6c 20 22 5c 0a 50 6f 70 | 20 6f 66 66 20 6d 61 72 |l "\.Pop| off mar|
|00005610| 6b 20 72 69 6e 67 20 69 | 6e 74 6f 20 74 68 65 20 |k ring i|nto the |
|00005620| 62 75 66 66 65 72 27 73 | 20 61 63 74 75 61 6c 20 |buffer's| actual |
|00005630| 6d 61 72 6b 2e 0a 44 6f | 65 73 20 6e 6f 74 20 73 |mark..Do|es not s|
|00005640| 65 74 20 70 6f 69 6e 74 | 2e 20 20 44 6f 65 73 20 |et point|. Does |
|00005650| 6e 6f 74 68 69 6e 67 20 | 69 66 20 6d 61 72 6b 20 |nothing |if mark |
|00005660| 72 69 6e 67 20 69 73 20 | 65 6d 70 74 79 2e 22 20 |ring is |empty." |
|00005670| 28 62 79 74 65 2d 63 6f | 64 65 20 22 08 85 29 00 |(byte-co|de "..).|
|00005680| c2 08 c3 c4 20 21 43 5c | 22 89 10 88 c5 c6 08 40 |.... !C\|"......@|
|00005690| 5c 5c 21 88 c7 08 40 c1 | 5c 22 88 c8 20 3f 85 24 |\\!...@.|\".. ?.$|
|000056a0| 00 c9 20 88 08 41 89 10 | 87 22 20 5b 6d 61 72 6b |.. ..A..|." [mark|
|000056b0| 2d 72 69 6e 67 20 6e 69 | 6c 20 6e 63 6f 6e 63 20 |-ring ni|l nconc |
|000056c0| 63 6f 70 79 2d 6d 61 72 | 6b 65 72 20 6d 61 72 6b |copy-mar|ker mark|
|000056d0| 2d 6d 61 72 6b 65 72 20 | 73 65 74 2d 6d 61 72 6b |-marker |set-mark|
|000056e0| 20 30 20 6d 6f 76 65 2d | 6d 61 72 6b 65 72 20 6d | 0 move-|marker m|
|000056f0| 61 72 6b 20 64 69 6e 67 | 5d 20 39 29 29 0a 0a 28 |ark ding|] 9))..(|
|00005700| 66 73 65 74 20 28 71 75 | 6f 74 65 20 65 78 63 68 |fset (qu|ote exch|
|00005710| 61 6e 67 65 2d 64 6f 74 | 2d 61 6e 64 2d 6d 61 72 |ange-dot|-and-mar|
|00005720| 6b 29 20 28 71 75 6f 74 | 65 20 65 78 63 68 61 6e |k) (quot|e exchan|
|00005730| 67 65 2d 70 6f 69 6e 74 | 2d 61 6e 64 2d 6d 61 72 |ge-point|-and-mar|
|00005740| 6b 29 29 0a 0a 28 64 65 | 66 75 6e 20 65 78 63 68 |k))..(de|fun exch|
|00005750| 61 6e 67 65 2d 70 6f 69 | 6e 74 2d 61 6e 64 2d 6d |ange-poi|nt-and-m|
|00005760| 61 72 6b 20 6e 69 6c 20 | 22 5c 0a 50 75 74 20 74 |ark nil |"\.Put t|
|00005770| 68 65 20 6d 61 72 6b 20 | 77 68 65 72 65 20 70 6f |he mark |where po|
|00005780| 69 6e 74 20 69 73 20 6e | 6f 77 2c 20 61 6e 64 20 |int is n|ow, and |
|00005790| 70 6f 69 6e 74 20 77 68 | 65 72 65 20 74 68 65 20 |point wh|ere the |
|000057a0| 6d 61 72 6b 20 69 73 20 | 6e 6f 77 2e 22 20 28 69 |mark is |now." (i|
|000057b0| 6e 74 65 72 61 63 74 69 | 76 65 20 6e 69 6c 29 20 |nteracti|ve nil) |
|000057c0| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c0 88 c2 20 |(byte-co|de "... |
|000057d0| 19 09 3f 85 0d 00 c3 c4 | 21 88 c5 60 21 88 09 62 |..?.....|!..`!..b|
|000057e0| 88 c0 29 87 22 20 5b 6e | 69 6c 20 6f 6d 61 72 6b |..)." [n|il omark|
|000057f0| 20 6d 61 72 6b 20 65 72 | 72 6f 72 20 22 4e 6f 20 | mark er|ror "No |
|00005800| 6d 61 72 6b 20 73 65 74 | 20 69 6e 20 74 68 69 73 |mark set| in this|
|00005810| 20 62 75 66 66 65 72 22 | 20 73 65 74 2d 6d 61 72 | buffer"| set-mar|
|00005820| 6b 5d 20 34 29 29 0a 0a | 28 64 65 66 75 6e 20 6e |k] 4))..|(defun n|
|00005830| 65 78 74 2d 6c 69 6e 65 | 20 28 61 72 67 29 20 22 |ext-line| (arg) "|
|00005840| 5c 0a 4d 6f 76 65 20 63 | 75 72 73 6f 72 20 76 65 |\.Move c|ursor ve|
|00005850| 72 74 69 63 61 6c 6c 79 | 20 64 6f 77 6e 20 41 52 |rtically| down AR|
|00005860| 47 20 6c 69 6e 65 73 2e | 0a 49 66 20 74 68 65 72 |G lines.|.If ther|
|00005870| 65 20 69 73 20 6e 6f 20 | 63 68 61 72 61 63 74 65 |e is no |characte|
|00005880| 72 20 69 6e 20 74 68 65 | 20 74 61 72 67 65 74 20 |r in the| target |
|00005890| 6c 69 6e 65 20 65 78 61 | 63 74 6c 79 20 75 6e 64 |line exa|ctly und|
|000058a0| 65 72 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 63 |er the c|urrent c|
|000058b0| 6f 6c 75 6d 6e 2c 0a 74 | 68 65 20 63 75 72 73 6f |olumn,.t|he curso|
|000058c0| 72 20 69 73 20 70 6f 73 | 69 74 69 6f 6e 65 64 20 |r is pos|itioned |
|000058d0| 61 66 74 65 72 20 74 68 | 65 20 63 68 61 72 61 63 |after th|e charac|
|000058e0| 74 65 72 20 69 6e 20 74 | 68 61 74 20 6c 69 6e 65 |ter in t|hat line|
|000058f0| 20 77 68 69 63 68 20 73 | 70 61 6e 73 20 74 68 69 | which s|pans thi|
|00005900| 73 0a 63 6f 6c 75 6d 6e | 2c 20 6f 72 20 61 74 20 |s.column|, or at |
|00005910| 74 68 65 20 65 6e 64 20 | 6f 66 20 74 68 65 20 6c |the end |of the l|
|00005920| 69 6e 65 20 69 66 20 69 | 74 20 69 73 20 6e 6f 74 |ine if i|t is not|
|00005930| 20 6c 6f 6e 67 20 65 6e | 6f 75 67 68 2e 0a 49 66 | long en|ough..If|
|00005940| 20 74 68 65 72 65 20 69 | 73 20 6e 6f 20 6c 69 6e | there i|s no lin|
|00005950| 65 20 69 6e 20 74 68 65 | 20 62 75 66 66 65 72 20 |e in the| buffer |
|00005960| 61 66 74 65 72 20 74 68 | 69 73 20 6f 6e 65 2c 0a |after th|is one,.|
|00005970| 61 20 6e 65 77 6c 69 6e | 65 20 63 68 61 72 61 63 |a newlin|e charac|
|00005980| 74 65 72 20 69 73 20 69 | 6e 73 65 72 74 65 64 20 |ter is i|nserted |
|00005990| 74 6f 20 63 72 65 61 74 | 65 20 61 20 6c 69 6e 65 |to creat|e a line|
|000059a0| 0a 61 6e 64 20 74 68 65 | 20 63 75 72 73 6f 72 20 |.and the| cursor |
|000059b0| 6d 6f 76 65 73 20 74 6f | 20 74 68 61 74 20 6c 69 |moves to| that li|
|000059c0| 6e 65 2e 0a 0a 54 68 65 | 20 63 6f 6d 6d 61 6e 64 |ne...The| command|
|000059d0| 20 5c 5c 5b 73 65 74 2d | 67 6f 61 6c 2d 63 6f 6c | \\[set-|goal-col|
|000059e0| 75 6d 6e 5d 20 63 61 6e | 20 62 65 20 75 73 65 64 |umn] can| be used|
|000059f0| 20 74 6f 20 63 72 65 61 | 74 65 0a 61 20 73 65 6d | to crea|te.a sem|
|00005a00| 69 70 65 72 6d 61 6e 65 | 6e 74 20 67 6f 61 6c 20 |ipermane|nt goal |
|00005a10| 63 6f 6c 75 6d 6e 20 74 | 6f 20 77 68 69 63 68 20 |column t|o which |
|00005a20| 74 68 69 73 20 63 6f 6d | 6d 61 6e 64 20 61 6c 77 |this com|mand alw|
|00005a30| 61 79 73 20 6d 6f 76 65 | 73 2e 0a 54 68 65 6e 20 |ays move|s..Then |
|00005a40| 69 74 20 64 6f 65 73 20 | 6e 6f 74 20 74 72 79 20 |it does |not try |
|00005a50| 74 6f 20 6d 6f 76 65 20 | 76 65 72 74 69 63 61 6c |to move |vertical|
|00005a60| 6c 79 2e 0a 0a 49 66 20 | 79 6f 75 20 61 72 65 20 |ly...If |you are |
|00005a70| 74 68 69 6e 6b 69 6e 67 | 20 6f 66 20 75 73 69 6e |thinking| of usin|
|00005a80| 67 20 74 68 69 73 20 69 | 6e 20 61 20 4c 69 73 70 |g this i|n a Lisp|
|00005a90| 20 70 72 6f 67 72 61 6d | 2c 20 63 6f 6e 73 69 64 | program|, consid|
|00005aa0| 65 72 0a 75 73 69 6e 67 | 20 60 66 6f 72 77 61 72 |er.using| `forwar|
|00005ab0| 64 2d 6c 69 6e 65 27 20 | 69 6e 73 74 65 61 64 2e |d-line' |instead.|
|00005ac0| 20 20 49 74 20 69 73 20 | 75 73 75 61 6c 6c 79 20 | It is |usually |
|00005ad0| 65 61 73 69 65 72 20 74 | 6f 20 75 73 65 0a 61 6e |easier t|o use.an|
|00005ae0| 64 20 6d 6f 72 65 20 72 | 65 6c 69 61 62 6c 65 20 |d more r|eliable |
|00005af0| 28 6e 6f 20 64 65 70 65 | 6e 64 65 6e 63 65 20 6f |(no depe|ndence o|
|00005b00| 6e 20 67 6f 61 6c 20 63 | 6f 6c 75 6d 6e 2c 20 65 |n goal c|olumn, e|
|00005b10| 74 63 2e 29 2e 22 20 28 | 69 6e 74 65 72 61 63 74 |tc.)." (|interact|
|00005b20| 69 76 65 20 22 70 22 29 | 20 28 62 79 74 65 2d 63 |ive "p")| (byte-c|
|00005b30| 6f 64 65 20 22 c2 88 08 | c3 55 83 2a 00 60 19 c4 |ode "...|.U.*.`..|
|00005b40| c3 21 88 09 60 55 86 18 | 00 68 c5 3d 3f 83 20 00 |.!..`U..|.h.=?. .|
|00005b50| c5 63 82 26 00 09 62 88 | c6 08 21 29 82 2d 00 c6 |.c.&..b.|..!).-..|
|00005b60| 08 21 88 c2 87 22 20 5b | 61 72 67 20 6f 70 6f 69 |.!..." [|arg opoi|
|00005b70| 6e 74 20 6e 69 6c 20 31 | 20 66 6f 72 77 61 72 64 |nt nil 1| forward|
|00005b80| 2d 6c 69 6e 65 20 31 30 | 20 6e 65 78 74 2d 6c 69 |-line 10| next-li|
|00005b90| 6e 65 2d 69 6e 74 65 72 | 6e 61 6c 5d 20 34 29 29 |ne-inter|nal] 4))|
|00005ba0| 0a 0a 28 64 65 66 75 6e | 20 70 72 65 76 69 6f 75 |..(defun| previou|
|00005bb0| 73 2d 6c 69 6e 65 20 28 | 61 72 67 29 20 22 5c 0a |s-line (|arg) "\.|
|00005bc0| 4d 6f 76 65 20 63 75 72 | 73 6f 72 20 76 65 72 74 |Move cur|sor vert|
|00005bd0| 69 63 61 6c 6c 79 20 75 | 70 20 41 52 47 20 6c 69 |ically u|p ARG li|
|00005be0| 6e 65 73 2e 0a 49 66 20 | 74 68 65 72 65 20 69 73 |nes..If |there is|
|00005bf0| 20 6e 6f 20 63 68 61 72 | 61 63 74 65 72 20 69 6e | no char|acter in|
|00005c00| 20 74 68 65 20 74 61 72 | 67 65 74 20 6c 69 6e 65 | the tar|get line|
|00005c10| 20 65 78 61 63 74 6c 79 | 20 6f 76 65 72 20 74 68 | exactly| over th|
|00005c20| 65 20 63 75 72 72 65 6e | 74 20 63 6f 6c 75 6d 6e |e curren|t column|
|00005c30| 2c 0a 74 68 65 20 63 75 | 72 73 6f 72 20 69 73 20 |,.the cu|rsor is |
|00005c40| 70 6f 73 69 74 69 6f 6e | 65 64 20 61 66 74 65 72 |position|ed after|
|00005c50| 20 74 68 65 20 63 68 61 | 72 61 63 74 65 72 20 69 | the cha|racter i|
|00005c60| 6e 20 74 68 61 74 20 6c | 69 6e 65 20 77 68 69 63 |n that l|ine whic|
|00005c70| 68 20 73 70 61 6e 73 20 | 74 68 69 73 0a 63 6f 6c |h spans |this.col|
|00005c80| 75 6d 6e 2c 20 6f 72 20 | 61 74 20 74 68 65 20 65 |umn, or |at the e|
|00005c90| 6e 64 20 6f 66 20 74 68 | 65 20 6c 69 6e 65 20 69 |nd of th|e line i|
|00005ca0| 66 20 69 74 20 69 73 20 | 6e 6f 74 20 6c 6f 6e 67 |f it is |not long|
|00005cb0| 20 65 6e 6f 75 67 68 2e | 0a 0a 54 68 65 20 63 6f | enough.|..The co|
|00005cc0| 6d 6d 61 6e 64 20 5c 5c | 5b 73 65 74 2d 67 6f 61 |mmand \\|[set-goa|
|00005cd0| 6c 2d 63 6f 6c 75 6d 6e | 5d 20 63 61 6e 20 62 65 |l-column|] can be|
|00005ce0| 20 75 73 65 64 20 74 6f | 20 63 72 65 61 74 65 0a | used to| create.|
|00005cf0| 61 20 73 65 6d 69 70 65 | 72 6d 61 6e 65 6e 74 20 |a semipe|rmanent |
|00005d00| 67 6f 61 6c 20 63 6f 6c | 75 6d 6e 20 74 6f 20 77 |goal col|umn to w|
|00005d10| 68 69 63 68 20 74 68 69 | 73 20 63 6f 6d 6d 61 6e |hich thi|s comman|
|00005d20| 64 20 61 6c 77 61 79 73 | 20 6d 6f 76 65 73 2e 0a |d always| moves..|
|00005d30| 54 68 65 6e 20 69 74 20 | 64 6f 65 73 20 6e 6f 74 |Then it |does not|
|00005d40| 20 74 72 79 20 74 6f 20 | 6d 6f 76 65 20 76 65 72 | try to |move ver|
|00005d50| 74 69 63 61 6c 6c 79 2e | 0a 0a 49 66 20 79 6f 75 |tically.|..If you|
|00005d60| 20 61 72 65 20 74 68 69 | 6e 6b 69 6e 67 20 6f 66 | are thi|nking of|
|00005d70| 20 75 73 69 6e 67 20 74 | 68 69 73 20 69 6e 20 61 | using t|his in a|
|00005d80| 20 4c 69 73 70 20 70 72 | 6f 67 72 61 6d 2c 20 63 | Lisp pr|ogram, c|
|00005d90| 6f 6e 73 69 64 65 72 20 | 75 73 69 6e 67 0a 60 66 |onsider |using.`f|
|00005da0| 6f 72 77 61 72 64 2d 6c | 69 6e 65 27 20 77 69 74 |orward-l|ine' wit|
|00005db0| 68 20 6e 65 67 61 74 69 | 76 65 20 61 72 67 75 6d |h negati|ve argum|
|00005dc0| 65 6e 74 20 69 6e 73 74 | 65 61 64 2e 2e 20 20 49 |ent inst|ead.. I|
|00005dd0| 74 20 69 73 20 75 73 75 | 61 6c 6c 79 20 65 61 73 |t is usu|ally eas|
|00005de0| 69 65 72 0a 74 6f 20 75 | 73 65 20 61 6e 64 20 6d |ier.to u|se and m|
|00005df0| 6f 72 65 20 72 65 6c 69 | 61 62 6c 65 20 28 6e 6f |ore reli|able (no|
|00005e00| 20 64 65 70 65 6e 64 65 | 6e 63 65 20 6f 6e 20 67 | depende|nce on g|
|00005e10| 6f 61 6c 20 63 6f 6c 75 | 6d 6e 2c 20 65 74 63 2e |oal colu|mn, etc.|
|00005e20| 29 2e 22 20 28 69 6e 74 | 65 72 61 63 74 69 76 65 |)." (int|eractive|
|00005e30| 20 22 70 22 29 20 28 62 | 79 74 65 2d 63 6f 64 65 | "p") (b|yte-code|
|00005e40| 20 22 c1 88 c2 08 5b 21 | 88 c1 87 22 20 5b 61 72 | "....[!|..." [ar|
|00005e50| 67 20 6e 69 6c 20 6e 65 | 78 74 2d 6c 69 6e 65 2d |g nil ne|xt-line-|
|00005e60| 69 6e 74 65 72 6e 61 6c | 5d 20 32 29 29 0a 0a 28 |internal|] 2))..(|
|00005e70| 64 65 66 63 6f 6e 73 74 | 20 74 72 61 63 6b 2d 65 |defconst| track-e|
|00005e80| 6f 6c 20 6e 69 6c 20 22 | 5c 0a 2a 4e 6f 6e 2d 6e |ol nil "|\.*Non-n|
|00005e90| 69 6c 20 6d 65 61 6e 73 | 20 76 65 72 74 69 63 61 |il means| vertica|
|00005ea0| 6c 20 6d 6f 74 69 6f 6e | 20 73 74 61 72 74 69 6e |l motion| startin|
|00005eb0| 67 20 61 74 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |g at the| end of |
|00005ec0| 61 20 6c 69 6e 65 20 73 | 68 6f 75 6c 64 20 6b 65 |a line s|hould ke|
|00005ed0| 65 70 20 74 6f 20 65 6e | 64 73 20 6f 66 20 6c 69 |ep to en|ds of li|
|00005ee0| 6e 65 73 2e 0a 54 68 69 | 73 20 6d 65 61 6e 73 20 |nes..Thi|s means |
|00005ef0| 6d 6f 76 69 6e 67 20 74 | 6f 20 74 68 65 20 65 6e |moving t|o the en|
|00005f00| 64 20 6f 66 20 65 61 63 | 68 20 6c 69 6e 65 20 6d |d of eac|h line m|
|00005f10| 6f 76 65 64 20 6f 6e 74 | 6f 2e 22 29 0a 0a 28 64 |oved ont|o.")..(d|
|00005f20| 65 66 76 61 72 20 67 6f | 61 6c 2d 63 6f 6c 75 6d |efvar go|al-colum|
|00005f30| 6e 20 6e 69 6c 20 22 5c | 0a 2a 53 65 6d 69 70 65 |n nil "\|.*Semipe|
|00005f40| 72 6d 61 6e 65 6e 74 20 | 67 6f 61 6c 20 63 6f 6c |rmanent |goal col|
|00005f50| 75 6d 6e 20 66 6f 72 20 | 76 65 72 74 69 63 61 6c |umn for |vertical|
|00005f60| 20 6d 6f 74 69 6f 6e 2c | 20 61 73 20 73 65 74 20 | motion,| as set |
|00005f70| 62 79 20 5c 5c 5b 73 65 | 74 2d 67 6f 61 6c 2d 63 |by \\[se|t-goal-c|
|00005f80| 6f 6c 75 6d 6e 5d 2c 20 | 6f 72 20 6e 69 6c 2e 22 |olumn], |or nil."|
|00005f90| 29 0a 0a 28 64 65 66 76 | 61 72 20 74 65 6d 70 6f |)..(defv|ar tempo|
|00005fa0| 72 61 72 79 2d 67 6f 61 | 6c 2d 63 6f 6c 75 6d 6e |rary-goa|l-column|
|00005fb0| 20 30 20 22 5c 0a 43 75 | 72 72 65 6e 74 20 67 6f | 0 "\.Cu|rrent go|
|00005fc0| 61 6c 20 63 6f 6c 75 6d | 6e 20 66 6f 72 20 76 65 |al colum|n for ve|
|00005fd0| 72 74 69 63 61 6c 20 6d | 6f 74 69 6f 6e 2e 0a 49 |rtical m|otion..I|
|00005fe0| 74 20 69 73 20 74 68 65 | 20 63 6f 6c 75 6d 6e 20 |t is the| column |
|00005ff0| 77 68 65 72 65 20 70 6f | 69 6e 74 20 77 61 73 20 |where po|int was |
|00006000| 61 74 20 74 68 65 20 73 | 74 61 72 74 20 6f 66 20 |at the s|tart of |
|00006010| 63 75 72 72 65 6e 74 20 | 72 75 6e 20 6f 66 20 76 |current |run of v|
|00006020| 65 72 74 69 63 61 6c 20 | 6d 6f 74 69 6f 6e 20 63 |ertical |motion c|
|00006030| 6f 6d 6d 61 6e 64 73 2e | 22 29 0a 0a 28 64 65 66 |ommands.|")..(def|
|00006040| 75 6e 20 6e 65 78 74 2d | 6c 69 6e 65 2d 69 6e 74 |un next-|line-int|
|00006050| 65 72 6e 61 6c 20 28 61 | 72 67 29 20 28 62 79 74 |ernal (a|rg) (byt|
|00006060| 65 2d 63 6f 64 65 20 22 | 08 c8 3d 86 09 00 08 c9 |e-code "|..=.....|
|00006070| 3d 3f 85 1c 00 0a 85 12 | 00 6c 83 19 00 c3 82 1a |=?......|.l......|
|00006080| 00 69 89 11 88 ca 0c 21 | 3f 83 2a 00 cb 0d 21 82 |.i.....!|?.*...!.|
|00006090| 5a 00 0d cc 56 85 44 00 | cd ce 21 88 cf d0 21 88 |Z...V.D.|..!...!.|
|000060a0| cb ce 21 88 0d 53 89 15 | 88 82 2a 00 88 0d cc 57 |..!..S..|..*....W|
|000060b0| 85 5a 00 cd d0 21 88 d1 | 20 88 0d 54 89 15 88 82 |.Z...!..| ..T....|
|000060c0| 45 00 88 0e 06 86 61 00 | 09 c3 3d 83 6b 00 d2 20 |E.....a.|..=.k.. |
|000060d0| 82 73 00 d3 0e 06 86 72 | 00 09 21 88 c7 87 22 20 |.s.....r|..!..." |
|000060e0| 5b 6c 61 73 74 2d 63 6f | 6d 6d 61 6e 64 20 74 65 |[last-co|mmand te|
|000060f0| 6d 70 6f 72 61 72 79 2d | 67 6f 61 6c 2d 63 6f 6c |mporary-|goal-col|
|00006100| 75 6d 6e 20 74 72 61 63 | 6b 2d 65 6f 6c 20 74 20 |umn trac|k-eol t |
|00006110| 73 65 6c 65 63 74 69 76 | 65 2d 64 69 73 70 6c 61 |selectiv|e-displa|
|00006120| 79 20 61 72 67 20 67 6f | 61 6c 2d 63 6f 6c 75 6d |y arg go|al-colum|
|00006130| 6e 20 6e 69 6c 20 6e 65 | 78 74 2d 6c 69 6e 65 20 |n nil ne|xt-line |
|00006140| 70 72 65 76 69 6f 75 73 | 2d 6c 69 6e 65 20 69 6e |previous|-line in|
|00006150| 74 65 67 65 72 70 20 66 | 6f 72 77 61 72 64 2d 6c |tegerp f|orward-l|
|00006160| 69 6e 65 20 30 20 76 65 | 72 74 69 63 61 6c 2d 6d |ine 0 ve|rtical-m|
|00006170| 6f 74 69 6f 6e 20 31 20 | 66 6f 72 77 61 72 64 2d |otion 1 |forward-|
|00006180| 63 68 61 72 20 2d 31 20 | 62 65 67 69 6e 6e 69 6e |char -1 |beginnin|
|00006190| 67 2d 6f 66 2d 6c 69 6e | 65 20 65 6e 64 2d 6f 66 |g-of-lin|e end-of|
|000061a0| 2d 6c 69 6e 65 20 6d 6f | 76 65 2d 74 6f 2d 63 6f |-line mo|ve-to-co|
|000061b0| 6c 75 6d 6e 5d 20 31 30 | 29 29 0a 0a 28 64 65 66 |lumn] 10|))..(def|
|000061c0| 75 6e 20 73 65 74 2d 67 | 6f 61 6c 2d 63 6f 6c 75 |un set-g|oal-colu|
|000061d0| 6d 6e 20 28 61 72 67 29 | 20 22 5c 0a 53 65 74 20 |mn (arg)| "\.Set |
|000061e0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 68 6f 72 69 |the curr|ent hori|
|000061f0| 7a 6f 6e 74 61 6c 20 70 | 6f 73 69 74 69 6f 6e 20 |zontal p|osition |
|00006200| 61 73 20 61 20 67 6f 61 | 6c 20 66 6f 72 20 5c 5c |as a goa|l for \\|
|00006210| 5b 6e 65 78 74 2d 6c 69 | 6e 65 5d 20 61 6e 64 20 |[next-li|ne] and |
|00006220| 5c 5c 5b 70 72 65 76 69 | 6f 75 73 2d 6c 69 6e 65 |\\[previ|ous-line|
|00006230| 5d 2e 0a 54 68 6f 73 65 | 20 63 6f 6d 6d 61 6e 64 |]..Those| command|
|00006240| 73 20 77 69 6c 6c 20 6d | 6f 76 65 20 74 6f 20 74 |s will m|ove to t|
|00006250| 68 69 73 20 70 6f 73 69 | 74 69 6f 6e 20 69 6e 20 |his posi|tion in |
|00006260| 74 68 65 20 6c 69 6e 65 | 20 6d 6f 76 65 64 20 74 |the line| moved t|
|00006270| 6f 0a 72 61 74 68 65 72 | 20 74 68 61 6e 20 74 72 |o.rather| than tr|
|00006280| 79 69 6e 67 20 74 6f 20 | 6b 65 65 70 20 74 68 65 |ying to |keep the|
|00006290| 20 73 61 6d 65 20 68 6f | 72 69 7a 6f 6e 74 61 6c | same ho|rizontal|
|000062a0| 20 70 6f 73 69 74 69 6f | 6e 2e 0a 57 69 74 68 20 | positio|n..With |
|000062b0| 61 20 6e 6f 6e 2d 6e 69 | 6c 20 61 72 67 75 6d 65 |a non-ni|l argume|
|000062c0| 6e 74 2c 20 63 6c 65 61 | 72 73 20 6f 75 74 20 74 |nt, clea|rs out t|
|000062d0| 68 65 20 67 6f 61 6c 20 | 63 6f 6c 75 6d 6e 0a 73 |he goal |column.s|
|000062e0| 6f 20 74 68 61 74 20 5c | 5c 5b 6e 65 78 74 2d 6c |o that \|\[next-l|
|000062f0| 69 6e 65 5d 20 61 6e 64 | 20 5c 5c 5b 70 72 65 76 |ine] and| \\[prev|
|00006300| 69 6f 75 73 2d 6c 69 6e | 65 5d 20 72 65 73 75 6d |ious-lin|e] resum|
|00006310| 65 20 76 65 72 74 69 63 | 61 6c 20 6d 6f 74 69 6f |e vertic|al motio|
|00006320| 6e 2e 22 20 28 69 6e 74 | 65 72 61 63 74 69 76 65 |n." (int|eractive|
|00006330| 20 22 50 22 29 20 28 62 | 79 74 65 2d 63 6f 64 65 | "P") (b|yte-code|
|00006340| 20 22 c2 88 08 83 10 00 | c2 89 11 88 c3 c4 21 82 | "......|......!.|
|00006350| 1a 00 69 89 11 88 c3 c5 | c6 21 09 5c 22 88 c2 87 |..i.....|.!.\"...|
|00006360| 22 20 5b 61 72 67 20 67 | 6f 61 6c 2d 63 6f 6c 75 |" [arg g|oal-colu|
|00006370| 6d 6e 20 6e 69 6c 20 6d | 65 73 73 61 67 65 20 22 |mn nil m|essage "|
|00006380| 4e 6f 20 67 6f 61 6c 20 | 63 6f 6c 75 6d 6e 22 20 |No goal |column" |
|00006390| 73 75 62 73 74 69 74 75 | 74 65 2d 63 6f 6d 6d 61 |substitu|te-comma|
|000063a0| 6e 64 2d 6b 65 79 73 20 | 22 47 6f 61 6c 20 63 6f |nd-keys |"Goal co|
|000063b0| 6c 75 6d 6e 20 25 64 20 | 28 75 73 65 20 5c 5c 5b |lumn %d |(use \\[|
|000063c0| 73 65 74 2d 67 6f 61 6c | 2d 63 6f 6c 75 6d 6e 5d |set-goal|-column]|
|000063d0| 20 77 69 74 68 20 61 6e | 20 61 72 67 20 74 6f 20 | with an| arg to |
|000063e0| 75 6e 73 65 74 20 69 74 | 29 22 5d 20 35 29 29 0a |unset it|)"] 5)).|
|000063f0| 0a 28 64 65 66 75 6e 20 | 74 72 61 6e 73 70 6f 73 |.(defun |transpos|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.