home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 November / macformat-018.iso / Utility Spectacular / Text / Emacs-1.12d folder / lisp / simple.elc < prev    next >
Emacs Compiled Lisp  |  1993-11-09  |  37.5 KB  |  [dELC/EMAC]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


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

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) magic Unsupported
1% dexvert Combustion 2 Particle Library (other/combustion2ParticleLibrary) ext Unsupported
100% file Emacs v18 byte-compiled Lisp data default
99% file data default
100% gt2 Kopftext: '(defun open-line (arg) ' default (weak)
100% xdgMime text/x-emacs-lisp default (weak)


id metadata
keyvalue
macFileType[dELC]
macFileCreator[EMAC]



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 64 65 66 75 6e 20 6b | 69 6c 6c 2d 61 70 70 65 |(defun k|ill-appe|
|00003600| 6e 64 20 28 73 74 72 69 | 6e 67 20 62 65 66 6f 72 |nd (stri|ng befor|
|00003610| 65 2d 70 29 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |e-p) (by|te-code |
|00003620| 22 c3 08 09 83 0d 00 0a | 08 40 50 82 11 00 08 40 |".......|.@P....@|
|00003630| 0a 50 5c 22 87 22 20 5b | 6b 69 6c 6c 2d 72 69 6e |.P\"." [|kill-rin|
|00003640| 67 20 62 65 66 6f 72 65 | 2d 70 20 73 74 72 69 6e |g before|-p strin|
|00003650| 67 20 73 65 74 63 61 72 | 5d 20 34 29 29 0a 0a 28 |g setcar|] 4))..(|
|00003660| 64 65 66 75 6e 20 6b 69 | 6c 6c 2d 72 65 67 69 6f |defun ki|ll-regio|
|00003670| 6e 20 28 62 65 67 20 65 | 6e 64 29 20 22 5c 0a 4b |n (beg e|nd) "\.K|
|00003680| 69 6c 6c 20 62 65 74 77 | 65 65 6e 20 70 6f 69 6e |ill betw|een poin|
|00003690| 74 20 61 6e 64 20 6d 61 | 72 6b 2e 0a 54 68 65 20 |t and ma|rk..The |
|000036a0| 74 65 78 74 20 69 73 20 | 64 65 6c 65 74 65 64 20 |text is |deleted |
|000036b0| 62 75 74 20 73 61 76 65 | 64 20 69 6e 20 74 68 65 |but save|d in the|
|000036c0| 20 6b 69 6c 6c 20 72 69 | 6e 67 2e 0a 54 68 65 20 | kill ri|ng..The |
|000036d0| 63 6f 6d 6d 61 6e 64 20 | 5c 5c 5b 79 61 6e 6b 5d |command |\\[yank]|
|000036e0| 20 63 61 6e 20 72 65 74 | 72 69 65 76 65 20 69 74 | can ret|rieve it|
|000036f0| 20 66 72 6f 6d 20 74 68 | 65 72 65 2e 0a 28 49 66 | from th|ere..(If|
|00003700| 20 79 6f 75 20 77 61 6e | 74 20 74 6f 20 6b 69 6c | you wan|t to kil|
|00003710| 6c 20 61 6e 64 20 74 68 | 65 6e 20 79 61 6e 6b 20 |l and th|en yank |
|00003720| 69 6d 6d 65 64 69 61 74 | 65 6c 79 2c 20 75 73 65 |immediat|ely, use|
|00003730| 20 5c 5c 5b 63 6f 70 79 | 2d 72 65 67 69 6f 6e 2d | \\[copy|-region-|
|00003740| 61 73 2d 6b 69 6c 6c 5d | 2e 29 0a 0a 54 68 69 73 |as-kill]|.)..This|
|00003750| 20 69 73 20 74 68 65 20 | 70 72 69 6d 69 74 69 76 | is the |primitiv|
|00003760| 65 20 66 6f 72 20 70 72 | 6f 67 72 61 6d 73 20 74 |e for pr|ograms t|
|00003770| 6f 20 6b 69 6c 6c 20 74 | 65 78 74 20 28 61 73 20 |o kill t|ext (as |
|00003780| 6f 70 70 6f 73 65 64 20 | 74 6f 20 64 65 6c 65 74 |opposed |to delet|
|00003790| 69 6e 67 20 69 74 29 2e | 0a 53 75 70 70 6c 79 20 |ing it).|.Supply |
|000037a0| 74 77 6f 20 61 72 67 75 | 6d 65 6e 74 73 2c 20 63 |two argu|ments, c|
|000037b0| 68 61 72 61 63 74 65 72 | 20 6e 75 6d 62 65 72 73 |haracter| numbers|
|000037c0| 20 69 6e 64 69 63 61 74 | 69 6e 67 20 74 68 65 20 | indicat|ing the |
|000037d0| 73 74 72 65 74 63 68 20 | 6f 66 20 74 65 78 74 0a |stretch |of text.|
|000037e0| 20 74 6f 20 62 65 20 6b | 69 6c 6c 65 64 2e 0a 41 | to be k|illed..A|
|000037f0| 6e 79 20 63 6f 6d 6d 61 | 6e 64 20 74 68 61 74 20 |ny comma|nd that |
|00003800| 63 61 6c 6c 73 20 74 68 | 69 73 20 66 75 6e 63 74 |calls th|is funct|
|00003810| 69 6f 6e 20 69 73 20 61 | 20 5c 22 6b 69 6c 6c 20 |ion is a| \"kill |
|00003820| 63 6f 6d 6d 61 6e 64 5c | 22 2e 0a 49 66 20 74 68 |command\|"..If th|
|00003830| 65 20 70 72 65 76 69 6f | 75 73 20 63 6f 6d 6d 61 |e previo|us comma|
|00003840| 6e 64 20 77 61 73 20 61 | 6c 73 6f 20 61 20 6b 69 |nd was a|lso a ki|
|00003850| 6c 6c 20 63 6f 6d 6d 61 | 6e 64 2c 0a 74 68 65 20 |ll comma|nd,.the |
|00003860| 74 65 78 74 20 6b 69 6c | 6c 65 64 20 74 68 69 73 |text kil|led this|
|00003870| 20 74 69 6d 65 20 61 70 | 70 65 6e 64 73 20 74 6f | time ap|pends to|
|00003880| 20 74 68 65 20 74 65 78 | 74 20 6b 69 6c 6c 65 64 | the tex|t killed|
|00003890| 20 6c 61 73 74 20 74 69 | 6d 65 0a 74 6f 20 6d 61 | last ti|me.to ma|
|000038a0| 6b 65 20 6f 6e 65 20 65 | 6e 74 72 79 20 69 6e 20 |ke one e|ntry in |
|000038b0| 74 68 65 20 6b 69 6c 6c | 20 72 69 6e 67 2e 22 20 |the kill| ring." |
|000038c0| 28 69 6e 74 65 72 61 63 | 74 69 76 65 20 22 2a 72 |(interac|tive "*r|
|000038d0| 22 29 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 c9 |") (byte|-code ".|
|000038e0| 88 08 c1 3d 3f 85 19 00 | 0a cc 3d 3f 85 19 00 0b |...=?...|..=?....|
|000038f0| 0c 3d 3f 85 19 00 0d 3f | 83 58 00 0b 0c 5d 0b 0c |.=?....?|.X...]..|
|00003900| 5e 5a cd 5c 5c 1e 06 ce | 0b 0c 5c 22 88 08 40 40 |^Z.\\...|..\"..@@|
|00003910| 0e 07 42 89 16 07 88 0e | 07 47 0e 08 56 85 49 00 |..B.....|.G..V.I.|
|00003920| cf d0 0e 08 53 0e 07 5c | 22 c9 5c 22 88 cc 89 16 |....S..\|".\"....|
|00003930| 0a 88 0e 07 89 16 0b 29 | 82 61 00 d1 0b 0c 5c 22 |.......)|.a....\"|
|00003940| 88 ce 0b 0c 5c 22 87 22 | 20 5b 62 75 66 66 65 72 |....\"."| [buffer|
|00003950| 2d 75 6e 64 6f 2d 6c 69 | 73 74 20 74 20 6c 61 73 |-undo-li|st t las|
|00003960| 74 2d 63 6f 6d 6d 61 6e | 64 20 62 65 67 20 65 6e |t-comman|d beg en|
|00003970| 64 20 62 75 66 66 65 72 | 2d 72 65 61 64 2d 6f 6e |d buffer|-read-on|
|00003980| 6c 79 20 75 6e 64 6f 2d | 68 69 67 68 2d 74 68 72 |ly undo-|high-thr|
|00003990| 65 73 68 6f 6c 64 20 6b | 69 6c 6c 2d 72 69 6e 67 |eshold k|ill-ring|
|000039a0| 20 6b 69 6c 6c 2d 72 69 | 6e 67 2d 6d 61 78 20 6e | kill-ri|ng-max n|
|000039b0| 69 6c 20 74 68 69 73 2d | 63 6f 6d 6d 61 6e 64 20 |il this-|command |
|000039c0| 6b 69 6c 6c 2d 72 69 6e | 67 2d 79 61 6e 6b 2d 70 |kill-rin|g-yank-p|
|000039d0| 6f 69 6e 74 65 72 20 6b | 69 6c 6c 2d 72 65 67 69 |ointer k|ill-regi|
|000039e0| 6f 6e 20 31 30 30 20 64 | 65 6c 65 74 65 2d 72 65 |on 100 d|elete-re|
|000039f0| 67 69 6f 6e 20 73 65 74 | 63 64 72 20 6e 74 68 63 |gion set|cdr nthc|
|00003a00| 64 72 20 63 6f 70 79 2d | 72 65 67 69 6f 6e 2d 61 |dr copy-|region-a|
|00003a10| 73 2d 6b 69 6c 6c 5d 20 | 37 29 29 0a 0a 28 66 73 |s-kill] |7))..(fs|
|00003a20| 65 74 20 28 71 75 6f 74 | 65 20 6b 69 6c 6c 2d 72 |et (quot|e kill-r|
|00003a30| 69 6e 67 2d 73 61 76 65 | 29 20 28 71 75 6f 74 65 |ing-save|) (quote|
|00003a40| 20 63 6f 70 79 2d 72 65 | 67 69 6f 6e 2d 61 73 2d | copy-re|gion-as-|
|00003a50| 6b 69 6c 6c 29 29 0a 0a | 28 64 65 66 75 6e 20 63 |kill))..|(defun c|
|00003a60| 6f 70 79 2d 72 65 67 69 | 6f 6e 2d 61 73 2d 6b 69 |opy-regi|on-as-ki|
|00003a70| 6c 6c 20 28 62 65 67 20 | 65 6e 64 29 20 22 5c 0a |ll (beg |end) "\.|
|00003a80| 53 61 76 65 20 74 68 65 | 20 72 65 67 69 6f 6e 20 |Save the| region |
|00003a90| 61 73 20 69 66 20 6b 69 | 6c 6c 65 64 2c 20 62 75 |as if ki|lled, bu|
|00003aa0| 74 20 64 6f 6e 27 74 20 | 6b 69 6c 6c 20 69 74 2e |t don't |kill it.|
|00003ab0| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 20 22 |" (inter|active "|
|00003ac0| 72 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |r") (byt|e-code "|
|00003ad0| c5 88 08 c8 3d 83 14 00 | c9 ca 09 0a 5c 22 0a 09 |....=...|....\"..|
|00003ae0| 57 5c 22 82 2c 00 ca 09 | 0a 5c 22 0b 42 89 13 88 |W\".,...|.\".B...|
|00003af0| 0b 47 0c 56 85 2c 00 cb | cc 0c 53 0b 5c 22 c5 5c |.G.V.,..|..S.\".\|
|00003b00| 22 88 c8 89 16 06 88 0b | 89 16 07 87 22 20 5b 6c |".......|...." [l|
|00003b10| 61 73 74 2d 63 6f 6d 6d | 61 6e 64 20 62 65 67 20 |ast-comm|and beg |
|00003b20| 65 6e 64 20 6b 69 6c 6c | 2d 72 69 6e 67 20 6b 69 |end kill|-ring ki|
|00003b30| 6c 6c 2d 72 69 6e 67 2d | 6d 61 78 20 6e 69 6c 20 |ll-ring-|max nil |
|00003b40| 74 68 69 73 2d 63 6f 6d | 6d 61 6e 64 20 6b 69 6c |this-com|mand kil|
|00003b50| 6c 2d 72 69 6e 67 2d 79 | 61 6e 6b 2d 70 6f 69 6e |l-ring-y|ank-poin|
|00003b60| 74 65 72 20 6b 69 6c 6c | 2d 72 65 67 69 6f 6e 20 |ter kill|-region |
|00003b70| 6b 69 6c 6c 2d 61 70 70 | 65 6e 64 20 62 75 66 66 |kill-app|end buff|
|00003b80| 65 72 2d 73 75 62 73 74 | 72 69 6e 67 20 73 65 74 |er-subst|ring set|
|00003b90| 63 64 72 20 6e 74 68 63 | 64 72 5d 20 37 29 29 0a |cdr nthc|dr] 7)).|
|00003ba0| 0a 28 64 65 66 75 6e 20 | 61 70 70 65 6e 64 2d 6e |.(defun |append-n|
|00003bb0| 65 78 74 2d 6b 69 6c 6c | 20 6e 69 6c 20 22 5c 0a |ext-kill| nil "\.|
|00003bc0| 43 61 75 73 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |Cause fo|llowing |
|00003bd0| 63 6f 6d 6d 61 6e 64 2c | 20 69 66 20 6b 69 6c 6c |command,| if kill|
|00003be0| 2c 20 74 6f 20 61 70 70 | 65 6e 64 20 74 6f 20 70 |, to app|end to p|
|00003bf0| 72 65 76 69 6f 75 73 20 | 6b 69 6c 6c 2e 22 20 28 |revious |kill." (|
|00003c00| 69 6e 74 65 72 61 63 74 | 69 76 65 29 20 28 62 79 |interact|ive) (by|
|00003c10| 74 65 2d 63 6f 64 65 20 | 22 c2 88 74 83 0c 00 c3 |te-code |"..t....|
|00003c20| 89 10 82 0f 00 c3 89 11 | 87 22 20 5b 74 68 69 73 |........|." [this|
|00003c30| 2d 63 6f 6d 6d 61 6e 64 | 20 6c 61 73 74 2d 63 6f |-command| last-co|
|00003c40| 6d 6d 61 6e 64 20 6e 69 | 6c 20 6b 69 6c 6c 2d 72 |mmand ni|l kill-r|
|00003c50| 65 67 69 6f 6e 5d 20 32 | 29 29 0a 0a 28 64 65 66 |egion] 2|))..(def|
|00003c60| 75 6e 20 72 6f 74 61 74 | 65 2d 79 61 6e 6b 2d 70 |un rotat|e-yank-p|
|00003c70| 6f 69 6e 74 65 72 20 28 | 61 72 67 29 20 22 5c 0a |ointer (|arg) "\.|
|00003c80| 52 6f 74 61 74 65 20 74 | 68 65 20 79 61 6e 6b 69 |Rotate t|he yanki|
|00003c90| 6e 67 20 70 6f 69 6e 74 | 20 69 6e 20 74 68 65 20 |ng point| in the |
|00003ca0| 6b 69 6c 6c 20 72 69 6e | 67 2e 22 20 28 69 6e 74 |kill rin|g." (int|
|00003cb0| 65 72 61 63 74 69 76 65 | 20 22 70 22 29 20 28 62 |eractive| "p") (b|
|00003cc0| 79 74 65 2d 63 6f 64 65 | 20 22 c4 88 09 47 18 c5 |yte-code| "...G..|
|00003cd0| 08 21 83 11 00 c6 c7 21 | 82 1f 00 c8 c9 0b 08 0a |.!.....!|........|
|00003ce0| 47 5a 5c 5c 08 5c 22 09 | 5c 22 89 12 29 87 22 20 |GZ\\.\".|\"..)." |
|00003cf0| 5b 6c 65 6e 67 74 68 20 | 6b 69 6c 6c 2d 72 69 6e |[length |kill-rin|
|00003d00| 67 20 6b 69 6c 6c 2d 72 | 69 6e 67 2d 79 61 6e 6b |g kill-r|ing-yank|
|00003d10| 2d 70 6f 69 6e 74 65 72 | 20 61 72 67 20 6e 69 6c |-pointer| arg nil|
|00003d20| 20 7a 65 72 6f 70 20 65 | 72 72 6f 72 20 22 4b 69 | zerop e|rror "Ki|
|00003d30| 6c 6c 20 72 69 6e 67 20 | 69 73 20 65 6d 70 74 79 |ll ring |is empty|
|00003d40| 22 20 6e 74 68 63 64 72 | 20 25 5d 20 37 29 29 0a |" nthcdr| %] 7)).|
|00003d50| 0a 28 64 65 66 75 6e 20 | 79 61 6e 6b 2d 70 6f 70 |.(defun |yank-pop|
|00003d60| 20 28 61 72 67 29 20 22 | 5c 0a 52 65 70 6c 61 63 | (arg) "|\.Replac|
|00003d70| 65 20 6a 75 73 74 2d 79 | 61 6e 6b 65 64 20 73 74 |e just-y|anked st|
|00003d80| 72 65 74 63 68 20 6f 66 | 20 6b 69 6c 6c 65 64 2d |retch of| killed-|
|00003d90| 74 65 78 74 20 77 69 74 | 68 20 61 20 64 69 66 66 |text wit|h a diff|
|00003da0| 65 72 65 6e 74 20 73 74 | 72 65 74 63 68 2e 0a 54 |erent st|retch..T|
|00003db0| 68 69 73 20 63 6f 6d 6d | 61 6e 64 20 69 73 20 61 |his comm|and is a|
|00003dc0| 6c 6c 6f 77 65 64 20 6f | 6e 6c 79 20 69 6d 6d 65 |llowed o|nly imme|
|00003dd0| 64 69 61 74 65 6c 79 20 | 61 66 74 65 72 20 61 20 |diately |after a |
|00003de0| 20 79 61 6e 6b 20 20 6f | 72 20 61 20 20 79 61 6e | yank o|r a yan|
|00003df0| 6b 2d 70 6f 70 2e 0a 41 | 74 20 73 75 63 68 20 61 |k-pop..A|t such a|
|00003e00| 20 74 69 6d 65 2c 20 74 | 68 65 20 72 65 67 69 6f | time, t|he regio|
|00003e10| 6e 20 63 6f 6e 74 61 69 | 6e 73 20 61 20 73 74 72 |n contai|ns a str|
|00003e20| 65 74 63 68 20 6f 66 20 | 72 65 69 6e 73 65 72 74 |etch of |reinsert|
|00003e30| 65 64 0a 70 72 65 76 69 | 6f 75 73 6c 79 2d 6b 69 |ed.previ|ously-ki|
|00003e40| 6c 6c 65 64 20 74 65 78 | 74 2e 20 20 79 61 6e 6b |lled tex|t. yank|
|00003e50| 2d 70 6f 70 20 20 64 65 | 6c 65 74 65 73 20 74 68 |-pop de|letes th|
|00003e60| 61 74 20 74 65 78 74 20 | 61 6e 64 20 69 6e 73 65 |at text |and inse|
|00003e70| 72 74 73 20 69 6e 20 69 | 74 73 0a 70 6c 61 63 65 |rts in i|ts.place|
|00003e80| 20 61 20 64 69 66 66 65 | 72 65 6e 74 20 73 74 72 | a diffe|rent str|
|00003e90| 65 74 63 68 20 6f 66 20 | 6b 69 6c 6c 65 64 20 74 |etch of |killed t|
|00003ea0| 65 78 74 2e 0a 0a 57 69 | 74 68 20 6e 6f 20 61 72 |ext...Wi|th no ar|
|00003eb0| 67 75 6d 65 6e 74 2c 20 | 74 68 65 20 70 72 65 76 |gument, |the prev|
|00003ec0| 69 6f 75 73 20 6b 69 6c | 6c 20 69 73 20 69 6e 73 |ious kil|l is ins|
|00003ed0| 65 72 74 65 64 2e 0a 57 | 69 74 68 20 61 72 67 75 |erted..W|ith argu|
|00003ee0| 6d 65 6e 74 20 6e 2c 20 | 74 68 65 20 6e 27 74 68 |ment n, |the n'th|
|00003ef0| 20 70 72 65 76 69 6f 75 | 73 20 6b 69 6c 6c 20 69 | previou|s kill i|
|00003f00| 73 20 69 6e 73 65 72 74 | 65 64 2e 0a 49 66 20 6e |s insert|ed..If n|
|00003f10| 20 69 73 20 6e 65 67 61 | 74 69 76 65 2c 20 74 68 | is nega|tive, th|
|00003f20| 69 73 20 69 73 20 61 20 | 6d 6f 72 65 20 72 65 63 |is is a |more rec|
|00003f30| 65 6e 74 20 6b 69 6c 6c | 2e 0a 0a 54 68 65 20 73 |ent kill|...The s|
|00003f40| 65 71 75 65 6e 63 65 20 | 6f 66 20 6b 69 6c 6c 73 |equence |of kills|
|00003f50| 20 77 72 61 70 73 20 61 | 72 6f 75 6e 64 2c 20 73 | wraps a|round, s|
|00003f60| 6f 20 74 68 61 74 20 61 | 66 74 65 72 20 74 68 65 |o that a|fter the|
|00003f70| 20 6f 6c 64 65 73 74 20 | 6f 6e 65 0a 63 6f 6d 65 | oldest |one.come|
|00003f80| 73 20 74 68 65 20 6e 65 | 77 65 73 74 20 6f 6e 65 |s the ne|west one|
|00003f90| 2e 22 20 28 69 6e 74 65 | 72 61 63 74 69 76 65 20 |." (inte|ractive |
|00003fa0| 22 2a 70 22 29 20 28 62 | 79 74 65 2d 63 6f 64 65 |"*p") (b|yte-code|
|00003fb0| 20 22 c5 88 08 c6 3d 3f | 85 0c 00 c7 c8 21 88 c6 | "....=?|.....!..|
|00003fc0| 89 11 88 60 c9 20 57 1a | ca 60 c9 20 5c 22 88 cb |...`. W.|.`. \"..|
|00003fd0| 0b 21 88 cc 60 21 88 0c | 40 63 88 0a 85 2e 00 cd |.!..`!..|@c......|
|00003fe0| 20 29 87 22 20 5b 6c 61 | 73 74 2d 63 6f 6d 6d 61 | )." [la|st-comma|
|00003ff0| 6e 64 20 74 68 69 73 2d | 63 6f 6d 6d 61 6e 64 20 |nd this-|command |
|00004000| 62 65 66 6f 72 65 20 61 | 72 67 20 6b 69 6c 6c 2d |before a|rg kill-|
|00004010| 72 69 6e 67 2d 79 61 6e | 6b 2d 70 6f 69 6e 74 65 |ring-yan|k-pointe|
|00004020| 72 20 6e 69 6c 20 79 61 | 6e 6b 20 65 72 72 6f 72 |r nil ya|nk error|
|00004030| 20 22 50 72 65 76 69 6f | 75 73 20 63 6f 6d 6d 61 | "Previo|us comma|
|00004040| 6e 64 20 77 61 73 20 6e | 6f 74 20 61 20 79 61 6e |nd was n|ot a yan|
|00004050| 6b 22 20 6d 61 72 6b 20 | 64 65 6c 65 74 65 2d 72 |k" mark |delete-r|
|00004060| 65 67 69 6f 6e 20 72 6f | 74 61 74 65 2d 79 61 6e |egion ro|tate-yan|
|00004070| 6b 2d 70 6f 69 6e 74 65 | 72 20 73 65 74 2d 6d 61 |k-pointe|r set-ma|
|00004080| 72 6b 20 65 78 63 68 61 | 6e 67 65 2d 70 6f 69 6e |rk excha|nge-poin|
|00004090| 74 2d 61 6e 64 2d 6d 61 | 72 6b 5d 20 38 29 29 0a |t-and-ma|rk] 8)).|
|000040a0| 0a 28 64 65 66 75 6e 20 | 79 61 6e 6b 20 28 26 6f |.(defun |yank (&o|
|000040b0| 70 74 69 6f 6e 61 6c 20 | 61 72 67 29 20 22 5c 0a |ptional |arg) "\.|
|000040c0| 52 65 69 6e 73 65 72 74 | 20 74 68 65 20 6c 61 73 |Reinsert| the las|
|000040d0| 74 20 73 74 72 65 74 63 | 68 20 6f 66 20 6b 69 6c |t stretc|h of kil|
|000040e0| 6c 65 64 20 74 65 78 74 | 2e 0a 4d 6f 72 65 20 70 |led text|..More p|
|000040f0| 72 65 63 69 73 65 6c 79 | 2c 20 72 65 69 6e 73 65 |recisely|, reinse|
|00004100| 72 74 20 74 68 65 20 73 | 74 72 65 74 63 68 20 6f |rt the s|tretch o|
|00004110| 66 20 6b 69 6c 6c 65 64 | 20 74 65 78 74 20 6d 6f |f killed| text mo|
|00004120| 73 74 20 72 65 63 65 6e | 74 6c 79 0a 6b 69 6c 6c |st recen|tly.kill|
|00004130| 65 64 20 4f 52 20 79 61 | 6e 6b 65 64 2e 0a 57 69 |ed OR ya|nked..Wi|
|00004140| 74 68 20 6a 75 73 74 20 | 43 2d 55 20 61 73 20 61 |th just |C-U as a|
|00004150| 72 67 75 6d 65 6e 74 2c | 20 73 61 6d 65 20 62 75 |rgument,| same bu|
|00004160| 74 20 70 75 74 20 70 6f | 69 6e 74 20 69 6e 20 66 |t put po|int in f|
|00004170| 72 6f 6e 74 20 28 61 6e | 64 20 6d 61 72 6b 20 61 |ront (an|d mark a|
|00004180| 74 20 65 6e 64 29 2e 0a | 57 69 74 68 20 61 72 67 |t end)..|With arg|
|00004190| 75 6d 65 6e 74 20 6e 2c | 20 72 65 69 6e 73 65 72 |ument n,| reinser|
|000041a0| 74 20 74 68 65 20 6e 74 | 68 20 6d 6f 73 74 20 72 |t the nt|h most r|
|000041b0| 65 63 65 6e 74 6c 79 20 | 6b 69 6c 6c 65 64 20 73 |ecently |killed s|
|000041c0| 74 72 65 74 63 68 20 6f | 66 20 6b 69 6c 6c 65 64 |tretch o|f killed|
|000041d0| 0a 74 65 78 74 2e 0a 53 | 65 65 20 61 6c 73 6f 20 |.text..S|ee also |
|000041e0| 74 68 65 20 63 6f 6d 6d | 61 6e 64 20 5c 5c 5b 79 |the comm|and \\[y|
|000041f0| 61 6e 6b 2d 70 6f 70 5d | 2e 22 20 28 69 6e 74 65 |ank-pop]|." (inte|
|00004200| 72 61 63 74 69 76 65 20 | 22 2a 50 22 29 20 28 62 |ractive |"*P") (b|
|00004210| 79 74 65 2d 63 6f 64 65 | 20 22 c2 88 c3 08 3c 83 |yte-code| "....<.|
|00004220| 0c 00 c4 82 18 00 08 c5 | 3d 83 16 00 c6 82 18 00 |........|=.......|
|00004230| 08 53 21 88 c7 60 21 88 | 09 40 63 88 08 3a 85 29 |.S!..`!.|.@c..:.)|
|00004240| 00 c8 20 87 22 20 5b 61 | 72 67 20 6b 69 6c 6c 2d |.. ." [a|rg kill-|
|00004250| 72 69 6e 67 2d 79 61 6e | 6b 2d 70 6f 69 6e 74 65 |ring-yan|k-pointe|
|00004260| 72 20 6e 69 6c 20 72 6f | 74 61 74 65 2d 79 61 6e |r nil ro|tate-yan|
|00004270| 6b 2d 70 6f 69 6e 74 65 | 72 20 30 20 2d 20 2d 31 |k-pointe|r 0 - -1|
|00004280| 20 70 75 73 68 2d 6d 61 | 72 6b 20 65 78 63 68 61 | push-ma|rk excha|
|00004290| 6e 67 65 2d 70 6f 69 6e | 74 2d 61 6e 64 2d 6d 61 |nge-poin|t-and-ma|
|000042a0| 72 6b 5d 20 34 29 29 0a | 0a 28 64 65 66 75 6e 20 |rk] 4)).|.(defun |
|000042b0| 69 6e 73 65 72 74 2d 62 | 75 66 66 65 72 20 28 62 |insert-b|uffer (b|
|000042c0| 75 66 66 65 72 29 20 22 | 5c 0a 49 6e 73 65 72 74 |uffer) "|\.Insert|
|000042d0| 20 61 66 74 65 72 20 70 | 6f 69 6e 74 20 74 68 65 | after p|oint the|
|000042e0| 20 63 6f 6e 74 65 6e 74 | 73 20 6f 66 20 42 55 46 | content|s of BUF|
|000042f0| 46 45 52 2e 0a 50 75 74 | 73 20 6d 61 72 6b 20 61 |FER..Put|s mark a|
|00004300| 66 74 65 72 20 74 68 65 | 20 69 6e 73 65 72 74 65 |fter the| inserte|
|00004310| 64 20 74 65 78 74 2e 0a | 42 55 46 46 45 52 20 6d |d text..|BUFFER m|
|00004320| 61 79 20 62 65 20 61 20 | 62 75 66 66 65 72 20 6f |ay be a |buffer o|
|00004330| 72 20 61 20 62 75 66 66 | 65 72 20 6e 61 6d 65 2e |r a buff|er name.|
|00004340| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 20 22 |" (inter|active "|
|00004350| 2a 62 49 6e 73 65 72 74 | 20 62 75 66 66 65 72 3a |*bInsert| buffer:|
|00004360| 20 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 | ") (byt|e-code "|
|00004370| c4 88 c5 08 21 86 0d 00 | c6 08 21 89 10 88 c4 c4 |....!...|..!.....|
|00004380| c4 1b 1a 19 8a 8a 08 71 | 88 65 11 64 89 12 29 88 |.......q|.e.d..).|
|00004390| c7 08 09 0a 23 88 60 89 | 13 29 88 c8 0b 21 2b 87 |....#.`.|.)...!+.|
|000043a0| 22 20 5b 62 75 66 66 65 | 72 20 73 74 61 72 74 20 |" [buffe|r start |
|000043b0| 65 6e 64 20 6e 65 77 6d | 61 72 6b 20 6e 69 6c 20 |end newm|ark nil |
|000043c0| 62 75 66 66 65 72 70 20 | 67 65 74 2d 62 75 66 66 |bufferp |get-buff|
|000043d0| 65 72 20 69 6e 73 65 72 | 74 2d 62 75 66 66 65 72 |er inser|t-buffer|
|000043e0| 2d 73 75 62 73 74 72 69 | 6e 67 20 70 75 73 68 2d |-substri|ng push-|
|000043f0| 6d 61 72 6b 5d 20 36 29 | 29 0a 0a 28 64 65 66 75 |mark] 6)|)..(defu|
|00004400| 6e 20 61 70 70 65 6e 64 | 2d 74 6f 2d 62 75 66 66 |n append|-to-buff|
|00004410| 65 72 20 28 62 75 66 66 | 65 72 20 73 74 61 72 74 |er (buff|er start|
|00004420| 20 65 6e 64 29 20 22 5c | 0a 41 70 70 65 6e 64 20 | end) "\|.Append |
|00004430| 74 6f 20 73 70 65 63 69 | 66 69 65 64 20 62 75 66 |to speci|fied buf|
|00004440| 66 65 72 20 74 68 65 20 | 74 65 78 74 20 6f 66 20 |fer the |text of |
|00004450| 74 68 65 20 72 65 67 69 | 6f 6e 2e 0a 49 74 20 69 |the regi|on..It i|
|00004460| 73 20 69 6e 73 65 72 74 | 65 64 20 69 6e 74 6f 20 |s insert|ed into |
|00004470| 74 68 61 74 20 62 75 66 | 66 65 72 20 62 65 66 6f |that buf|fer befo|
|00004480| 72 65 20 69 74 73 20 70 | 6f 69 6e 74 2e 0a 0a 57 |re its p|oint...W|
|00004490| 68 65 6e 20 63 61 6c 6c | 69 6e 67 20 66 72 6f 6d |hen call|ing from|
|000044a0| 20 61 20 70 72 6f 67 72 | 61 6d 2c 20 67 69 76 65 | a progr|am, give|
|000044b0| 20 74 68 72 65 65 20 61 | 72 67 75 6d 65 6e 74 73 | three a|rguments|
|000044c0| 3a 0a 61 20 62 75 66 66 | 65 72 20 6f 72 20 74 68 |:.a buff|er or th|
|000044d0| 65 20 6e 61 6d 65 20 6f | 66 20 6f 6e 65 2c 20 61 |e name o|f one, a|
|000044e0| 6e 64 20 74 77 6f 20 63 | 68 61 72 61 63 74 65 72 |nd two c|haracter|
|000044f0| 20 6e 75 6d 62 65 72 73 | 0a 73 70 65 63 69 66 79 | numbers|.specify|
|00004500| 69 6e 67 20 74 68 65 20 | 70 6f 72 74 69 6f 6e 20 |ing the |portion |
|00004510| 6f 66 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 62 |of the c|urrent b|
|00004520| 75 66 66 65 72 20 74 6f | 20 62 65 20 63 6f 70 69 |uffer to| be copi|
|00004530| 65 64 2e 22 20 28 69 6e | 74 65 72 61 63 74 69 76 |ed." (in|teractiv|
|00004540| 65 20 22 42 41 70 70 65 | 6e 64 20 74 6f 20 62 75 |e "BAppe|nd to bu|
|00004550| 66 66 65 72 3a 20 0a 72 | 22 29 20 28 62 79 74 65 |ffer: .r|") (byte|
|00004560| 2d 63 6f 64 65 20 22 c4 | 88 70 18 8a c5 09 21 71 |-code ".|.p....!q|
|00004570| 88 c6 08 0a 0b 23 29 29 | 87 22 20 5b 6f 6c 64 62 |.....#))|." [oldb|
|00004580| 75 66 20 62 75 66 66 65 | 72 20 73 74 61 72 74 20 |uf buffe|r start |
|00004590| 65 6e 64 20 6e 69 6c 20 | 67 65 74 2d 62 75 66 66 |end nil |get-buff|
|000045a0| 65 72 2d 63 72 65 61 74 | 65 20 69 6e 73 65 72 74 |er-creat|e insert|
|000045b0| 2d 62 75 66 66 65 72 2d | 73 75 62 73 74 72 69 6e |-buffer-|substrin|
|000045c0| 67 5d 20 35 29 29 0a 0a | 28 64 65 66 75 6e 20 70 |g] 5))..|(defun p|
|000045d0| 72 65 70 65 6e 64 2d 74 | 6f 2d 62 75 66 66 65 72 |repend-t|o-buffer|
|000045e0| 20 28 62 75 66 66 65 72 | 20 73 74 61 72 74 20 65 | (buffer| start e|
|000045f0| 6e 64 29 20 22 5c 0a 50 | 72 65 70 65 6e 64 20 74 |nd) "\.P|repend t|
|00004600| 6f 20 73 70 65 63 69 66 | 69 65 64 20 62 75 66 66 |o specif|ied buff|
|00004610| 65 72 20 74 68 65 20 74 | 65 78 74 20 6f 66 20 74 |er the t|ext of t|
|00004620| 68 65 20 72 65 67 69 6f | 6e 2e 0a 49 74 20 69 73 |he regio|n..It is|
|00004630| 20 69 6e 73 65 72 74 65 | 64 20 69 6e 74 6f 20 74 | inserte|d into t|
|00004640| 68 61 74 20 62 75 66 66 | 65 72 20 61 66 74 65 72 |hat buff|er after|
|00004650| 20 69 74 73 20 70 6f 69 | 6e 74 2e 0a 0a 57 68 65 | its poi|nt...Whe|
|00004660| 6e 20 63 61 6c 6c 69 6e | 67 20 66 72 6f 6d 20 61 |n callin|g from a|
|00004670| 20 70 72 6f 67 72 61 6d | 2c 20 67 69 76 65 20 74 | program|, give t|
|00004680| 68 72 65 65 20 61 72 67 | 75 6d 65 6e 74 73 3a 0a |hree arg|uments:.|
|00004690| 61 20 62 75 66 66 65 72 | 20 6f 72 20 74 68 65 20 |a buffer| or the |
|000046a0| 6e 61 6d 65 20 6f 66 20 | 6f 6e 65 2c 20 61 6e 64 |name of |one, and|
|000046b0| 20 74 77 6f 20 63 68 61 | 72 61 63 74 65 72 20 6e | two cha|racter n|
|000046c0| 75 6d 62 65 72 73 0a 73 | 70 65 63 69 66 79 69 6e |umbers.s|pecifyin|
|000046d0| 67 20 74 68 65 20 70 6f | 72 74 69 6f 6e 20 6f 66 |g the po|rtion of|
|000046e0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 62 75 66 | the cur|rent buf|
|000046f0| 66 65 72 20 74 6f 20 62 | 65 20 63 6f 70 69 65 64 |fer to b|e copied|
|00004700| 2e 22 20 28 69 6e 74 65 | 72 61 63 74 69 76 65 20 |." (inte|ractive |
|00004710| 22 42 50 72 65 70 65 6e | 64 20 74 6f 20 62 75 66 |"BPrepen|d to buf|
|00004720| 66 65 72 3a 20 0a 72 22 | 29 20 28 62 79 74 65 2d |fer: .r"|) (byte-|
|00004730| 63 6f 64 65 20 22 c4 88 | 70 18 8a c5 09 21 71 88 |code "..|p....!q.|
|00004740| 8a c6 08 0a 0b 23 29 29 | 29 87 22 20 5b 6f 6c 64 |.....#))|)." [old|
|00004750| 62 75 66 20 62 75 66 66 | 65 72 20 73 74 61 72 74 |buf buff|er start|
|00004760| 20 65 6e 64 20 6e 69 6c | 20 67 65 74 2d 62 75 66 | end nil| get-buf|
|00004770| 66 65 72 2d 63 72 65 61 | 74 65 20 69 6e 73 65 72 |fer-crea|te inser|
|00004780| 74 2d 62 75 66 66 65 72 | 2d 73 75 62 73 74 72 69 |t-buffer|-substri|
|00004790| 6e 67 5d 20 35 29 29 0a | 0a 28 64 65 66 75 6e 20 |ng] 5)).|.(defun |
|000047a0| 63 6f 70 79 2d 74 6f 2d | 62 75 66 66 65 72 20 28 |copy-to-|buffer (|
|000047b0| 62 75 66 66 65 72 20 73 | 74 61 72 74 20 65 6e 64 |buffer s|tart end|
|000047c0| 29 20 22 5c 0a 43 6f 70 | 79 20 74 6f 20 73 70 65 |) "\.Cop|y to spe|
|000047d0| 63 69 66 69 65 64 20 62 | 75 66 66 65 72 20 74 68 |cified b|uffer th|
|000047e0| 65 20 74 65 78 74 20 6f | 66 20 74 68 65 20 72 65 |e text o|f the re|
|000047f0| 67 69 6f 6e 2e 0a 49 74 | 20 69 73 20 69 6e 73 65 |gion..It| is inse|
|00004800| 72 74 65 64 20 69 6e 74 | 6f 20 74 68 61 74 20 62 |rted int|o that b|
|00004810| 75 66 66 65 72 2c 20 72 | 65 70 6c 61 63 69 6e 67 |uffer, r|eplacing|
|00004820| 20 65 78 69 73 74 69 6e | 67 20 74 65 78 74 20 74 | existin|g text t|
|00004830| 68 65 72 65 2e 0a 0a 57 | 68 65 6e 20 63 61 6c 6c |here...W|hen call|
|00004840| 69 6e 67 20 66 72 6f 6d | 20 61 20 70 72 6f 67 72 |ing from| a progr|
|00004850| 61 6d 2c 20 67 69 76 65 | 20 74 68 72 65 65 20 61 |am, give| three a|
|00004860| 72 67 75 6d 65 6e 74 73 | 3a 0a 61 20 62 75 66 66 |rguments|:.a buff|
|00004870| 65 72 20 6f 72 20 74 68 | 65 20 6e 61 6d 65 20 6f |er or th|e name o|
|00004880| 66 20 6f 6e 65 2c 20 61 | 6e 64 20 74 77 6f 20 63 |f one, a|nd two c|
|00004890| 68 61 72 61 63 74 65 72 | 20 6e 75 6d 62 65 72 73 |haracter| numbers|
|000048a0| 0a 73 70 65 63 69 66 79 | 69 6e 67 20 74 68 65 20 |.specify|ing the |
|000048b0| 70 6f 72 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 63 |portion |of the c|
|000048c0| 75 72 72 65 6e 74 20 62 | 75 66 66 65 72 20 74 6f |urrent b|uffer to|
|000048d0| 20 62 65 20 63 6f 70 69 | 65 64 2e 22 20 28 69 6e | be copi|ed." (in|
|000048e0| 74 65 72 61 63 74 69 76 | 65 20 22 42 43 6f 70 79 |teractiv|e "BCopy|
|000048f0| 20 74 6f 20 62 75 66 66 | 65 72 3a 20 0a 72 22 29 | to buff|er: .r")|
|00004900| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c4 88 70 | (byte-c|ode "..p|
|00004910| 18 8a c5 09 21 71 88 c6 | 20 88 8a c7 08 0a 0b 23 |....!q..| ......#|
|00004920| 29 29 29 87 22 20 5b 6f | 6c 64 62 75 66 20 62 75 |)))." [o|ldbuf bu|
|00004930| 66 66 65 72 20 73 74 61 | 72 74 20 65 6e 64 20 6e |ffer sta|rt end n|
|00004940| 69 6c 20 67 65 74 2d 62 | 75 66 66 65 72 2d 63 72 |il get-b|uffer-cr|
|00004950| 65 61 74 65 20 65 72 61 | 73 65 2d 62 75 66 66 65 |eate era|se-buffe|
|00004960| 72 20 69 6e 73 65 72 74 | 2d 62 75 66 66 65 72 2d |r insert|-buffer-|
|00004970| 73 75 62 73 74 72 69 6e | 67 5d 20 36 29 29 0a 0a |substrin|g] 6))..|
|00004980| 28 64 65 66 75 6e 20 6d | 61 72 6b 20 6e 69 6c 20 |(defun m|ark nil |
|00004990| 22 5c 0a 52 65 74 75 72 | 6e 20 74 68 69 73 20 62 |"\.Retur|n this b|
|000049a0| 75 66 66 65 72 27 73 20 | 6d 61 72 6b 20 76 61 6c |uffer's |mark val|
|000049b0| 75 65 20 61 73 20 69 6e | 74 65 67 65 72 2c 20 6f |ue as in|teger, o|
|000049c0| 72 20 6e 69 6c 20 69 66 | 20 6e 6f 20 6d 61 72 6b |r nil if| no mark|
|000049d0| 2e 0a 49 66 20 79 6f 75 | 20 61 72 65 20 75 73 69 |..If you| are usi|
|000049e0| 6e 67 20 74 68 69 73 20 | 69 6e 20 61 6e 20 65 64 |ng this |in an ed|
|000049f0| 69 74 69 6e 67 20 63 6f | 6d 6d 61 6e 64 2c 20 79 |iting co|mmand, y|
|00004a00| 6f 75 20 61 72 65 20 6d | 6f 73 74 20 6c 69 6b 65 |ou are m|ost like|
|00004a10| 6c 79 20 6d 61 6b 69 6e | 67 0a 61 20 6d 69 73 74 |ly makin|g.a mist|
|00004a20| 61 6b 65 3b 20 73 65 65 | 20 74 68 65 20 64 6f 63 |ake; see| the doc|
|00004a30| 75 6d 65 6e 74 61 74 69 | 6f 6e 20 6f 66 20 60 73 |umentati|on of `s|
|00004a40| 65 74 2d 6d 61 72 6b 27 | 2e 22 20 28 62 79 74 65 |et-mark'|." (byte|
|00004a50| 2d 63 6f 64 65 20 22 c0 | c1 20 21 87 22 20 5b 6d |-code ".|. !." [m|
|00004a60| 61 72 6b 65 72 2d 70 6f | 73 69 74 69 6f 6e 20 6d |arker-po|sition m|
|00004a70| 61 72 6b 2d 6d 61 72 6b | 65 72 5d 20 33 29 29 0a |ark-mark|er] 3)).|
|00004a80| 0a 28 64 65 66 75 6e 20 | 73 65 74 2d 6d 61 72 6b |.(defun |set-mark|
|00004a90| 20 28 70 6f 73 29 20 22 | 5c 0a 53 65 74 20 74 68 | (pos) "|\.Set th|
|00004aa0| 69 73 20 62 75 66 66 65 | 72 27 73 20 6d 61 72 6b |is buffe|r's mark|
|00004ab0| 20 74 6f 20 50 4f 53 2e | 20 20 44 6f 6e 27 74 20 | to POS.| Don't |
|00004ac0| 75 73 65 20 74 68 69 73 | 20 66 75 6e 63 74 69 6f |use this| functio|
|00004ad0| 6e 21 0a 54 68 61 74 20 | 69 73 20 74 6f 20 73 61 |n!.That |is to sa|
|00004ae0| 79 2c 20 64 6f 6e 27 74 | 20 75 73 65 20 74 68 69 |y, don't| use thi|
|00004af0| 73 20 66 75 6e 63 74 69 | 6f 6e 20 75 6e 6c 65 73 |s functi|on unles|
|00004b00| 73 20 79 6f 75 20 77 61 | 6e 74 0a 74 68 65 20 75 |s you wa|nt.the u|
|00004b10| 73 65 72 20 74 6f 20 73 | 65 65 20 74 68 61 74 20 |ser to s|ee that |
|00004b20| 74 68 65 20 6d 61 72 6b | 20 68 61 73 20 6d 6f 76 |the mark| has mov|
|00004b30| 65 64 2c 20 61 6e 64 20 | 79 6f 75 20 77 61 6e 74 |ed, and |you want|
|00004b40| 20 74 68 65 20 70 72 65 | 76 69 6f 75 73 0a 6d 61 | the pre|vious.ma|
|00004b50| 72 6b 20 70 6f 73 69 74 | 69 6f 6e 20 74 6f 20 62 |rk posit|ion to b|
|00004b60| 65 20 6c 6f 73 74 2e 0a | 0a 4e 6f 72 6d 61 6c 6c |e lost..|.Normall|
|00004b70| 79 2c 20 77 68 65 6e 20 | 61 20 6e 65 77 20 6d 61 |y, when |a new ma|
|00004b80| 72 6b 20 69 73 20 73 65 | 74 2c 20 74 68 65 20 6f |rk is se|t, the o|
|00004b90| 6c 64 20 6f 6e 65 20 73 | 68 6f 75 6c 64 20 67 6f |ld one s|hould go|
|00004ba0| 20 6f 6e 20 74 68 65 20 | 73 74 61 63 6b 2e 0a 54 | on the |stack..T|
|00004bb0| 68 69 73 20 69 73 20 77 | 68 79 20 6d 6f 73 74 20 |his is w|hy most |
|00004bc0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 73 20 73 68 6f |applicat|ions sho|
|00004bd0| 75 6c 64 20 75 73 65 20 | 70 75 73 68 2d 6d 61 72 |uld use |push-mar|
|00004be0| 6b 2c 20 6e 6f 74 20 73 | 65 74 2d 6d 61 72 6b 2e |k, not s|et-mark.|
|00004bf0| 0a 0a 4e 6f 76 69 63 65 | 20 65 6d 61 63 73 2d 6c |..Novice| emacs-l|
|00004c00| 69 73 70 20 70 72 6f 67 | 72 61 6d 6d 65 72 73 20 |isp prog|rammers |
|00004c10| 6f 66 74 65 6e 20 74 72 | 79 20 74 6f 20 75 73 65 |often tr|y to use|
|00004c20| 20 74 68 65 20 6d 61 72 | 6b 20 66 6f 72 20 74 68 | the mar|k for th|
|00004c30| 65 20 77 72 6f 6e 67 0a | 70 75 72 70 6f 73 65 73 |e wrong.|purposes|
|00004c40| 2e 20 20 54 68 65 20 6d | 61 72 6b 20 73 61 76 65 |. The m|ark save|
|00004c50| 73 20 61 20 6c 6f 63 61 | 74 69 6f 6e 20 66 6f 72 |s a loca|tion for|
|00004c60| 20 74 68 65 20 75 73 65 | 72 27 73 20 63 6f 6e 76 | the use|r's conv|
|00004c70| 65 6e 69 65 6e 63 65 2e | 0a 4d 6f 73 74 20 65 64 |enience.|.Most ed|
|00004c80| 69 74 69 6e 67 20 63 6f | 6d 6d 61 6e 64 73 20 73 |iting co|mmands s|
|00004c90| 68 6f 75 6c 64 20 6e 6f | 74 20 61 6c 74 65 72 20 |hould no|t alter |
|00004ca0| 74 68 65 20 6d 61 72 6b | 2e 0a 54 6f 20 72 65 6d |the mark|..To rem|
|00004cb0| 65 6d 62 65 72 20 61 20 | 6c 6f 63 61 74 69 6f 6e |ember a |location|
|00004cc0| 20 66 6f 72 20 69 6e 74 | 65 72 6e 61 6c 20 75 73 | for int|ernal us|
|00004cd0| 65 20 69 6e 20 74 68 65 | 20 4c 69 73 70 20 70 72 |e in the| Lisp pr|
|00004ce0| 6f 67 72 61 6d 2c 0a 73 | 74 6f 72 65 20 69 74 20 |ogram,.s|tore it |
|00004cf0| 69 6e 20 61 20 4c 69 73 | 70 20 76 61 72 69 61 62 |in a Lis|p variab|
|00004d00| 6c 65 2e 20 20 45 78 61 | 6d 70 6c 65 3a 0a 0a 20 |le. Exa|mple:.. |
|00004d10| 20 20 28 6c 65 74 20 28 | 28 62 65 67 20 28 70 6f | (let (|(beg (po|
|00004d20| 69 6e 74 29 29 29 20 28 | 66 6f 72 77 61 72 64 2d |int))) (|forward-|
|00004d30| 6c 69 6e 65 20 31 29 20 | 28 64 65 6c 65 74 65 2d |line 1) |(delete-|
|00004d40| 72 65 67 69 6f 6e 20 62 | 65 67 20 28 70 6f 69 6e |region b|eg (poin|
|00004d50| 74 29 29 29 2e 22 20 28 | 62 79 74 65 2d 63 6f 64 |t)))." (|byte-cod|
|00004d60| 65 20 22 c1 c2 20 08 70 | 23 87 22 20 5b 70 6f 73 |e ".. .p|#." [pos|
|00004d70| 20 73 65 74 2d 6d 61 72 | 6b 65 72 20 6d 61 72 6b | set-mar|ker mark|
|00004d80| 2d 6d 61 72 6b 65 72 5d | 20 35 29 29 0a 0a 28 64 |-marker]| 5))..(d|
|00004d90| 65 66 76 61 72 20 6d 61 | 72 6b 2d 72 69 6e 67 20 |efvar ma|rk-ring |
|00004da0| 6e 69 6c 20 22 5c 0a 54 | 68 65 20 6c 69 73 74 20 |nil "\.T|he list |
|00004db0| 6f 66 20 73 61 76 65 64 | 20 66 6f 72 6d 65 72 20 |of saved| former |
|00004dc0| 6d 61 72 6b 73 20 6f 66 | 20 74 68 65 20 63 75 72 |marks of| the cur|
|00004dd0| 72 65 6e 74 20 62 75 66 | 66 65 72 2c 0a 6d 6f 73 |rent buf|fer,.mos|
|00004de0| 74 20 72 65 63 65 6e 74 | 20 66 69 72 73 74 2e 22 |t recent| first."|
|00004df0| 29 0a 0a 28 6d 61 6b 65 | 2d 76 61 72 69 61 62 6c |)..(make|-variabl|
|00004e00| 65 2d 62 75 66 66 65 72 | 2d 6c 6f 63 61 6c 20 28 |e-buffer|-local (|
|00004e10| 71 75 6f 74 65 20 6d 61 | 72 6b 2d 72 69 6e 67 29 |quote ma|rk-ring)|
|00004e20| 29 0a 0a 28 64 65 66 63 | 6f 6e 73 74 20 6d 61 72 |)..(defc|onst mar|
|00004e30| 6b 2d 72 69 6e 67 2d 6d | 61 78 20 31 36 20 22 5c |k-ring-m|ax 16 "\|
|00004e40| 0a 2a 4d 61 78 69 6d 75 | 6d 20 73 69 7a 65 20 6f |.*Maximu|m size o|
|00004e50| 66 20 6d 61 72 6b 20 72 | 69 6e 67 2e 20 20 53 74 |f mark r|ing. St|
|00004e60| 61 72 74 20 64 69 73 63 | 61 72 64 69 6e 67 20 6f |art disc|arding o|
|00004e70| 66 66 20 65 6e 64 20 69 | 66 20 67 65 74 73 20 74 |ff end i|f gets t|
|00004e80| 68 69 73 20 62 69 67 2e | 22 29 0a 0a 28 64 65 66 |his big.|")..(def|
|00004e90| 75 6e 20 73 65 74 2d 6d | 61 72 6b 2d 63 6f 6d 6d |un set-m|ark-comm|
|00004ea0| 61 6e 64 20 28 61 72 67 | 29 20 22 5c 0a 53 65 74 |and (arg|) "\.Set|
|00004eb0| 20 6d 61 72 6b 20 61 74 | 20 77 68 65 72 65 20 70 | mark at| where p|
|00004ec0| 6f 69 6e 74 20 69 73 2c | 20 6f 72 20 6a 75 6d 70 |oint is,| or jump|
|00004ed0| 20 74 6f 20 6d 61 72 6b | 2e 0a 57 69 74 68 20 6e | to mark|..With n|
|00004ee0| 6f 20 70 72 65 66 69 78 | 20 61 72 67 75 6d 65 6e |o prefix| argumen|
|00004ef0| 74 2c 20 73 65 74 20 6d | 61 72 6b 2c 20 61 6e 64 |t, set m|ark, and|
|00004f00| 20 70 75 73 68 20 70 72 | 65 76 69 6f 75 73 20 6d | push pr|evious m|
|00004f10| 61 72 6b 20 6f 6e 20 6d | 61 72 6b 20 72 69 6e 67 |ark on m|ark ring|
|00004f20| 2e 0a 57 69 74 68 20 61 | 72 67 75 6d 65 6e 74 2c |..With a|rgument,|
|00004f30| 20 6a 75 6d 70 20 74 6f | 20 6d 61 72 6b 2c 20 61 | jump to| mark, a|
|00004f40| 6e 64 20 70 6f 70 20 69 | 6e 74 6f 20 6d 61 72 6b |nd pop i|nto mark|
|00004f50| 20 6f 66 66 20 74 68 65 | 20 6d 61 72 6b 20 72 69 | off the| mark ri|
|00004f60| 6e 67 2e 0a 0a 4e 6f 76 | 69 63 65 20 65 6d 61 63 |ng...Nov|ice emac|
|00004f70| 73 2d 6c 69 73 70 20 70 | 72 6f 67 72 61 6d 6d 65 |s-lisp p|rogramme|
|00004f80| 72 73 20 6f 66 74 65 6e | 20 74 72 79 20 74 6f 20 |rs often| try to |
|00004f90| 75 73 65 20 74 68 65 20 | 6d 61 72 6b 20 66 6f 72 |use the |mark for|
|00004fa0| 20 74 68 65 20 77 72 6f | 6e 67 0a 70 75 72 70 6f | the wro|ng.purpo|
|00004fb0| 73 65 73 2e 20 20 53 65 | 65 20 74 68 65 20 64 6f |ses. Se|e the do|
|00004fc0| 63 75 6d 65 6e 74 61 74 | 69 6f 6e 20 6f 66 20 60 |cumentat|ion of `|
|00004fd0| 73 65 74 2d 6d 61 72 6b | 27 20 66 6f 72 20 6d 6f |set-mark|' for mo|
|00004fe0| 72 65 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 2e 22 |re infor|mation."|
|00004ff0| 20 28 69 6e 74 65 72 61 | 63 74 69 76 65 20 22 50 | (intera|ctive "P|
|00005000| 22 29 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 c1 |") (byte|-code ".|
|00005010| 88 08 3f 83 0c 00 c2 20 | 82 1e 00 c3 20 3f 83 18 |..?.... |.... ?..|
|00005020| 00 c4 c5 21 82 1e 00 c3 | 20 62 88 c6 20 87 22 20 |...!....| b.. ." |
|00005030| 5b 61 72 67 20 6e 69 6c | 20 70 75 73 68 2d 6d 61 |[arg nil| push-ma|
|00005040| 72 6b 20 6d 61 72 6b 20 | 65 72 72 6f 72 20 22 4e |rk mark |error "N|
|00005050| 6f 20 6d 61 72 6b 20 73 | 65 74 20 69 6e 20 74 68 |o mark s|et in th|
|00005060| 69 73 20 62 75 66 66 65 | 72 22 20 70 6f 70 2d 6d |is buffe|r" pop-m|
|00005070| 61 72 6b 5d 20 36 29 29 | 0a 0a 28 64 65 66 75 6e |ark] 6))|..(defun|
|00005080| 20 70 75 73 68 2d 6d 61 | 72 6b 20 28 26 6f 70 74 | push-ma|rk (&opt|
|00005090| 69 6f 6e 61 6c 20 6c 6f | 63 61 74 69 6f 6e 20 6e |ional lo|cation n|
|000050a0| 6f 6d 73 67 29 20 22 5c | 0a 53 65 74 20 6d 61 72 |omsg) "\|.Set mar|
|000050b0| 6b 20 61 74 20 4c 4f 43 | 41 54 49 4f 4e 20 28 70 |k at LOC|ATION (p|
|000050c0| 6f 69 6e 74 2c 20 62 79 | 20 64 65 66 61 75 6c 74 |oint, by| default|
|000050d0| 29 20 61 6e 64 20 70 75 | 73 68 20 6f 6c 64 20 6d |) and pu|sh old m|
|000050e0| 61 72 6b 20 6f 6e 20 6d | 61 72 6b 20 72 69 6e 67 |ark on m|ark ring|
|000050f0| 2e 0a 44 69 73 70 6c 61 | 79 73 20 5c 22 4d 61 72 |..Displa|ys \"Mar|
|00005100| 6b 20 73 65 74 5c 22 20 | 75 6e 6c 65 73 73 20 74 |k set\" |unless t|
|00005110| 68 65 20 6f 70 74 69 6f | 6e 61 6c 20 73 65 63 6f |he optio|nal seco|
|00005120| 6e 64 20 61 72 67 20 4e | 4f 4d 53 47 20 69 73 20 |nd arg N|OMSG is |
|00005130| 6e 6f 6e 2d 6e 69 6c 2e | 0a 0a 4e 6f 76 69 63 65 |non-nil.|..Novice|
|00005140| 20 65 6d 61 63 73 2d 6c | 69 73 70 20 70 72 6f 67 | emacs-l|isp prog|
|00005150| 72 61 6d 6d 65 72 73 20 | 6f 66 74 65 6e 20 74 72 |rammers |often tr|
|00005160| 79 20 74 6f 20 75 73 65 | 20 74 68 65 20 6d 61 72 |y to use| the mar|
|00005170| 6b 20 66 6f 72 20 74 68 | 65 20 77 72 6f 6e 67 0a |k for th|e wrong.|
|00005180| 70 75 72 70 6f 73 65 73 | 2e 20 20 53 65 65 20 74 |purposes|. See t|
|00005190| 68 65 20 64 6f 63 75 6d | 65 6e 74 61 74 69 6f 6e |he docum|entation|
|000051a0| 20 6f 66 20 60 73 65 74 | 2d 6d 61 72 6b 27 20 66 | of `set|-mark' f|
|000051b0| 6f 72 20 6d 6f 72 65 20 | 69 6e 66 6f 72 6d 61 74 |or more |informat|
|000051c0| 69 6f 6e 2e 22 20 28 62 | 79 74 65 2d 63 6f 64 65 |ion." (b|yte-code|
|000051d0| 20 22 c6 20 3f 83 0a 00 | c0 82 2b 00 c7 c8 20 21 | ". ?...|..+... !|
|000051e0| 09 42 89 11 88 09 47 0a | 56 85 2b 00 c9 ca 0a 09 |.B....G.|V.+.....|
|000051f0| 5c 22 40 c0 5c 22 88 cb | ca 0a 53 09 5c 22 c0 5c |\"@.\"..|..S.\".\|
|00005200| 22 88 cc 0b 86 32 00 60 | 21 88 0c 86 46 00 0d 86 |"....2.`|!...F...|
|00005210| 46 00 cd 20 ce 56 86 46 | 00 cf d0 21 87 22 20 5b |F.. .V.F|...!." [|
|00005220| 6e 69 6c 20 6d 61 72 6b | 2d 72 69 6e 67 20 6d 61 |nil mark|-ring ma|
|00005230| 72 6b 2d 72 69 6e 67 2d | 6d 61 78 20 6c 6f 63 61 |rk-ring-|max loca|
|00005240| 74 69 6f 6e 20 6e 6f 6d | 73 67 20 65 78 65 63 75 |tion nom|sg execu|
|00005250| 74 69 6e 67 2d 6d 61 63 | 72 6f 20 6d 61 72 6b 20 |ting-mac|ro mark |
|00005260| 63 6f 70 79 2d 6d 61 72 | 6b 65 72 20 6d 61 72 6b |copy-mar|ker mark|
|00005270| 2d 6d 61 72 6b 65 72 20 | 6d 6f 76 65 2d 6d 61 72 |-marker |move-mar|
|00005280| 6b 65 72 20 6e 74 68 63 | 64 72 20 73 65 74 63 64 |ker nthc|dr setcd|
|00005290| 72 20 73 65 74 2d 6d 61 | 72 6b 20 6d 69 6e 69 62 |r set-ma|rk minib|
|000052a0| 75 66 66 65 72 2d 64 65 | 70 74 68 20 30 20 6d 65 |uffer-de|pth 0 me|
|000052b0| 73 73 61 67 65 20 22 4d | 61 72 6b 20 73 65 74 22 |ssage "M|ark set"|
|000052c0| 5d 20 31 31 29 29 0a 0a | 28 64 65 66 75 6e 20 70 |] 11))..|(defun p|
|000052d0| 6f 70 2d 6d 61 72 6b 20 | 6e 69 6c 20 22 5c 0a 50 |op-mark |nil "\.P|
|000052e0| 6f 70 20 6f 66 66 20 6d | 61 72 6b 20 72 69 6e 67 |op off m|ark ring|
|000052f0| 20 69 6e 74 6f 20 74 68 | 65 20 62 75 66 66 65 72 | into th|e buffer|
|00005300| 27 73 20 61 63 74 75 61 | 6c 20 6d 61 72 6b 2e 0a |'s actua|l mark..|
|00005310| 44 6f 65 73 20 6e 6f 74 | 20 73 65 74 20 70 6f 69 |Does not| set poi|
|00005320| 6e 74 2e 20 20 44 6f 65 | 73 20 6e 6f 74 68 69 6e |nt. Doe|s nothin|
|00005330| 67 20 69 66 20 6d 61 72 | 6b 20 72 69 6e 67 20 69 |g if mar|k ring i|
|00005340| 73 20 65 6d 70 74 79 2e | 22 20 28 62 79 74 65 2d |s empty.|" (byte-|
|00005350| 63 6f 64 65 20 22 08 85 | 29 00 c2 08 c3 c4 20 21 |code "..|)..... !|
|00005360| 43 5c 22 89 10 88 c5 c6 | 08 40 5c 5c 21 88 c7 08 |C\".....|.@\\!...|
|00005370| 40 c1 5c 22 88 c8 20 3f | 85 24 00 c9 20 88 08 41 |@.\".. ?|.$.. ..A|
|00005380| 89 10 87 22 20 5b 6d 61 | 72 6b 2d 72 69 6e 67 20 |..." [ma|rk-ring |
|00005390| 6e 69 6c 20 6e 63 6f 6e | 63 20 63 6f 70 79 2d 6d |nil ncon|c copy-m|
|000053a0| 61 72 6b 65 72 20 6d 61 | 72 6b 2d 6d 61 72 6b 65 |arker ma|rk-marke|
|000053b0| 72 20 73 65 74 2d 6d 61 | 72 6b 20 30 20 6d 6f 76 |r set-ma|rk 0 mov|
|000053c0| 65 2d 6d 61 72 6b 65 72 | 20 6d 61 72 6b 20 64 69 |e-marker| mark di|
|000053d0| 6e 67 5d 20 39 29 29 0a | 0a 28 66 73 65 74 20 28 |ng] 9)).|.(fset (|
|000053e0| 71 75 6f 74 65 20 65 78 | 63 68 61 6e 67 65 2d 64 |quote ex|change-d|
|000053f0| 6f 74 2d 61 6e 64 2d 6d | 61 72 6b 29 20 28 71 75 |ot-and-m|ark) (qu|
|00005400| 6f 74 65 20 65 78 63 68 | 61 6e 67 65 2d 70 6f 69 |ote exch|ange-poi|
|00005410| 6e 74 2d 61 6e 64 2d 6d | 61 72 6b 29 29 0a 0a 28 |nt-and-m|ark))..(|
|00005420| 64 65 66 75 6e 20 65 78 | 63 68 61 6e 67 65 2d 70 |defun ex|change-p|
|00005430| 6f 69 6e 74 2d 61 6e 64 | 2d 6d 61 72 6b 20 6e 69 |oint-and|-mark ni|
|00005440| 6c 20 22 5c 0a 50 75 74 | 20 74 68 65 20 6d 61 72 |l "\.Put| the mar|
|00005450| 6b 20 77 68 65 72 65 20 | 70 6f 69 6e 74 20 69 73 |k where |point is|
|00005460| 20 6e 6f 77 2c 20 61 6e | 64 20 70 6f 69 6e 74 20 | now, an|d point |
|00005470| 77 68 65 72 65 20 74 68 | 65 20 6d 61 72 6b 20 69 |where th|e mark i|
|00005480| 73 20 6e 6f 77 2e 22 20 | 28 69 6e 74 65 72 61 63 |s now." |(interac|
|00005490| 74 69 76 65 20 6e 69 6c | 29 20 28 62 79 74 65 2d |tive nil|) (byte-|
|000054a0| 63 6f 64 65 20 22 c0 88 | c2 20 19 09 3f 85 0d 00 |code "..|. ..?...|
|000054b0| c3 c4 21 88 c5 60 21 88 | 09 62 88 c0 29 87 22 20 |..!..`!.|.b..)." |
|000054c0| 5b 6e 69 6c 20 6f 6d 61 | 72 6b 20 6d 61 72 6b 20 |[nil oma|rk mark |
|000054d0| 65 72 72 6f 72 20 22 4e | 6f 20 6d 61 72 6b 20 73 |error "N|o mark s|
|000054e0| 65 74 20 69 6e 20 74 68 | 69 73 20 62 75 66 66 65 |et in th|is buffe|
|000054f0| 72 22 20 73 65 74 2d 6d | 61 72 6b 5d 20 34 29 29 |r" set-m|ark] 4))|
|00005500| 0a 0a 28 64 65 66 75 6e | 20 6e 65 78 74 2d 6c 69 |..(defun| next-li|
|00005510| 6e 65 20 28 61 72 67 29 | 20 22 5c 0a 4d 6f 76 65 |ne (arg)| "\.Move|
|00005520| 20 63 75 72 73 6f 72 20 | 76 65 72 74 69 63 61 6c | cursor |vertical|
|00005530| 6c 79 20 64 6f 77 6e 20 | 41 52 47 20 6c 69 6e 65 |ly down |ARG line|
|00005540| 73 2e 0a 49 66 20 74 68 | 65 72 65 20 69 73 20 6e |s..If th|ere is n|
|00005550| 6f 20 63 68 61 72 61 63 | 74 65 72 20 69 6e 20 74 |o charac|ter in t|
|00005560| 68 65 20 74 61 72 67 65 | 74 20 6c 69 6e 65 20 65 |he targe|t line e|
|00005570| 78 61 63 74 6c 79 20 75 | 6e 64 65 72 20 74 68 65 |xactly u|nder the|
|00005580| 20 63 75 72 72 65 6e 74 | 20 63 6f 6c 75 6d 6e 2c | current| column,|
|00005590| 0a 74 68 65 20 63 75 72 | 73 6f 72 20 69 73 20 70 |.the cur|sor is p|
|000055a0| 6f 73 69 74 69 6f 6e 65 | 64 20 61 66 74 65 72 20 |ositione|d after |
|000055b0| 74 68 65 20 63 68 61 72 | 61 63 74 65 72 20 69 6e |the char|acter in|
|000055c0| 20 74 68 61 74 20 6c 69 | 6e 65 20 77 68 69 63 68 | that li|ne which|
|000055d0| 20 73 70 61 6e 73 20 74 | 68 69 73 0a 63 6f 6c 75 | spans t|his.colu|
|000055e0| 6d 6e 2c 20 6f 72 20 61 | 74 20 74 68 65 20 65 6e |mn, or a|t the en|
|000055f0| 64 20 6f 66 20 74 68 65 | 20 6c 69 6e 65 20 69 66 |d of the| line if|
|00005600| 20 69 74 20 69 73 20 6e | 6f 74 20 6c 6f 6e 67 20 | it is n|ot long |
|00005610| 65 6e 6f 75 67 68 2e 0a | 49 66 20 74 68 65 72 65 |enough..|If there|
|00005620| 20 69 73 20 6e 6f 20 6c | 69 6e 65 20 69 6e 20 74 | is no l|ine in t|
|00005630| 68 65 20 62 75 66 66 65 | 72 20 61 66 74 65 72 20 |he buffe|r after |
|00005640| 74 68 69 73 20 6f 6e 65 | 2c 0a 61 20 6e 65 77 6c |this one|,.a newl|
|00005650| 69 6e 65 20 63 68 61 72 | 61 63 74 65 72 20 69 73 |ine char|acter is|
|00005660| 20 69 6e 73 65 72 74 65 | 64 20 74 6f 20 63 72 65 | inserte|d to cre|
|00005670| 61 74 65 20 61 20 6c 69 | 6e 65 0a 61 6e 64 20 74 |ate a li|ne.and t|
|00005680| 68 65 20 63 75 72 73 6f | 72 20 6d 6f 76 65 73 20 |he curso|r moves |
|00005690| 74 6f 20 74 68 61 74 20 | 6c 69 6e 65 2e 0a 0a 54 |to that |line...T|
|000056a0| 68 65 20 63 6f 6d 6d 61 | 6e 64 20 5c 5c 5b 73 65 |he comma|nd \\[se|
|000056b0| 74 2d 67 6f 61 6c 2d 63 | 6f 6c 75 6d 6e 5d 20 63 |t-goal-c|olumn] c|
|000056c0| 61 6e 20 62 65 20 75 73 | 65 64 20 74 6f 20 63 72 |an be us|ed to cr|
|000056d0| 65 61 74 65 0a 61 20 73 | 65 6d 69 70 65 72 6d 61 |eate.a s|emiperma|
|000056e0| 6e 65 6e 74 20 67 6f 61 | 6c 20 63 6f 6c 75 6d 6e |nent goa|l column|
|000056f0| 20 74 6f 20 77 68 69 63 | 68 20 74 68 69 73 20 63 | to whic|h this c|
|00005700| 6f 6d 6d 61 6e 64 20 61 | 6c 77 61 79 73 20 6d 6f |ommand a|lways mo|
|00005710| 76 65 73 2e 0a 54 68 65 | 6e 20 69 74 20 64 6f 65 |ves..The|n it doe|
|00005720| 73 20 6e 6f 74 20 74 72 | 79 20 74 6f 20 6d 6f 76 |s not tr|y to mov|
|00005730| 65 20 76 65 72 74 69 63 | 61 6c 6c 79 2e 0a 0a 49 |e vertic|ally...I|
|00005740| 66 20 79 6f 75 20 61 72 | 65 20 74 68 69 6e 6b 69 |f you ar|e thinki|
|00005750| 6e 67 20 6f 66 20 75 73 | 69 6e 67 20 74 68 69 73 |ng of us|ing this|
|00005760| 20 69 6e 20 61 20 4c 69 | 73 70 20 70 72 6f 67 72 | in a Li|sp progr|
|00005770| 61 6d 2c 20 63 6f 6e 73 | 69 64 65 72 0a 75 73 69 |am, cons|ider.usi|
|00005780| 6e 67 20 60 66 6f 72 77 | 61 72 64 2d 6c 69 6e 65 |ng `forw|ard-line|
|00005790| 27 20 69 6e 73 74 65 61 | 64 2e 20 20 49 74 20 69 |' instea|d. It i|
|000057a0| 73 20 75 73 75 61 6c 6c | 79 20 65 61 73 69 65 72 |s usuall|y easier|
|000057b0| 20 74 6f 20 75 73 65 0a | 61 6e 64 20 6d 6f 72 65 | to use.|and more|
|000057c0| 20 72 65 6c 69 61 62 6c | 65 20 28 6e 6f 20 64 65 | reliabl|e (no de|
|000057d0| 70 65 6e 64 65 6e 63 65 | 20 6f 6e 20 67 6f 61 6c |pendence| on goal|
|000057e0| 20 63 6f 6c 75 6d 6e 2c | 20 65 74 63 2e 29 2e 22 | column,| etc.)."|
|000057f0| 20 28 69 6e 74 65 72 61 | 63 74 69 76 65 20 22 70 | (intera|ctive "p|
|00005800| 22 29 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 c2 |") (byte|-code ".|
|00005810| 88 08 c3 55 83 2a 00 60 | 19 c4 c3 21 88 09 60 55 |...U.*.`|...!..`U|
|00005820| 86 18 00 68 c5 3d 3f 83 | 20 00 c5 63 82 26 00 09 |...h.=?.| ..c.&..|
|00005830| 62 88 c6 08 21 29 82 2d | 00 c6 08 21 88 c2 87 22 |b...!).-|...!..."|
|00005840| 20 5b 61 72 67 20 6f 70 | 6f 69 6e 74 20 6e 69 6c | [arg op|oint nil|
|00005850| 20 31 20 66 6f 72 77 61 | 72 64 2d 6c 69 6e 65 20 | 1 forwa|rd-line |
|00005860| 31 30 20 6e 65 78 74 2d | 6c 69 6e 65 2d 69 6e 74 |10 next-|line-int|
|00005870| 65 72 6e 61 6c 5d 20 34 | 29 29 0a 0a 28 64 65 66 |ernal] 4|))..(def|
|00005880| 75 6e 20 70 72 65 76 69 | 6f 75 73 2d 6c 69 6e 65 |un previ|ous-line|
|00005890| 20 28 61 72 67 29 20 22 | 5c 0a 4d 6f 76 65 20 63 | (arg) "|\.Move c|
|000058a0| 75 72 73 6f 72 20 76 65 | 72 74 69 63 61 6c 6c 79 |ursor ve|rtically|
|000058b0| 20 75 70 20 41 52 47 20 | 6c 69 6e 65 73 2e 0a 49 | up ARG |lines..I|
|000058c0| 66 20 74 68 65 72 65 20 | 69 73 20 6e 6f 20 63 68 |f there |is no ch|
|000058d0| 61 72 61 63 74 65 72 20 | 69 6e 20 74 68 65 20 74 |aracter |in the t|
|000058e0| 61 72 67 65 74 20 6c 69 | 6e 65 20 65 78 61 63 74 |arget li|ne exact|
|000058f0| 6c 79 20 6f 76 65 72 20 | 74 68 65 20 63 75 72 72 |ly over |the curr|
|00005900| 65 6e 74 20 63 6f 6c 75 | 6d 6e 2c 0a 74 68 65 20 |ent colu|mn,.the |
|00005910| 63 75 72 73 6f 72 20 69 | 73 20 70 6f 73 69 74 69 |cursor i|s positi|
|00005920| 6f 6e 65 64 20 61 66 74 | 65 72 20 74 68 65 20 63 |oned aft|er the c|
|00005930| 68 61 72 61 63 74 65 72 | 20 69 6e 20 74 68 61 74 |haracter| in that|
|00005940| 20 6c 69 6e 65 20 77 68 | 69 63 68 20 73 70 61 6e | line wh|ich span|
|00005950| 73 20 74 68 69 73 0a 63 | 6f 6c 75 6d 6e 2c 20 6f |s this.c|olumn, o|
|00005960| 72 20 61 74 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |r at the| end of |
|00005970| 74 68 65 20 6c 69 6e 65 | 20 69 66 20 69 74 20 69 |the line| if it i|
|00005980| 73 20 6e 6f 74 20 6c 6f | 6e 67 20 65 6e 6f 75 67 |s not lo|ng enoug|
|00005990| 68 2e 0a 0a 54 68 65 20 | 63 6f 6d 6d 61 6e 64 20 |h...The |command |
|000059a0| 5c 5c 5b 73 65 74 2d 67 | 6f 61 6c 2d 63 6f 6c 75 |\\[set-g|oal-colu|
|000059b0| 6d 6e 5d 20 63 61 6e 20 | 62 65 20 75 73 65 64 20 |mn] can |be used |
|000059c0| 74 6f 20 63 72 65 61 74 | 65 0a 61 20 73 65 6d 69 |to creat|e.a semi|
|000059d0| 70 65 72 6d 61 6e 65 6e | 74 20 67 6f 61 6c 20 63 |permanen|t goal c|
|000059e0| 6f 6c 75 6d 6e 20 74 6f | 20 77 68 69 63 68 20 74 |olumn to| which t|
|000059f0| 68 69 73 20 63 6f 6d 6d | 61 6e 64 20 61 6c 77 61 |his comm|and alwa|
|00005a00| 79 73 20 6d 6f 76 65 73 | 2e 0a 54 68 65 6e 20 69 |ys moves|..Then i|
|00005a10| 74 20 64 6f 65 73 20 6e | 6f 74 20 74 72 79 20 74 |t does n|ot try t|
|00005a20| 6f 20 6d 6f 76 65 20 76 | 65 72 74 69 63 61 6c 6c |o move v|erticall|
|00005a30| 79 2e 0a 0a 49 66 20 79 | 6f 75 20 61 72 65 20 74 |y...If y|ou are t|
|00005a40| 68 69 6e 6b 69 6e 67 20 | 6f 66 20 75 73 69 6e 67 |hinking |of using|
|00005a50| 20 74 68 69 73 20 69 6e | 20 61 20 4c 69 73 70 20 | this in| a Lisp |
|00005a60| 70 72 6f 67 72 61 6d 2c | 20 63 6f 6e 73 69 64 65 |program,| conside|
|00005a70| 72 20 75 73 69 6e 67 0a | 60 66 6f 72 77 61 72 64 |r using.|`forward|
|00005a80| 2d 6c 69 6e 65 27 20 77 | 69 74 68 20 6e 65 67 61 |-line' w|ith nega|
|00005a90| 74 69 76 65 20 61 72 67 | 75 6d 65 6e 74 20 69 6e |tive arg|ument in|
|00005aa0| 73 74 65 61 64 2e 2e 20 | 20 49 74 20 69 73 20 75 |stead.. | It is u|
|00005ab0| 73 75 61 6c 6c 79 20 65 | 61 73 69 65 72 0a 74 6f |sually e|asier.to|
|00005ac0| 20 75 73 65 20 61 6e 64 | 20 6d 6f 72 65 20 72 65 | use and| more re|
|00005ad0| 6c 69 61 62 6c 65 20 28 | 6e 6f 20 64 65 70 65 6e |liable (|no depen|
|00005ae0| 64 65 6e 63 65 20 6f 6e | 20 67 6f 61 6c 20 63 6f |dence on| goal co|
|00005af0| 6c 75 6d 6e 2c 20 65 74 | 63 2e 29 2e 22 20 28 69 |lumn, et|c.)." (i|
|00005b00| 6e 74 65 72 61 63 74 69 | 76 65 20 22 70 22 29 20 |nteracti|ve "p") |
|00005b10| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c1 88 c2 08 |(byte-co|de "....|
|00005b20| 5b 21 88 c1 87 22 20 5b | 61 72 67 20 6e 69 6c 20 |[!..." [|arg nil |
|00005b30| 6e 65 78 74 2d 6c 69 6e | 65 2d 69 6e 74 65 72 6e |next-lin|e-intern|
|00005b40| 61 6c 5d 20 32 29 29 0a | 0a 28 64 65 66 63 6f 6e |al] 2)).|.(defcon|
|00005b50| 73 74 20 74 72 61 63 6b | 2d 65 6f 6c 20 6e 69 6c |st track|-eol nil|
|00005b60| 20 22 5c 0a 2a 4e 6f 6e | 2d 6e 69 6c 20 6d 65 61 | "\.*Non|-nil mea|
|00005b70| 6e 73 20 76 65 72 74 69 | 63 61 6c 20 6d 6f 74 69 |ns verti|cal moti|
|00005b80| 6f 6e 20 73 74 61 72 74 | 69 6e 67 20 61 74 20 74 |on start|ing at t|
|00005b90| 68 65 20 65 6e 64 20 6f | 66 20 61 20 6c 69 6e 65 |he end o|f a line|
|00005ba0| 20 73 68 6f 75 6c 64 20 | 6b 65 65 70 20 74 6f 20 | should |keep to |
|00005bb0| 65 6e 64 73 20 6f 66 20 | 6c 69 6e 65 73 2e 0a 54 |ends of |lines..T|
|00005bc0| 68 69 73 20 6d 65 61 6e | 73 20 6d 6f 76 69 6e 67 |his mean|s moving|
|00005bd0| 20 74 6f 20 74 68 65 20 | 65 6e 64 20 6f 66 20 65 | to the |end of e|
|00005be0| 61 63 68 20 6c 69 6e 65 | 20 6d 6f 76 65 64 20 6f |ach line| moved o|
|00005bf0| 6e 74 6f 2e 22 29 0a 0a | 28 64 65 66 76 61 72 20 |nto.")..|(defvar |
|00005c00| 67 6f 61 6c 2d 63 6f 6c | 75 6d 6e 20 6e 69 6c 20 |goal-col|umn nil |
|00005c10| 22 5c 0a 2a 53 65 6d 69 | 70 65 72 6d 61 6e 65 6e |"\.*Semi|permanen|
|00005c20| 74 20 67 6f 61 6c 20 63 | 6f 6c 75 6d 6e 20 66 6f |t goal c|olumn fo|
|00005c30| 72 20 76 65 72 74 69 63 | 61 6c 20 6d 6f 74 69 6f |r vertic|al motio|
|00005c40| 6e 2c 20 61 73 20 73 65 | 74 20 62 79 20 5c 5c 5b |n, as se|t by \\[|
|00005c50| 73 65 74 2d 67 6f 61 6c | 2d 63 6f 6c 75 6d 6e 5d |set-goal|-column]|
|00005c60| 2c 20 6f 72 20 6e 69 6c | 2e 22 29 0a 0a 28 64 65 |, or nil|.")..(de|
|00005c70| 66 76 61 72 20 74 65 6d | 70 6f 72 61 72 79 2d 67 |fvar tem|porary-g|
|00005c80| 6f 61 6c 2d 63 6f 6c 75 | 6d 6e 20 30 20 22 5c 0a |oal-colu|mn 0 "\.|
|00005c90| 43 75 72 72 65 6e 74 20 | 67 6f 61 6c 20 63 6f 6c |Current |goal col|
|00005ca0| 75 6d 6e 20 66 6f 72 20 | 76 65 72 74 69 63 61 6c |umn for |vertical|
|00005cb0| 20 6d 6f 74 69 6f 6e 2e | 0a 49 74 20 69 73 20 74 | motion.|.It is t|
|00005cc0| 68 65 20 63 6f 6c 75 6d | 6e 20 77 68 65 72 65 20 |he colum|n where |
|00005cd0| 70 6f 69 6e 74 20 77 61 | 73 20 61 74 20 74 68 65 |point wa|s at the|
|00005ce0| 20 73 74 61 72 74 20 6f | 66 20 63 75 72 72 65 6e | start o|f curren|
|00005cf0| 74 20 72 75 6e 20 6f 66 | 20 76 65 72 74 69 63 61 |t run of| vertica|
|00005d00| 6c 20 6d 6f 74 69 6f 6e | 20 63 6f 6d 6d 61 6e 64 |l motion| command|
|00005d10| 73 2e 22 29 0a 0a 28 64 | 65 66 75 6e 20 6e 65 78 |s.")..(d|efun nex|
|00005d20| 74 2d 6c 69 6e 65 2d 69 | 6e 74 65 72 6e 61 6c 20 |t-line-i|nternal |
|00005d30| 28 61 72 67 29 20 28 62 | 79 74 65 2d 63 6f 64 65 |(arg) (b|yte-code|
|00005d40| 20 22 08 c8 3d 86 09 00 | 08 c9 3d 3f 85 1c 00 0a | "..=...|..=?....|
|00005d50| 85 12 00 6c 83 19 00 c3 | 82 1a 00 69 89 11 88 ca |...l....|...i....|
|00005d60| 0c 21 3f 83 2a 00 cb 0d | 21 82 5a 00 0d cc 56 85 |.!?.*...|!.Z...V.|
|00005d70| 44 00 cd ce 21 88 cf d0 | 21 88 cb ce 21 88 0d 53 |D...!...|!...!..S|
|00005d80| 89 15 88 82 2a 00 88 0d | cc 57 85 5a 00 cd d0 21 |....*...|.W.Z...!|
|00005d90| 88 d1 20 88 0d 54 89 15 | 88 82 45 00 88 0e 06 86 |.. ..T..|..E.....|
|00005da0| 61 00 09 c3 3d 83 6b 00 | d2 20 82 73 00 d3 0e 06 |a...=.k.|. .s....|
|00005db0| 86 72 00 09 21 88 c7 87 | 22 20 5b 6c 61 73 74 2d |.r..!...|" [last-|
|00005dc0| 63 6f 6d 6d 61 6e 64 20 | 74 65 6d 70 6f 72 61 72 |command |temporar|
|00005dd0| 79 2d 67 6f 61 6c 2d 63 | 6f 6c 75 6d 6e 20 74 72 |y-goal-c|olumn tr|
|00005de0| 61 63 6b 2d 65 6f 6c 20 | 74 20 73 65 6c 65 63 74 |ack-eol |t select|
|00005df0| 69 76 65 2d 64 69 73 70 | 6c 61 79 20 61 72 67 20 |ive-disp|lay arg |
|00005e00| 67 6f 61 6c 2d 63 6f 6c | 75 6d 6e 20 6e 69 6c 20 |goal-col|umn nil |
|00005e10| 6e 65 78 74 2d 6c 69 6e | 65 20 70 72 65 76 69 6f |next-lin|e previo|
|00005e20| 75 73 2d 6c 69 6e 65 20 | 69 6e 74 65 67 65 72 70 |us-line |integerp|
|00005e30| 20 66 6f 72 77 61 72 64 | 2d 6c 69 6e 65 20 30 20 | forward|-line 0 |
|00005e40| 76 65 72 74 69 63 61 6c | 2d 6d 6f 74 69 6f 6e 20 |vertical|-motion |
|00005e50| 31 20 66 6f 72 77 61 72 | 64 2d 63 68 61 72 20 2d |1 forwar|d-char -|
|00005e60| 31 20 62 65 67 69 6e 6e | 69 6e 67 2d 6f 66 2d 6c |1 beginn|ing-of-l|
|00005e70| 69 6e 65 20 65 6e 64 2d | 6f 66 2d 6c 69 6e 65 20 |ine end-|of-line |
|00005e80| 6d 6f 76 65 2d 74 6f 2d | 63 6f 6c 75 6d 6e 5d 20 |move-to-|column] |
|00005e90| 31 30 29 29 0a 0a 28 64 | 65 66 75 6e 20 73 65 74 |10))..(d|efun set|
|00005ea0| 2d 67 6f 61 6c 2d 63 6f | 6c 75 6d 6e 20 28 61 72 |-goal-co|lumn (ar|
|00005eb0| 67 29 20 22 5c 0a 53 65 | 74 20 74 68 65 20 63 75 |g) "\.Se|t the cu|
|00005ec0| 72 72 65 6e 74 20 68 6f | 72 69 7a 6f 6e 74 61 6c |rrent ho|rizontal|
|00005ed0| 20 70 6f 73 69 74 69 6f | 6e 20 61 73 20 61 20 67 | positio|n as a g|
|00005ee0| 6f 61 6c 20 66 6f 72 20 | 5c 5c 5b 6e 65 78 74 2d |oal for |\\[next-|
|00005ef0| 6c 69 6e 65 5d 20 61 6e | 64 20 5c 5c 5b 70 72 65 |line] an|d \\[pre|
|00005f00| 76 69 6f 75 73 2d 6c 69 | 6e 65 5d 2e 0a 54 68 6f |vious-li|ne]..Tho|
|00005f10| 73 65 20 63 6f 6d 6d 61 | 6e 64 73 20 77 69 6c 6c |se comma|nds will|
|00005f20| 20 6d 6f 76 65 20 74 6f | 20 74 68 69 73 20 70 6f | move to| this po|
|00005f30| 73 69 74 69 6f 6e 20 69 | 6e 20 74 68 65 20 6c 69 |sition i|n the li|
|00005f40| 6e 65 20 6d 6f 76 65 64 | 20 74 6f 0a 72 61 74 68 |ne moved| to.rath|
|00005f50| 65 72 20 74 68 61 6e 20 | 74 72 79 69 6e 67 20 74 |er than |trying t|
|00005f60| 6f 20 6b 65 65 70 20 74 | 68 65 20 73 61 6d 65 20 |o keep t|he same |
|00005f70| 68 6f 72 69 7a 6f 6e 74 | 61 6c 20 70 6f 73 69 74 |horizont|al posit|
|00005f80| 69 6f 6e 2e 0a 57 69 74 | 68 20 61 20 6e 6f 6e 2d |ion..Wit|h a non-|
|00005f90| 6e 69 6c 20 61 72 67 75 | 6d 65 6e 74 2c 20 63 6c |nil argu|ment, cl|
|00005fa0| 65 61 72 73 20 6f 75 74 | 20 74 68 65 20 67 6f 61 |ears out| the goa|
|00005fb0| 6c 20 63 6f 6c 75 6d 6e | 0a 73 6f 20 74 68 61 74 |l column|.so that|
|00005fc0| 20 5c 5c 5b 6e 65 78 74 | 2d 6c 69 6e 65 5d 20 61 | \\[next|-line] a|
|00005fd0| 6e 64 20 5c 5c 5b 70 72 | 65 76 69 6f 75 73 2d 6c |nd \\[pr|evious-l|
|00005fe0| 69 6e 65 5d 20 72 65 73 | 75 6d 65 20 76 65 72 74 |ine] res|ume vert|
|00005ff0| 69 63 61 6c 20 6d 6f 74 | 69 6f 6e 2e 22 20 28 69 |ical mot|ion." (i|
|00006000| 6e 74 65 72 61 63 74 69 | 76 65 20 22 50 22 29 20 |nteracti|ve "P") |
|00006010| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c2 88 08 83 |(byte-co|de "....|
|00006020| 10 00 c2 89 11 88 c3 c4 | 21 82 1a 00 69 89 11 88 |........|!...i...|
|00006030| c3 c5 c6 21 09 5c 22 88 | c2 87 22 20 5b 61 72 67 |...!.\".|.." [arg|
|00006040| 20 67 6f 61 6c 2d 63 6f | 6c 75 6d 6e 20 6e 69 6c | goal-co|lumn nil|
|00006050| 20 6d 65 73 73 61 67 65 | 20 22 4e 6f 20 67 6f 61 | message| "No goa|
|00006060| 6c 20 63 6f 6c 75 6d 6e | 22 20 73 75 62 73 74 69 |l column|" substi|
|00006070| 74 75 74 65 2d 63 6f 6d | 6d 61 6e 64 2d 6b 65 79 |tute-com|mand-key|
|00006080| 73 20 22 47 6f 61 6c 20 | 63 6f 6c 75 6d 6e 20 25 |s "Goal |column %|
|00006090| 64 20 28 75 73 65 20 5c | 5c 5b 73 65 74 2d 67 6f |d (use \|\[set-go|
|000060a0| 61 6c 2d 63 6f 6c 75 6d | 6e 5d 20 77 69 74 68 20 |al-colum|n] with |
|000060b0| 61 6e 20 61 72 67 20 74 | 6f 20 75 6e 73 65 74 20 |an arg t|o unset |
|000060c0| 69 74 29 22 5d 20 35 29 | 29 0a 0a 28 64 65 66 75 |it)"] 5)|)..(defu|
|000060d0| 6e 20 74 72 61 6e 73 70 | 6f 73 65 2d 63 68 61 72 |n transp|ose-char|
|000060e0| 73 20 28 61 72 67 29 20 | 22 5c 0a 49 6e 74 65 72 |s (arg) |"\.Inter|
|000060f0| 63 68 61 6e 67 65 20 63 | 68 61 72 61 63 74 65 72 |change c|haracter|
|00006100| 73 20 61 72 6f 75 6e 64 | 20 70 6f 69 6e 74 2c 20 |s around| point, |
|00006110| 6d 6f 76 69 6e 67 20 66 | 6f 72 77 61 72 64 20 6f |moving f|orward o|
|00006120| 6e 65 20 63 68 61 72 61 | 63 74 65 72 2e 0a 57 69 |ne chara|cter..Wi|
|00006130| 74 68 20 70 72 65 66 69 | 78 20 61 72 67 20 41 52 |th prefi|x arg AR|
|00006140| 47 2c 20 65 66 66 65 63 | 74 20 69 73 20 74 6f 20 |G, effec|t is to |
|00006150| 74 61 6b 65 20 63 68 61 | 72 61 63 74 65 72 20 62 |take cha|racter b|
|00006160| 65 66 6f 72 65 20 70 6f | 69 6e 74 0a 61 6e 64 20 |efore po|int.and |
|00006170| 64 72 61 67 20 69 74 20 | 66 6f 72 77 61 72 64 20 |drag it |forward |
|00006180| 70 61 73 74 20 41 52 47 | 20 6f 74 68 65 72 20 63 |past ARG| other c|
|00006190| 68 61 72 61 63 74 65 72 | 73 20 28 62 61 63 6b 77 |haracter|s (backw|
|000061a0| 61 72 64 20 69 66 20 41 | 52 47 20 6e 65 67 61 74 |ard if A|RG negat|
|000061b0| 69 76 65 29 2e 0a 49 66 | 20 6e 6f 20 61 72 67 75 |ive)..If| no argu|
|000061c0| 6d 65 6e 74 20 61 6e 64 | 20 61 74 20 65 6e 64 20 |ment and| at end |
|000061d0| 6f 66 20 6c 69 6e 65 2c | 20 74 68 65 20 70 72 65 |of line,| the pre|
|000061e0| 76 69 6f 75 73 20 74 77 | 6f 20 63 68 61 72 73 20 |vious tw|o chars |
|000061f0| 61 72 65 20 65 78 63 68 | 61 6e 67 65 64 2e 22 20 |are exch|anged." |
|00006200| 28 69 6e 74 65 72 61 63 | 74 69 76 65 20 22 2a 50 |(interac|tive "*P|
|00006210| 22 29 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 c1 |") (byte|-code ".|
|00006220| 88 08 3f 85 0e 00 6c 85 | 0e 00 c2 c3 21 88 c4 c2 |..?...l.|....!...|
|00006230| c5 08 21 5c 22 87 22 20 | 5b 61 72 67 20 6e 69 6c |..!\"." |[arg nil|
|00006240| 20 66 6f 72 77 61 72 64 | 2d 63 68 61 72 20 2d 31 | forward|-char -1|
|00006250| 20 74 72 61 6e 73 70 6f | 73 65 2d 73 75 62 72 20 | transpo|se-subr |
|00006260| 70 72 65 66 69 78 2d 6e | 75 6d 65 72 69 63 2d 76 |prefix-n|umeric-v|
|00006270| 61 6c 75 65 5d 20 35 29 | 29 0a 0a 28 64 65 66 75 |alue] 5)|)..(defu|
|00006280| 6e 20 74 72 61 6e 73 70 | 6f 73 65 2d 77 6f 72 64 |n transp|ose-word|
|00006290| 73 20 28 61 72 67 29 20 | 22 5c 0a 49 6e 74 65 72 |s (arg) |"\.Inter|
|000062a0| 63 68 61 6e 67 65 20 77 | 6f 72 64 73 20 61 72 6f |change w|ords aro|
|000062b0| 75 6e 64 20 70 6f 69 6e | 74 2c 20 6c 65 61 76 69 |und poin|t, leavi|
|000062c0| 6e 67 20 70 6f 69 6e 74 | 20 61 74 20 65 6e 64 20 |ng point| at end |
|000062d0| 6f 66 20 74 68 65 6d 2e | 0a 57 69 74 68 20 70 72 |of them.|.With pr|
|000062e0| 65 66 69 78 20 61 72 67 | 20 41 52 47 2c 20 65 66 |efix arg| ARG, ef|
|000062f0| 66 65 63 74 20 69 73 20 | 74 6f 20 74 61 6b 65 20 |fect is |to take |
|00006300| 77 6f 72 64 20 62 65 66 | 6f 72 65 20 6f 72 20 61 |word bef|ore or a|
|00006310| 72 6f 75 6e 64 20 70 6f | 69 6e 74 0a 61 6e 64 20 |round po|int.and |
|00006320| 64 72 61 67 20 69 74 20 | 66 6f 72 77 61 72 64 20 |drag it |forward |
|00006330| 70 61 73 74 20 41 52 47 | 20 6f 74 68 65 72 20 77 |past ARG| other w|
|00006340| 6f 72 64 73 20 28 62 61 | 63 6b 77 61 72 64 20 69 |ords (ba|ckward i|
|00006350| 66 20 41 52 47 20 6e 65 | 67 61 74 69 76 65 29 2e |f ARG ne|gative).|
|00006360| 0a 49 66 20 41 52 47 20 | 69 73 20 7a 65 72 6f 2c |.If ARG |is zero,|
|00006370| 20 74 68 65 20 77 6f 72 | 64 73 20 61 72 6f 75 6e | the wor|ds aroun|
|00006380| 64 20 6f 72 20 61 66 74 | 65 72 20 70 6f 69 6e 74 |d or aft|er point|
|00006390| 20 61 6e 64 20 61 72 6f | 75 6e 64 20 6f 72 20 61 | and aro|und or a|
|000063a0| 66 74 65 72 20 6d 61 72 | 6b 0a 61 72 65 20 69 6e |fter mar|k.are in|
|000063b0| 74 65 72 63 68 61 6e 67 | 65 64 2e 22 20 28 69 6e |terchang|ed." (in|
|000063c0| 74 65 72 61 63 74 69 76 | 65 20 22 2a 70 22 29 20 |teractiv|e "*p") |
|000063d0| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c1 88 c2 c3 |(byte-co|de "....|
|000063e0| 08 5c 22 87 22 20 5b 61 | 72 67 20 6e 69 6c 20 74 |.\"." [a|rg nil t|
|000063f0| 72 61 6e 73 70 6f 73 65 | 2d 73 75 62 72 20 66 6f |ranspose|-subr fo|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.