home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer) / NeXT_Developer-3.3.iso / NextDeveloper / Source / GNU / emacs / lisp / simple.elc < prev    next >
Unknown  |  1992-04-15  |  36.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) ext Unsupported
100% file data default
100% gt2 Kopftext: ';;; compiled by jimb' default (weak)
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 3b 3b 20 63 6f 6d 70 | 69 6c 65 64 20 62 79 20 |;;; comp|iled by |
|00000010| 6a 69 6d 62 40 77 6f 6f | 6b 75 6d 7a 2e 67 6e 75 |jimb@woo|kumz.gnu|
|00000020| 2e 61 69 2e 6d 69 74 2e | 65 64 75 20 6f 6e 20 57 |.ai.mit.|edu on W|
|00000030| 65 64 20 41 70 72 20 31 | 35 20 30 34 3a 31 35 3a |ed Apr 1|5 04:15:|
|00000040| 34 33 20 31 39 39 32 0a | 3b 3b 3b 20 66 72 6f 6d |43 1992.|;;; from|
|00000050| 20 66 69 6c 65 20 2f 67 | 64 2f 67 6e 75 2f 65 6d | file /g|d/gnu/em|
|00000060| 61 63 73 2f 65 6d 61 63 | 73 2d 31 38 2e 35 38 2f |acs/emac|s-18.58/|
|00000070| 6c 69 73 70 2f 73 69 6d | 70 6c 65 2e 65 6c 0a 3b |lisp/sim|ple.el.;|
|00000080| 3b 3b 20 65 6d 61 63 73 | 20 76 65 72 73 69 6f 6e |;; emacs| version|
|00000090| 20 31 38 2e 35 38 2e 31 | 2e 0a 3b 3b 3b 20 62 79 | 18.58.1|..;;; by|
|000000a0| 74 65 63 6f 6d 70 20 76 | 65 72 73 69 6f 6e 20 32 |tecomp v|ersion 2|
|000000b0| 2e 30 31 20 62 65 74 61 | 3b 20 31 33 2d 61 75 67 |.01 beta|; 13-aug|
|000000c0| 2d 39 31 2e 0a 3b 3b 3b | 20 6f 70 74 69 6d 69 7a |-91..;;;| optimiz|
|000000d0| 61 74 69 6f 6e 20 69 73 | 20 6f 6e 3b 20 63 6f 6d |ation is| on; com|
|000000e0| 70 69 6c 65 64 20 77 69 | 74 68 20 65 6d 61 63 73 |piled wi|th emacs|
|000000f0| 31 38 20 63 6f 6d 70 61 | 74 69 62 69 6c 69 74 79 |18 compa|tibility|
|00000100| 2e 0a 0a 28 64 65 66 75 | 6e 20 6f 70 65 6e 2d 6c |...(defu|n open-l|
|00000110| 69 6e 65 20 28 61 72 67 | 29 20 22 5c 0a 49 6e 73 |ine (arg|) "\.Ins|
|00000120| 65 72 74 20 61 20 6e 65 | 77 6c 69 6e 65 20 61 6e |ert a ne|wline an|
|00000130| 64 20 6c 65 61 76 65 20 | 70 6f 69 6e 74 20 62 65 |d leave |point be|
|00000140| 66 6f 72 65 20 69 74 2e | 0a 57 69 74 68 20 61 72 |fore it.|.With ar|
|00000150| 67 2c 20 69 6e 73 65 72 | 74 73 20 74 68 61 74 20 |g, inser|ts that |
|00000160| 6d 61 6e 79 20 6e 65 77 | 6c 69 6e 65 73 2e 22 20 |many new|lines." |
|00000170| 28 69 6e 74 65 72 61 63 | 74 69 76 65 20 22 2a 70 |(interac|tive "*p|
|00000180| 22 29 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 6e |") (byte|-code "n|
|00000190| 85 06 00 6f 3f 89 18 83 | 0f 00 c1 c2 21 88 0b c4 |...o?...|....!...|
|000001a0| 56 83 23 00 c5 63 88 60 | 53 62 88 0b 53 89 13 82 |V.#..c.`|Sb..S...|
|000001b0| 10 00 08 85 2a 00 c1 c6 | 21 29 87 22 20 5b 66 6c |....*...|!)." [fl|
|000001c0| 61 67 20 66 6f 72 77 61 | 72 64 2d 63 68 61 72 20 |ag forwa|rd-char |
|000001d0| 2d 31 20 61 72 67 20 30 | 20 31 30 20 31 5d 20 33 |-1 arg 0| 10 1] 3|
|000001e0| 29 29 0a 28 64 65 66 75 | 6e 20 73 70 6c 69 74 2d |)).(defu|n split-|
|000001f0| 6c 69 6e 65 20 6e 69 6c | 20 22 5c 0a 53 70 6c 69 |line nil| "\.Spli|
|00000200| 74 20 63 75 72 72 65 6e | 74 20 6c 69 6e 65 2c 20 |t curren|t line, |
|00000210| 6d 6f 76 69 6e 67 20 70 | 6f 72 74 69 6f 6e 20 62 |moving p|ortion b|
|00000220| 65 79 6f 6e 64 20 70 6f | 69 6e 74 20 76 65 72 74 |eyond po|int vert|
|00000230| 69 63 61 6c 6c 79 20 64 | 6f 77 6e 2e 22 20 28 69 |ically d|own." (i|
|00000240| 6e 74 65 72 61 63 74 69 | 76 65 20 22 2a 22 29 20 |nteracti|ve "*") |
|00000250| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c0 c1 21 88 |(byte-co|de "..!.|
|00000260| 69 60 1a 1b c4 63 88 c5 | 0b c6 5c 22 88 5c 6e 62 |i`...c..|..\".\nb|
|00000270| 2a 87 22 20 5b 73 6b 69 | 70 2d 63 68 61 72 73 2d |*." [ski|p-chars-|
|00000280| 66 6f 72 77 61 72 64 20 | 22 20 09 22 20 70 6f 73 |forward |" ." pos|
|00000290| 20 63 6f 6c 20 31 30 20 | 69 6e 64 65 6e 74 2d 74 | col 10 |indent-t|
|000002a0| 6f 20 30 5d 20 33 29 29 | 0a 28 64 65 66 75 6e 20 |o 0] 3))|.(defun |
|000002b0| 71 75 6f 74 65 64 2d 69 | 6e 73 65 72 74 20 28 61 |quoted-i|nsert (a|
|000002c0| 72 67 29 20 22 5c 0a 52 | 65 61 64 20 6e 65 78 74 |rg) "\.R|ead next|
|000002d0| 20 69 6e 70 75 74 20 63 | 68 61 72 61 63 74 65 72 | input c|haracter|
|000002e0| 20 61 6e 64 20 69 6e 73 | 65 72 74 20 69 74 2e 0a | and ins|ert it..|
|000002f0| 55 73 65 66 75 6c 20 66 | 6f 72 20 69 6e 73 65 72 |Useful f|or inser|
|00000300| 74 69 6e 67 20 63 6f 6e | 74 72 6f 6c 20 63 68 61 |ting con|trol cha|
|00000310| 72 61 63 74 65 72 73 2e | 0a 59 6f 75 20 6d 61 79 |racters.|.You may|
|00000320| 20 61 6c 73 6f 20 74 79 | 70 65 20 75 70 20 74 6f | also ty|pe up to|
|00000330| 20 33 20 6f 63 74 61 6c | 20 64 69 67 69 74 73 2c | 3 octal| digits,|
|00000340| 20 74 6f 20 69 6e 73 65 | 72 74 20 61 20 63 68 61 | to inse|rt a cha|
|00000350| 72 61 63 74 65 72 20 77 | 69 74 68 20 74 68 61 74 |racter w|ith that|
|00000360| 20 63 6f 64 65 22 20 28 | 69 6e 74 65 72 61 63 74 | code" (|interact|
|00000370| 69 76 65 20 22 2a 70 22 | 29 20 28 62 79 74 65 2d |ive "*p"|) (byte-|
|00000380| 63 6f 64 65 20 22 c0 20 | 19 5c 6e c3 56 85 13 00 |code ". |.\n.V...|
|00000390| 09 63 88 5c 6e 53 89 12 | 82 04 00 29 87 22 20 5b |.c.\nS..|...)." [|
|000003a0| 72 65 61 64 2d 71 75 6f | 74 65 64 2d 63 68 61 72 |read-quo|ted-char|
|000003b0| 20 63 68 61 72 20 61 72 | 67 20 30 5d 20 33 29 29 | char ar|g 0] 3))|
|000003c0| 0a 28 64 65 66 75 6e 20 | 64 65 6c 65 74 65 2d 69 |.(defun |delete-i|
|000003d0| 6e 64 65 6e 74 61 74 69 | 6f 6e 20 28 26 6f 70 74 |ndentati|on (&opt|
|000003e0| 69 6f 6e 61 6c 20 61 72 | 67 29 20 22 5c 0a 4a 6f |ional ar|g) "\.Jo|
|000003f0| 69 6e 20 74 68 69 73 20 | 6c 69 6e 65 20 74 6f 20 |in this |line to |
|00000400| 70 72 65 76 69 6f 75 73 | 20 61 6e 64 20 66 69 78 |previous| and fix|
|00000410| 20 75 70 20 77 68 69 74 | 65 73 70 61 63 65 20 61 | up whit|espace a|
|00000420| 74 20 6a 6f 69 6e 2e 0a | 57 69 74 68 20 61 72 67 |t join..|With arg|
|00000430| 75 6d 65 6e 74 2c 20 6a | 6f 69 6e 20 74 68 69 73 |ument, j|oin this|
|00000440| 20 6c 69 6e 65 20 74 6f | 20 66 6f 6c 6c 6f 77 69 | line to| followi|
|00000450| 6e 67 20 6c 69 6e 65 2e | 22 20 28 69 6e 74 65 72 |ng line.|" (inter|
|00000460| 61 63 74 69 76 65 20 22 | 2a 50 22 29 20 28 62 79 |active "|*P") (by|
|00000470| 74 65 2d 63 6f 64 65 20 | 22 c0 c1 21 88 5c 6e 83 |te-code |"..!.\n.|
|00000480| 0c 00 c0 c3 21 88 68 c4 | 3d 85 1a 00 c5 60 60 53 |....!.h.|=....``S|
|00000490| 5c 22 88 c6 20 87 22 20 | 5b 66 6f 72 77 61 72 64 |\".. ." |[forward|
|000004a0| 2d 6c 69 6e 65 20 30 20 | 61 72 67 20 31 20 31 30 |-line 0 |arg 1 10|
|000004b0| 20 64 65 6c 65 74 65 2d | 72 65 67 69 6f 6e 20 66 | delete-|region f|
|000004c0| 69 78 75 70 2d 77 68 69 | 74 65 73 70 61 63 65 5d |ixup-whi|tespace]|
|000004d0| 20 33 29 29 0a 28 64 65 | 66 75 6e 20 66 69 78 75 | 3)).(de|fun fixu|
|000004e0| 70 2d 77 68 69 74 65 73 | 70 61 63 65 20 6e 69 6c |p-whites|pace nil|
|000004f0| 20 22 5c 0a 46 69 78 75 | 70 20 77 68 69 74 65 20 | "\.Fixu|p white |
|00000500| 73 70 61 63 65 20 62 65 | 74 77 65 65 6e 20 6f 62 |space be|tween ob|
|00000510| 6a 65 63 74 73 20 61 72 | 6f 75 6e 64 20 70 6f 69 |jects ar|ound poi|
|00000520| 6e 74 2e 0a 4c 65 61 76 | 65 20 6f 6e 65 20 73 70 |nt..Leav|e one sp|
|00000530| 61 63 65 20 6f 72 20 6e | 6f 6e 65 2c 20 61 63 63 |ace or n|one, acc|
|00000540| 6f 72 64 69 6e 67 20 74 | 6f 20 74 68 65 20 63 6f |ording t|o the co|
|00000550| 6e 74 65 78 74 2e 22 20 | 28 69 6e 74 65 72 61 63 |ntext." |(interac|
|00000560| 74 69 76 65 20 22 2a 22 | 29 20 28 62 79 74 65 2d |tive "*"|) (byte-|
|00000570| 63 6f 64 65 20 22 8a c0 | 20 88 c1 c2 21 86 13 00 |code "..| ...!...|
|00000580| 8a c3 c4 21 88 c1 c5 21 | 29 3f 85 19 00 c6 63 29 |...!...!|)?....c)|
|00000590| 87 22 20 5b 64 65 6c 65 | 74 65 2d 68 6f 72 69 7a |." [dele|te-horiz|
|000005a0| 6f 6e 74 61 6c 2d 73 70 | 61 63 65 20 6c 6f 6f 6b |ontal-sp|ace look|
|000005b0| 69 6e 67 2d 61 74 20 22 | 5e 5c 5c 7c 5c 5c 73 29 |ing-at "|^\\|\\s)|
|000005c0| 5c 5c 7c 24 22 20 66 6f | 72 77 61 72 64 2d 63 68 |\\|$" fo|rward-ch|
|000005d0| 61 72 20 2d 31 20 22 5c | 5c 73 28 5c 5c 7c 5c 5c |ar -1 "\|\s(\\|\\|
|000005e0| 73 27 22 20 33 32 5d 20 | 32 29 29 0a 28 64 65 66 |s'" 32] |2)).(def|
|000005f0| 75 6e 20 64 65 6c 65 74 | 65 2d 68 6f 72 69 7a 6f |un delet|e-horizo|
|00000600| 6e 74 61 6c 2d 73 70 61 | 63 65 20 6e 69 6c 20 22 |ntal-spa|ce nil "|
|00000610| 5c 0a 44 65 6c 65 74 65 | 20 61 6c 6c 20 73 70 61 |\.Delete| all spa|
|00000620| 63 65 73 20 61 6e 64 20 | 74 61 62 73 20 61 72 6f |ces and |tabs aro|
|00000630| 75 6e 64 20 70 6f 69 6e | 74 2e 22 20 28 69 6e 74 |und poin|t." (int|
|00000640| 65 72 61 63 74 69 76 65 | 20 22 2a 22 29 20 28 62 |eractive| "*") (b|
|00000650| 79 74 65 2d 63 6f 64 65 | 20 22 c0 c1 21 88 c2 60 |yte-code| "..!..`|
|00000660| c3 c1 21 88 60 5c 22 87 | 22 20 5b 73 6b 69 70 2d |..!.`\".|" [skip-|
|00000670| 63 68 61 72 73 2d 62 61 | 63 6b 77 61 72 64 20 22 |chars-ba|ckward "|
|00000680| 20 09 22 20 64 65 6c 65 | 74 65 2d 72 65 67 69 6f | ." dele|te-regio|
|00000690| 6e 20 73 6b 69 70 2d 63 | 68 61 72 73 2d 66 6f 72 |n skip-c|hars-for|
|000006a0| 77 61 72 64 5d 20 34 29 | 29 0a 28 64 65 66 75 6e |ward] 4)|).(defun|
|000006b0| 20 6a 75 73 74 2d 6f 6e | 65 2d 73 70 61 63 65 20 | just-on|e-space |
|000006c0| 6e 69 6c 20 22 5c 0a 44 | 65 6c 65 74 65 20 61 6c |nil "\.D|elete al|
|000006d0| 6c 20 73 70 61 63 65 73 | 20 61 6e 64 20 74 61 62 |l spaces| and tab|
|000006e0| 73 20 61 72 6f 75 6e 64 | 20 70 6f 69 6e 74 2c 20 |s around| point, |
|000006f0| 6c 65 61 76 69 6e 67 20 | 6f 6e 65 20 73 70 61 63 |leaving |one spac|
|00000700| 65 2e 22 20 28 69 6e 74 | 65 72 61 63 74 69 76 65 |e." (int|eractive|
|00000710| 20 22 2a 22 29 20 28 62 | 79 74 65 2d 63 6f 64 65 | "*") (b|yte-code|
|00000720| 20 22 c0 c1 21 88 67 c2 | 55 83 11 00 c3 c4 21 88 | "..!.g.|U.....!.|
|00000730| 82 14 00 c2 63 88 c5 60 | c6 c1 21 88 60 5c 22 87 |....c..`|..!.`\".|
|00000740| 22 20 5b 73 6b 69 70 2d | 63 68 61 72 73 2d 62 61 |" [skip-|chars-ba|
|00000750| 63 6b 77 61 72 64 20 22 | 20 09 22 20 33 32 20 66 |ckward "| ." 32 f|
|00000760| 6f 72 77 61 72 64 2d 63 | 68 61 72 20 31 20 64 65 |orward-c|har 1 de|
|00000770| 6c 65 74 65 2d 72 65 67 | 69 6f 6e 20 73 6b 69 70 |lete-reg|ion skip|
|00000780| 2d 63 68 61 72 73 2d 66 | 6f 72 77 61 72 64 5d 20 |-chars-f|orward] |
|00000790| 34 29 29 0a 28 64 65 66 | 75 6e 20 64 65 6c 65 74 |4)).(def|un delet|
|000007a0| 65 2d 62 6c 61 6e 6b 2d | 6c 69 6e 65 73 20 6e 69 |e-blank-|lines ni|
|000007b0| 6c 20 22 5c 0a 4f 6e 20 | 62 6c 61 6e 6b 20 6c 69 |l "\.On |blank li|
|000007c0| 6e 65 2c 20 64 65 6c 65 | 74 65 20 61 6c 6c 20 73 |ne, dele|te all s|
|000007d0| 75 72 72 6f 75 6e 64 69 | 6e 67 20 62 6c 61 6e 6b |urroundi|ng blank|
|000007e0| 20 6c 69 6e 65 73 2c 20 | 6c 65 61 76 69 6e 67 20 | lines, |leaving |
|000007f0| 6a 75 73 74 20 6f 6e 65 | 2e 0a 4f 6e 20 69 73 6f |just one|..On iso|
|00000800| 6c 61 74 65 64 20 62 6c | 61 6e 6b 20 6c 69 6e 65 |lated bl|ank line|
|00000810| 2c 20 64 65 6c 65 74 65 | 20 74 68 61 74 20 6f 6e |, delete| that on|
|00000820| 65 2e 0a 4f 6e 20 6e 6f | 6e 62 6c 61 6e 6b 20 6c |e..On no|nblank l|
|00000830| 69 6e 65 2c 20 64 65 6c | 65 74 65 20 61 6c 6c 20 |ine, del|ete all |
|00000840| 62 6c 61 6e 6b 20 6c 69 | 6e 65 73 20 74 68 61 74 |blank li|nes that|
|00000850| 20 66 6f 6c 6c 6f 77 20 | 69 74 2e 22 20 28 69 6e | follow |it." (in|
|00000860| 74 65 72 61 63 74 69 76 | 65 20 22 2a 22 29 20 28 |teractiv|e "*") (|
|00000870| 62 79 74 65 2d 63 6f 64 | 65 20 22 c0 89 19 1a 8a |byte-cod|e ".....|
|00000880| c3 c4 21 88 c5 c6 21 89 | 12 85 24 00 c5 c7 21 3f |..!...!.|..$...!?|
|00000890| 85 24 00 6f 86 24 00 c3 | c8 21 88 c5 c6 21 3f 11 |.$.o.$..|.!...!?.|
|000008a0| 29 5c 6e 83 4b 00 c3 c4 | 21 88 09 83 36 00 c3 c9 |)\n.K...|!...6...|
|000008b0| 21 88 ca 60 cb cc c0 cd | 23 83 48 00 c3 c9 21 88 |!..`....|#.H...!.|
|000008c0| 60 82 49 00 65 5c 22 88 | 5c 6e 85 50 00 09 3f 85 |`.I.e\".|\n.P..?.|
|000008d0| 71 00 8a ce 20 88 c3 c9 | 21 88 ca 60 cf cc c0 cd |q... ...|!..`....|
|000008e0| 23 83 6e 00 c3 c4 21 88 | 60 82 6f 00 64 5c 22 29 |#.n...!.|`.o.d\")|
|000008f0| 2a 87 22 20 5b 6e 69 6c | 20 73 69 6e 67 6c 65 62 |*." [nil| singleb|
|00000900| 6c 61 6e 6b 20 74 68 69 | 73 62 6c 61 6e 6b 20 66 |lank thi|sblank f|
|00000910| 6f 72 77 61 72 64 2d 6c | 69 6e 65 20 30 20 6c 6f |orward-l|ine 0 lo|
|00000920| 6f 6b 69 6e 67 2d 61 74 | 20 22 5b 20 09 5d 2a 24 |oking-at| "[ .]*$|
|00000930| 22 20 22 5b 20 09 5d 2a | 5c 6e 5b 20 09 5d 2a 24 |" "[ .]*|\n[ .]*$|
|00000940| 22 20 2d 31 20 31 20 64 | 65 6c 65 74 65 2d 72 65 |" -1 1 d|elete-re|
|00000950| 67 69 6f 6e 20 72 65 2d | 73 65 61 72 63 68 2d 62 |gion re-|search-b|
|00000960| 61 63 6b 77 61 72 64 20 | 22 5b 5e 20 09 5c 6e 5d |ackward |"[^ .\n]|
|00000970| 22 20 74 20 65 6e 64 2d | 6f 66 2d 6c 69 6e 65 20 |" t end-|of-line |
|00000980| 72 65 2d 73 65 61 72 63 | 68 2d 66 6f 72 77 61 72 |re-searc|h-forwar|
|00000990| 64 5d 20 37 29 29 0a 28 | 64 65 66 75 6e 20 62 61 |d] 7)).(|defun ba|
|000009a0| 63 6b 2d 74 6f 2d 69 6e | 64 65 6e 74 61 74 69 6f |ck-to-in|dentatio|
|000009b0| 6e 20 6e 69 6c 20 22 5c | 0a 4d 6f 76 65 20 70 6f |n nil "\|.Move po|
|000009c0| 69 6e 74 20 74 6f 20 74 | 68 65 20 66 69 72 73 74 |int to t|he first|
|000009d0| 20 6e 6f 6e 2d 77 68 69 | 74 65 73 70 61 63 65 20 | non-whi|tespace |
|000009e0| 63 68 61 72 61 63 74 65 | 72 20 6f 6e 20 74 68 69 |characte|r on thi|
|000009f0| 73 20 6c 69 6e 65 2e 22 | 20 28 69 6e 74 65 72 61 |s line."| (intera|
|00000a00| 63 74 69 76 65 29 20 28 | 62 79 74 65 2d 63 6f 64 |ctive) (|byte-cod|
|00000a10| 65 20 22 c0 c1 21 88 c2 | c3 21 87 22 20 5b 66 6f |e "..!..|.!." [fo|
|00000a20| 72 77 61 72 64 2d 6c 69 | 6e 65 20 30 20 73 6b 69 |rward-li|ne 0 ski|
|00000a30| 70 2d 63 68 61 72 73 2d | 66 6f 72 77 61 72 64 20 |p-chars-|forward |
|00000a40| 22 20 09 22 5d 20 32 29 | 29 0a 28 64 65 66 75 6e |" ."] 2)|).(defun|
|00000a50| 20 6e 65 77 6c 69 6e 65 | 2d 61 6e 64 2d 69 6e 64 | newline|-and-ind|
|00000a60| 65 6e 74 20 6e 69 6c 20 | 22 5c 0a 49 6e 73 65 72 |ent nil |"\.Inser|
|00000a70| 74 20 61 20 6e 65 77 6c | 69 6e 65 2c 20 74 68 65 |t a newl|ine, the|
|00000a80| 6e 20 69 6e 64 65 6e 74 | 20 61 63 63 6f 72 64 69 |n indent| accordi|
|00000a90| 6e 67 20 74 6f 20 6d 61 | 6a 6f 72 20 6d 6f 64 65 |ng to ma|jor mode|
|00000aa0| 2e 0a 49 6e 64 65 6e 74 | 61 74 69 6f 6e 20 69 73 |..Indent|ation is|
|00000ab0| 20 64 6f 6e 65 20 75 73 | 69 6e 67 20 74 68 65 20 | done us|ing the |
|00000ac0| 63 75 72 72 65 6e 74 20 | 69 6e 64 65 6e 74 2d 6c |current |indent-l|
|00000ad0| 69 6e 65 2d 66 75 6e 63 | 74 69 6f 6e 2e 0a 49 6e |ine-func|tion..In|
|00000ae0| 20 70 72 6f 67 72 61 6d | 6d 69 6e 67 20 6c 61 6e | program|ming lan|
|00000af0| 67 75 61 67 65 20 6d 6f | 64 65 73 2c 20 74 68 69 |guage mo|des, thi|
|00000b00| 73 20 69 73 20 74 68 65 | 20 73 61 6d 65 20 61 73 |s is the| same as|
|00000b10| 20 54 41 42 2e 0a 49 6e | 20 73 6f 6d 65 20 74 65 | TAB..In| some te|
|00000b20| 78 74 20 6d 6f 64 65 73 | 2c 20 77 68 65 72 65 20 |xt modes|, where |
|00000b30| 54 41 42 20 69 6e 73 65 | 72 74 73 20 61 20 74 61 |TAB inse|rts a ta|
|00000b40| 62 2c 20 74 68 69 73 20 | 69 6e 64 65 6e 74 73 20 |b, this |indents |
|00000b50| 74 6f 20 74 68 65 0a 73 | 70 65 63 69 66 69 65 64 |to the.s|pecified|
|00000b60| 20 6c 65 66 74 2d 6d 61 | 72 67 69 6e 20 63 6f 6c | left-ma|rgin col|
|00000b70| 75 6d 6e 2e 22 20 28 69 | 6e 74 65 72 61 63 74 69 |umn." (i|nteracti|
|00000b80| 76 65 20 22 2a 22 29 20 | 28 62 79 74 65 2d 63 6f |ve "*") |(byte-co|
|00000b90| 64 65 20 22 c0 60 c1 c2 | 21 88 60 5c 22 88 c3 20 |de ".`..|!.`\".. |
|00000ba0| 88 c4 20 87 22 20 5b 64 | 65 6c 65 74 65 2d 72 65 |.. ." [d|elete-re|
|00000bb0| 67 69 6f 6e 20 73 6b 69 | 70 2d 63 68 61 72 73 2d |gion ski|p-chars-|
|00000bc0| 62 61 63 6b 77 61 72 64 | 20 22 20 09 22 20 6e 65 |backward| " ." ne|
|00000bd0| 77 6c 69 6e 65 20 69 6e | 64 65 6e 74 2d 61 63 63 |wline in|dent-acc|
|00000be0| 6f 72 64 69 6e 67 2d 74 | 6f 2d 6d 6f 64 65 5d 20 |ording-t|o-mode] |
|00000bf0| 34 29 29 0a 28 64 65 66 | 75 6e 20 72 65 69 6e 64 |4)).(def|un reind|
|00000c00| 65 6e 74 2d 74 68 65 6e | 2d 6e 65 77 6c 69 6e 65 |ent-then|-newline|
|00000c10| 2d 61 6e 64 2d 69 6e 64 | 65 6e 74 20 6e 69 6c 20 |-and-ind|ent nil |
|00000c20| 22 5c 0a 52 65 69 6e 64 | 65 6e 74 20 63 75 72 72 |"\.Reind|ent curr|
|00000c30| 65 6e 74 20 6c 69 6e 65 | 2c 20 69 6e 73 65 72 74 |ent line|, insert|
|00000c40| 20 6e 65 77 6c 69 6e 65 | 2c 20 74 68 65 6e 20 69 | newline|, then i|
|00000c50| 6e 64 65 6e 74 20 74 68 | 65 20 6e 65 77 20 6c 69 |ndent th|e new li|
|00000c60| 6e 65 2e 0a 49 6e 64 65 | 6e 74 61 74 69 6f 6e 20 |ne..Inde|ntation |
|00000c70| 6f 66 20 62 6f 74 68 20 | 6c 69 6e 65 73 20 69 73 |of both |lines is|
|00000c80| 20 64 6f 6e 65 20 61 63 | 63 6f 72 64 69 6e 67 20 | done ac|cording |
|00000c90| 74 6f 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 6d |to the c|urrent m|
|00000ca0| 61 6a 6f 72 20 6d 6f 64 | 65 2c 0a 77 68 69 63 68 |ajor mod|e,.which|
|00000cb0| 20 6d 65 61 6e 73 20 74 | 68 61 74 20 74 68 65 20 | means t|hat the |
|00000cc0| 63 75 72 72 65 6e 74 20 | 76 61 6c 75 65 20 6f 66 |current |value of|
|00000cd0| 20 69 6e 64 65 6e 74 2d | 6c 69 6e 65 2d 66 75 6e | indent-|line-fun|
|00000ce0| 63 74 69 6f 6e 20 69 73 | 20 63 61 6c 6c 65 64 2e |ction is| called.|
|00000cf0| 0a 49 6e 20 70 72 6f 67 | 72 61 6d 6d 69 6e 67 20 |.In prog|ramming |
|00000d00| 6c 61 6e 67 75 61 67 65 | 20 6d 6f 64 65 73 2c 20 |language| modes, |
|00000d10| 74 68 69 73 20 69 73 20 | 74 68 65 20 73 61 6d 65 |this is |the same|
|00000d20| 20 61 73 20 54 41 42 2e | 0a 49 6e 20 73 6f 6d 65 | as TAB.|.In some|
|00000d30| 20 74 65 78 74 20 6d 6f | 64 65 73 2c 20 77 68 65 | text mo|des, whe|
|00000d40| 72 65 20 54 41 42 20 69 | 6e 73 65 72 74 73 20 61 |re TAB i|nserts a|
|00000d50| 20 74 61 62 2c 20 74 68 | 69 73 20 69 6e 64 65 6e | tab, th|is inden|
|00000d60| 74 73 20 74 6f 20 74 68 | 65 0a 73 70 65 63 69 66 |ts to th|e.specif|
|00000d70| 69 65 64 20 6c 65 66 74 | 2d 6d 61 72 67 69 6e 20 |ied left|-margin |
|00000d80| 63 6f 6c 75 6d 6e 2e 22 | 20 28 69 6e 74 65 72 61 |column."| (intera|
|00000d90| 63 74 69 76 65 20 22 2a | 22 29 20 28 62 79 74 65 |ctive "*|") (byte|
|00000da0| 2d 63 6f 64 65 20 22 8a | c0 60 c1 c2 21 88 60 5c |-code ".|.`..!.`\|
|00000db0| 22 88 c3 20 88 29 c4 20 | 88 c3 20 87 22 20 5b 64 |".. .). |.. ." [d|
|00000dc0| 65 6c 65 74 65 2d 72 65 | 67 69 6f 6e 20 73 6b 69 |elete-re|gion ski|
|00000dd0| 70 2d 63 68 61 72 73 2d | 62 61 63 6b 77 61 72 64 |p-chars-|backward|
|00000de0| 20 22 20 09 22 20 69 6e | 64 65 6e 74 2d 61 63 63 | " ." in|dent-acc|
|00000df0| 6f 72 64 69 6e 67 2d 74 | 6f 2d 6d 6f 64 65 20 6e |ording-t|o-mode n|
|00000e00| 65 77 6c 69 6e 65 5d 20 | 34 29 29 0a 28 62 79 74 |ewline] |4)).(byt|
|00000e10| 65 2d 63 6f 64 65 20 22 | c0 c1 4d 88 c2 c3 4d 87 |e-code "|..M...M.|
|00000e20| 22 20 5b 6b 69 6c 6c 2d | 66 6f 72 77 61 72 64 2d |" [kill-|forward-|
|00000e30| 63 68 61 72 73 20 28 6c | 61 6d 62 64 61 20 28 61 |chars (l|ambda (a|
|00000e40| 72 67 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |rg) (byt|e-code "|
|00000e50| 08 3c 83 08 00 08 40 10 | 08 c1 3d 83 10 00 c2 10 |.<....@.|..=.....|
|00000e60| c3 60 60 08 5c 5c 5c 22 | 87 22 20 5b 61 72 67 20 |.``.\\\"|." [arg |
|00000e70| 2d 20 2d 31 20 6b 69 6c | 6c 2d 72 65 67 69 6f 6e |- -1 kil|l-region|
|00000e80| 5d 20 34 29 29 20 6b 69 | 6c 6c 2d 62 61 63 6b 77 |] 4)) ki|ll-backw|
|00000e90| 61 72 64 2d 63 68 61 72 | 73 20 28 6c 61 6d 62 64 |ard-char|s (lambd|
|00000ea0| 61 20 28 61 72 67 29 20 | 28 62 79 74 65 2d 63 6f |a (arg) |(byte-co|
|00000eb0| 64 65 20 22 08 3c 83 08 | 00 08 40 10 08 c1 3d 83 |de ".<..|..@...=.|
|00000ec0| 10 00 c2 10 c3 60 60 08 | 5a 5c 22 87 22 20 5b 61 |.....``.|Z\"." [a|
|00000ed0| 72 67 20 2d 20 2d 31 20 | 6b 69 6c 6c 2d 72 65 67 |rg - -1 |kill-reg|
|00000ee0| 69 6f 6e 5d 20 34 29 29 | 5d 20 32 29 0a 28 64 65 |ion] 4))|] 2).(de|
|00000ef0| 66 75 6e 20 62 61 63 6b | 77 61 72 64 2d 64 65 6c |fun back|ward-del|
|00000f00| 65 74 65 2d 63 68 61 72 | 2d 75 6e 74 61 62 69 66 |ete-char|-untabif|
|00000f10| 79 20 28 61 72 67 20 26 | 6f 70 74 69 6f 6e 61 6c |y (arg &|optional|
|00000f20| 20 6b 69 6c 6c 70 29 20 | 22 5c 0a 44 65 6c 65 74 | killp) |"\.Delet|
|00000f30| 65 20 63 68 61 72 61 63 | 74 65 72 73 20 62 61 63 |e charac|ters bac|
|00000f40| 6b 77 61 72 64 2c 20 63 | 68 61 6e 67 69 6e 67 20 |kward, c|hanging |
|00000f50| 74 61 62 73 20 69 6e 74 | 6f 20 73 70 61 63 65 73 |tabs int|o spaces|
|00000f60| 2e 0a 44 65 6c 65 74 65 | 20 41 52 47 20 63 68 61 |..Delete| ARG cha|
|00000f70| 72 73 2c 20 61 6e 64 20 | 6b 69 6c 6c 20 28 73 61 |rs, and |kill (sa|
|00000f80| 76 65 20 69 6e 20 6b 69 | 6c 6c 20 72 69 6e 67 29 |ve in ki|ll ring)|
|00000f90| 20 69 66 20 4b 49 4c 4c | 50 20 69 73 20 6e 6f 6e | if KILL|P is non|
|00000fa0| 2d 6e 69 6c 2e 0a 49 6e | 74 65 72 61 63 74 69 76 |-nil..In|teractiv|
|00000fb0| 65 6c 79 2c 20 41 52 47 | 20 69 73 20 74 68 65 20 |ely, ARG| is the |
|00000fc0| 70 72 65 66 69 78 20 61 | 72 67 20 28 64 65 66 61 |prefix a|rg (defa|
|00000fd0| 75 6c 74 20 31 29 0a 61 | 6e 64 20 4b 49 4c 4c 50 |ult 1).a|nd KILLP|
|00000fe0| 20 69 73 20 74 20 69 66 | 20 70 72 65 66 69 78 20 | is t if| prefix |
|00000ff0| 61 72 67 20 69 73 20 77 | 61 73 20 73 70 65 63 69 |arg is w|as speci|
|00001000| 66 69 65 64 2e 22 20 28 | 69 6e 74 65 72 61 63 74 |fied." (|interact|
|00001010| 69 76 65 20 22 2a 70 5c | 6e 50 22 29 20 28 62 79 |ive "*p\|nP") (by|
|00001020| 74 65 2d 63 6f 64 65 20 | 22 08 19 8a 09 c2 56 83 |te-code |".....V.|
|00001030| 32 00 6f 84 32 00 68 c3 | 55 83 27 00 69 1c c5 c6 |2.o.2.h.|U.'.i...|
|00001040| 21 88 0c 69 5a 14 c7 c8 | 0c 5c 22 88 c9 ca 21 88 |!..iZ...|.\"...!.|
|00001050| 29 c5 c6 21 88 09 53 89 | 11 82 04 00 2a cb 08 0e |)..!..S.|....*...|
|00001060| 0c 5c 22 87 22 20 5b 61 | 72 67 20 63 6f 75 6e 74 |.\"." [a|rg count|
|00001070| 20 30 20 39 20 63 6f 6c | 20 66 6f 72 77 61 72 64 | 0 9 col| forward|
|00001080| 2d 63 68 61 72 20 2d 31 | 20 69 6e 73 65 72 74 2d |-char -1| insert-|
|00001090| 63 68 61 72 20 33 32 20 | 64 65 6c 65 74 65 2d 63 |char 32 |delete-c|
|000010a0| 68 61 72 20 31 20 64 65 | 6c 65 74 65 2d 62 61 63 |har 1 de|lete-bac|
|000010b0| 6b 77 61 72 64 2d 63 68 | 61 72 20 6b 69 6c 6c 70 |kward-ch|ar killp|
|000010c0| 5d 20 34 29 29 0a 28 64 | 65 66 75 6e 20 7a 61 70 |] 4)).(d|efun zap|
|000010d0| 2d 74 6f 2d 63 68 61 72 | 20 28 61 72 67 20 63 68 |-to-char| (arg ch|
|000010e0| 61 72 29 20 22 5c 0a 4b | 69 6c 6c 20 75 70 20 74 |ar) "\.K|ill up t|
|000010f0| 6f 20 28 62 75 74 20 6e | 6f 74 20 69 6e 63 6c 75 |o (but n|ot inclu|
|00001100| 64 69 6e 67 29 20 41 52 | 47 27 74 68 20 6f 63 63 |ding) AR|G'th occ|
|00001110| 75 72 72 65 6e 63 65 20 | 6f 66 20 43 48 41 52 2e |urrence |of CHAR.|
|00001120| 0a 47 6f 65 73 20 62 61 | 63 6b 77 61 72 64 20 69 |.Goes ba|ckward i|
|00001130| 66 20 41 52 47 20 69 73 | 20 6e 65 67 61 74 69 76 |f ARG is| negativ|
|00001140| 65 3b 20 67 6f 65 73 20 | 74 6f 20 65 6e 64 20 6f |e; goes |to end o|
|00001150| 66 20 62 75 66 66 65 72 | 20 69 66 20 43 48 41 52 |f buffer| if CHAR|
|00001160| 20 6e 6f 74 20 66 6f 75 | 6e 64 2e 22 20 28 69 6e | not fou|nd." (in|
|00001170| 74 65 72 61 63 74 69 76 | 65 20 22 2a 70 5c 6e 63 |teractiv|e "*p\nc|
|00001180| 5a 61 70 20 74 6f 20 63 | 68 61 72 3a 20 22 29 20 |Zap to c|har: ") |
|00001190| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c0 60 c1 c2 |(byte-co|de ".`..|
|000011a0| 0b 21 c4 c5 0e 06 24 83 | 5c 22 00 0e 06 c7 56 83 |.!....$.|\"....V.|
|000011b0| 1a 00 60 53 82 1c 00 60 | 54 62 88 60 82 2e 00 0e |..`S...`|Tb.`....|
|000011c0| 06 c7 56 83 2d 00 64 82 | 2e 00 65 5c 22 87 22 20 |..V.-.d.|..e\"." |
|000011d0| 5b 6b 69 6c 6c 2d 72 65 | 67 69 6f 6e 20 73 65 61 |[kill-re|gion sea|
|000011e0| 72 63 68 2d 66 6f 72 77 | 61 72 64 20 63 68 61 72 |rch-forw|ard char|
|000011f0| 2d 74 6f 2d 73 74 72 69 | 6e 67 20 63 68 61 72 20 |-to-stri|ng char |
|00001200| 6e 69 6c 20 74 20 61 72 | 67 20 30 5d 20 37 29 29 |nil t ar|g 0] 7))|
|00001210| 0a 28 64 65 66 75 6e 20 | 62 65 67 69 6e 6e 69 6e |.(defun |beginnin|
|00001220| 67 2d 6f 66 2d 62 75 66 | 66 65 72 20 28 26 6f 70 |g-of-buf|fer (&op|
|00001230| 74 69 6f 6e 61 6c 20 61 | 72 67 29 20 22 5c 0a 4d |tional a|rg) "\.M|
|00001240| 6f 76 65 20 70 6f 69 6e | 74 20 74 6f 20 74 68 65 |ove poin|t to the|
|00001250| 20 62 65 67 69 6e 6e 69 | 6e 67 20 6f 66 20 74 68 | beginni|ng of th|
|00001260| 65 20 62 75 66 66 65 72 | 3b 20 6c 65 61 76 65 20 |e buffer|; leave |
|00001270| 6d 61 72 6b 20 61 74 20 | 70 72 65 76 69 6f 75 73 |mark at |previous|
|00001280| 20 70 6f 73 69 74 69 6f | 6e 2e 0a 57 69 74 68 20 | positio|n..With |
|00001290| 61 72 67 20 4e 2c 20 70 | 75 74 20 70 6f 69 6e 74 |arg N, p|ut point|
|000012a0| 20 4e 2f 31 30 20 6f 66 | 20 74 68 65 20 77 61 79 | N/10 of| the way|
|000012b0| 20 66 72 6f 6d 20 74 68 | 65 20 74 72 75 65 20 62 | from th|e true b|
|000012c0| 65 67 69 6e 6e 69 6e 67 | 2e 0a 44 6f 6e 27 74 20 |eginning|..Don't |
|000012d0| 75 73 65 20 74 68 69 73 | 20 69 6e 20 4c 69 73 70 |use this| in Lisp|
|000012e0| 20 70 72 6f 67 72 61 6d | 73 21 0a 28 67 6f 74 6f | program|s!.(goto|
|000012f0| 2d 63 68 61 72 20 28 70 | 6f 69 6e 74 2d 6d 69 6e |-char (p|oint-min|
|00001300| 29 29 20 69 73 20 66 61 | 73 74 65 72 20 61 6e 64 |)) is fa|ster and|
|00001310| 20 64 6f 65 73 20 6e 6f | 74 20 73 65 74 20 74 68 | does no|t set th|
|00001320| 65 20 6d 61 72 6b 2e 22 | 20 28 69 6e 74 65 72 61 |e mark."| (intera|
|00001330| 63 74 69 76 65 20 22 50 | 22 29 20 28 62 79 74 65 |ctive "P|") (byte|
|00001340| 2d 63 6f 64 65 20 22 c0 | 20 88 09 83 2a 00 c2 20 |-code ".| ...*.. |
|00001350| c3 56 83 1b 00 c4 c5 09 | 21 c6 c2 20 c7 5c 22 5c |.V......|!.. .\"\|
|00001360| 22 82 2b 00 c6 c4 c2 20 | c5 09 21 5c 22 c7 5c 5c |".+.... |..!\".\\|
|00001370| c7 5c 22 82 2b 00 65 62 | 88 09 85 34 00 c8 c9 21 |.\".+.eb|...4...!|
|00001380| 87 22 20 5b 70 75 73 68 | 2d 6d 61 72 6b 20 61 72 |." [push|-mark ar|
|00001390| 67 20 62 75 66 66 65 72 | 2d 73 69 7a 65 20 31 30 |g buffer|-size 10|
|000013a0| 30 30 30 20 2a 20 70 72 | 65 66 69 78 2d 6e 75 6d |000 * pr|efix-num|
|000013b0| 65 72 69 63 2d 76 61 6c | 75 65 20 2f 20 31 30 20 |eric-val|ue / 10 |
|000013c0| 66 6f 72 77 61 72 64 2d | 6c 69 6e 65 20 31 5d 20 |forward-|line 1] |
|000013d0| 35 29 29 0a 28 64 65 66 | 75 6e 20 65 6e 64 2d 6f |5)).(def|un end-o|
|000013e0| 66 2d 62 75 66 66 65 72 | 20 28 26 6f 70 74 69 6f |f-buffer| (&optio|
|000013f0| 6e 61 6c 20 61 72 67 29 | 20 22 5c 0a 4d 6f 76 65 |nal arg)| "\.Move|
|00001400| 20 70 6f 69 6e 74 20 74 | 6f 20 74 68 65 20 65 6e | point t|o the en|
|00001410| 64 20 6f 66 20 74 68 65 | 20 62 75 66 66 65 72 3b |d of the| buffer;|
|00001420| 20 6c 65 61 76 65 20 6d | 61 72 6b 20 61 74 20 70 | leave m|ark at p|
|00001430| 72 65 76 69 6f 75 73 20 | 70 6f 73 69 74 69 6f 6e |revious |position|
|00001440| 2e 0a 57 69 74 68 20 61 | 72 67 20 4e 2c 20 70 75 |..With a|rg N, pu|
|00001450| 74 20 70 6f 69 6e 74 20 | 4e 2f 31 30 20 6f 66 20 |t point |N/10 of |
|00001460| 74 68 65 20 77 61 79 20 | 66 72 6f 6d 20 74 68 65 |the way |from the|
|00001470| 20 74 72 75 65 20 65 6e | 64 2e 0a 44 6f 6e 27 74 | true en|d..Don't|
|00001480| 20 75 73 65 20 74 68 69 | 73 20 69 6e 20 4c 69 73 | use thi|s in Lis|
|00001490| 70 20 70 72 6f 67 72 61 | 6d 73 21 0a 28 67 6f 74 |p progra|ms!.(got|
|000014a0| 6f 2d 63 68 61 72 20 28 | 70 6f 69 6e 74 2d 6d 61 |o-char (|point-ma|
|000014b0| 78 29 29 20 69 73 20 66 | 61 73 74 65 72 20 61 6e |x)) is f|aster an|
|000014c0| 64 20 64 6f 65 73 20 6e | 6f 74 20 73 65 74 20 74 |d does n|ot set t|
|000014d0| 68 65 20 6d 61 72 6b 2e | 22 20 28 69 6e 74 65 72 |he mark.|" (inter|
|000014e0| 61 63 74 69 76 65 20 22 | 50 22 29 20 28 62 79 74 |active "|P") (byt|
|000014f0| 65 2d 63 6f 64 65 20 22 | c0 20 88 09 83 2c 00 c2 |e-code "|. ...,..|
|00001500| 20 54 c2 20 c3 56 83 1e | 00 c4 c5 09 21 c6 c2 20 | T. .V..|....!.. |
|00001510| c7 5c 22 5c 22 82 28 00 | c6 c4 c2 20 c5 09 21 5c |.\"\".(.|... ..!\|
|00001520| 22 c7 5c 22 5a 82 2d 00 | 64 62 88 09 85 36 00 c8 |".\"Z.-.|db...6..|
|00001530| c9 21 87 22 20 5b 70 75 | 73 68 2d 6d 61 72 6b 20 |.!." [pu|sh-mark |
|00001540| 61 72 67 20 62 75 66 66 | 65 72 2d 73 69 7a 65 20 |arg buff|er-size |
|00001550| 31 30 30 30 30 20 2a 20 | 70 72 65 66 69 78 2d 6e |10000 * |prefix-n|
|00001560| 75 6d 65 72 69 63 2d 76 | 61 6c 75 65 20 2f 20 31 |umeric-v|alue / 1|
|00001570| 30 20 66 6f 72 77 61 72 | 64 2d 6c 69 6e 65 20 31 |0 forwar|d-line 1|
|00001580| 5d 20 36 29 29 0a 28 64 | 65 66 75 6e 20 6d 61 72 |] 6)).(d|efun mar|
|00001590| 6b 2d 77 68 6f 6c 65 2d | 62 75 66 66 65 72 20 6e |k-whole-|buffer n|
|000015a0| 69 6c 20 22 5c 0a 50 75 | 74 20 70 6f 69 6e 74 20 |il "\.Pu|t point |
|000015b0| 61 74 20 62 65 67 69 6e | 6e 69 6e 67 20 61 6e 64 |at begin|ning and|
|000015c0| 20 6d 61 72 6b 20 61 74 | 20 65 6e 64 20 6f 66 20 | mark at| end of |
|000015d0| 62 75 66 66 65 72 2e 22 | 20 28 69 6e 74 65 72 61 |buffer."| (intera|
|000015e0| 63 74 69 76 65 29 20 28 | 62 79 74 65 2d 63 6f 64 |ctive) (|byte-cod|
|000015f0| 65 20 22 c0 60 21 88 c0 | 64 21 88 65 62 87 22 20 |e ".`!..|d!.eb." |
|00001600| 5b 70 75 73 68 2d 6d 61 | 72 6b 5d 20 32 29 29 0a |[push-ma|rk] 2)).|
|00001610| 28 64 65 66 75 6e 20 63 | 6f 75 6e 74 2d 6c 69 6e |(defun c|ount-lin|
|00001620| 65 73 2d 72 65 67 69 6f | 6e 20 28 73 74 61 72 74 |es-regio|n (start|
|00001630| 20 65 6e 64 29 20 22 5c | 0a 50 72 69 6e 74 20 6e | end) "\|.Print n|
|00001640| 75 6d 62 65 72 20 6f 66 | 20 6c 69 6e 65 73 20 69 |umber of| lines i|
|00001650| 6e 20 74 68 65 20 72 65 | 67 69 6f 6e 2e 22 20 28 |n the re|gion." (|
|00001660| 69 6e 74 65 72 61 63 74 | 69 76 65 20 22 72 22 29 |interact|ive "r")|
|00001670| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c0 c1 c2 | (byte-c|ode "...|
|00001680| 0b 0c 5c 22 5c 22 87 22 | 20 5b 6d 65 73 73 61 67 |..\"\"."| [messag|
|00001690| 65 20 22 52 65 67 69 6f | 6e 20 68 61 73 20 25 64 |e "Regio|n has %d|
|000016a0| 20 6c 69 6e 65 73 22 20 | 63 6f 75 6e 74 2d 6c 69 | lines" |count-li|
|000016b0| 6e 65 73 20 73 74 61 72 | 74 20 65 6e 64 5d 20 35 |nes star|t end] 5|
|000016c0| 29 29 0a 28 64 65 66 75 | 6e 20 77 68 61 74 2d 6c |)).(defu|n what-l|
|000016d0| 69 6e 65 20 6e 69 6c 20 | 22 5c 0a 50 72 69 6e 74 |ine nil |"\.Print|
|000016e0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 6c 69 6e | the cur|rent lin|
|000016f0| 65 20 6e 75 6d 62 65 72 | 20 28 69 6e 20 74 68 65 |e number| (in the|
|00001700| 20 62 75 66 66 65 72 29 | 20 6f 66 20 70 6f 69 6e | buffer)| of poin|
|00001710| 74 2e 22 20 28 69 6e 74 | 65 72 61 63 74 69 76 65 |t." (int|eractive|
|00001720| 29 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 8c c0 |) (byte-|code "..|
|00001730| 20 88 8a c1 c2 21 88 c3 | c4 c5 c6 60 5c 22 54 5c | ....!..|...`\"T\|
|00001740| 22 2a 87 22 20 5b 77 69 | 64 65 6e 20 66 6f 72 77 |"*." [wi|den forw|
|00001750| 61 72 64 2d 6c 69 6e 65 | 20 30 20 6d 65 73 73 61 |ard-line| 0 messa|
|00001760| 67 65 20 22 4c 69 6e 65 | 20 25 64 22 20 63 6f 75 |ge "Line| %d" cou|
|00001770| 6e 74 2d 6c 69 6e 65 73 | 20 31 5d 20 35 29 29 0a |nt-lines| 1] 5)).|
|00001780| 28 64 65 66 75 6e 20 63 | 6f 75 6e 74 2d 6c 69 6e |(defun c|ount-lin|
|00001790| 65 73 20 28 73 74 61 72 | 74 20 65 6e 64 29 20 22 |es (star|t end) "|
|000017a0| 5c 0a 52 65 74 75 72 6e | 20 6e 75 6d 62 65 72 20 |\.Return| number |
|000017b0| 6f 66 20 6e 65 77 6c 69 | 6e 65 73 20 62 65 74 77 |of newli|nes betw|
|000017c0| 65 65 6e 20 53 54 41 52 | 54 20 61 6e 64 20 45 4e |een STAR|T and EN|
|000017d0| 44 2e 22 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |D." (byt|e-code "|
|000017e0| 8a 8c c0 09 5c 6e 5c 22 | 88 65 62 88 c3 20 c4 c3 |....\n\"|.eb.. ..|
|000017f0| 20 21 5a 2a 87 22 20 5b | 6e 61 72 72 6f 77 2d 74 | !Z*." [|narrow-t|
|00001800| 6f 2d 72 65 67 69 6f 6e | 20 73 74 61 72 74 20 65 |o-region| start e|
|00001810| 6e 64 20 62 75 66 66 65 | 72 2d 73 69 7a 65 20 66 |nd buffe|r-size f|
|00001820| 6f 72 77 61 72 64 2d 6c | 69 6e 65 5d 20 33 29 29 |orward-l|ine] 3))|
|00001830| 0a 28 64 65 66 75 6e 20 | 77 68 61 74 2d 63 75 72 |.(defun |what-cur|
|00001840| 73 6f 72 2d 70 6f 73 69 | 74 69 6f 6e 20 6e 69 6c |sor-posi|tion nil|
|00001850| 20 22 5c 0a 50 72 69 6e | 74 20 69 6e 66 6f 20 6f | "\.Prin|t info o|
|00001860| 6e 20 63 75 72 73 6f 72 | 20 70 6f 73 69 74 69 6f |n cursor| positio|
|00001870| 6e 20 28 6f 6e 20 73 63 | 72 65 65 6e 20 61 6e 64 |n (on sc|reen and|
|00001880| 20 77 69 74 68 69 6e 20 | 62 75 66 66 65 72 29 2e | within |buffer).|
|00001890| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 29 20 |" (inter|active) |
|000018a0| 28 62 79 74 65 2d 63 6f | 64 65 20 22 67 18 65 19 |(byte-co|de "g.e.|
|000018b0| 64 1a 60 1b c4 20 89 1d | c6 56 83 23 00 c7 89 0d |d.`.. ..|.V.#....|
|000018c0| c8 5c 22 0b 53 5c 5c c7 | 0d c9 5c 22 ca 5d 5c 22 |.\".S\\.|..\".]\"|
|000018d0| 82 32 00 c7 89 0d cb 5c | 22 cc 0b 53 c9 5c 22 5c |.2.....\|"..S.\"\|
|000018e0| 5c 0d ca 5d 5c 22 1e 0d | ce 20 cf 55 83 3f 00 d0 |\..]\"..|. .U.?..|
|000018f0| 82 44 00 d1 d2 ce 20 5c | 22 1e 13 69 1e 14 0b 5c |.D.... \|"..i...\|
|00001900| 6e 55 83 7c 00 09 ca 55 | 83 5c 5c 00 5c 6e 0d 54 |nU.|...U|.\\.\n.T|
|00001910| 55 84 6d 00 d5 d6 0b 0d | 0e 0d 09 5c 6e 0e 14 0e |U.m.....|...\n...|
|00001920| 13 26 08 82 ae 00 d5 d7 | 0b 0d 0e 0d 0e 14 0e 13 |.&......|........|
|00001930| 26 06 82 ae 00 09 ca 55 | 83 89 00 5c 6e 0d 54 55 |&......U|...\n.TU|
|00001940| 84 9e 00 d5 d8 d9 08 21 | 08 0b 0d 0e 0d 09 5c 6e |.......!|......\n|
|00001950| 0e 14 0e 13 26 5c 6e 82 | ae 00 d5 da d9 08 21 08 |....&\n.|......!.|
|00001960| 0b 0d 0e 0d 0e 14 0e 13 | 26 08 2e 08 87 22 20 5b |........|&...." [|
|00001970| 63 68 61 72 20 62 65 67 | 20 65 6e 64 20 70 6f 73 |char beg| end pos|
|00001980| 20 62 75 66 66 65 72 2d | 73 69 7a 65 20 74 6f 74 | buffer-|size tot|
|00001990| 61 6c 20 35 30 30 30 30 | 20 2f 20 32 30 30 20 31 |al 50000| / 200 1|
|000019a0| 30 30 20 31 20 32 20 2a | 20 70 65 72 63 65 6e 74 |00 1 2 *| percent|
|000019b0| 20 77 69 6e 64 6f 77 2d | 68 73 63 72 6f 6c 6c 20 | window-|hscroll |
|000019c0| 30 20 22 22 20 66 6f 72 | 6d 61 74 20 22 20 48 73 |0 "" for|mat " Hs|
|000019d0| 63 72 6f 6c 6c 3d 25 64 | 22 20 68 73 63 72 6f 6c |croll=%d|" hscrol|
|000019e0| 6c 20 63 6f 6c 20 6d 65 | 73 73 61 67 65 20 22 70 |l col me|ssage "p|
|000019f0| 6f 69 6e 74 3d 25 64 20 | 6f 66 20 25 64 28 25 64 |oint=%d |of %d(%d|
|00001a00| 25 25 29 20 3c 25 64 20 | 2d 20 25 64 3e 20 20 63 |%%) <%d |- %d> c|
|00001a10| 6f 6c 75 6d 6e 20 25 64 | 20 25 73 22 20 22 70 6f |olumn %d| %s" "po|
|00001a20| 69 6e 74 3d 25 64 20 6f | 66 20 25 64 28 25 64 25 |int=%d o|f %d(%d%|
|00001a30| 25 29 20 20 63 6f 6c 75 | 6d 6e 20 25 64 20 25 73 |%) colu|mn %d %s|
|00001a40| 22 20 22 43 68 61 72 3a | 20 25 73 20 28 30 25 6f |" "Char:| %s (0%o|
|00001a50| 29 20 20 70 6f 69 6e 74 | 3d 25 64 20 6f 66 20 25 |) point|=%d of %|
|00001a60| 64 28 25 64 25 25 29 20 | 3c 25 64 20 2d 20 25 64 |d(%d%%) |<%d - %d|
|00001a70| 3e 20 20 63 6f 6c 75 6d | 6e 20 25 64 20 25 73 22 |> colum|n %d %s"|
|00001a80| 20 73 69 6e 67 6c 65 2d | 6b 65 79 2d 64 65 73 63 | single-|key-desc|
|00001a90| 72 69 70 74 69 6f 6e 20 | 22 43 68 61 72 3a 20 25 |ription |"Char: %|
|00001aa0| 73 20 28 30 25 6f 29 20 | 20 70 6f 69 6e 74 3d 25 |s (0%o) | point=%|
|00001ab0| 64 20 6f 66 20 25 64 28 | 25 64 25 25 29 20 20 63 |d of %d(|%d%%) c|
|00001ac0| 6f 6c 75 6d 6e 20 25 64 | 20 25 73 22 5d 20 31 32 |olumn %d| %s"] 12|
|00001ad0| 29 29 0a 28 64 65 66 75 | 6e 20 66 75 6e 64 61 6d |)).(defu|n fundam|
|00001ae0| 65 6e 74 61 6c 2d 6d 6f | 64 65 20 6e 69 6c 20 22 |ental-mo|de nil "|
|00001af0| 5c 0a 4d 61 6a 6f 72 20 | 6d 6f 64 65 20 6e 6f 74 |\.Major |mode not|
|00001b00| 20 73 70 65 63 69 61 6c | 69 7a 65 64 20 66 6f 72 | special|ized for|
|00001b10| 20 61 6e 79 74 68 69 6e | 67 20 69 6e 20 70 61 72 | anythin|g in par|
|00001b20| 74 69 63 75 6c 61 72 2e | 0a 4f 74 68 65 72 20 6d |ticular.|.Other m|
|00001b30| 61 6a 6f 72 20 6d 6f 64 | 65 73 20 61 72 65 20 64 |ajor mod|es are d|
|00001b40| 65 66 69 6e 65 64 20 62 | 79 20 63 6f 6d 70 61 72 |efined b|y compar|
|00001b50| 69 73 6f 6e 20 77 69 74 | 68 20 74 68 69 73 20 6f |ison wit|h this o|
|00001b60| 6e 65 2e 22 20 28 69 6e | 74 65 72 61 63 74 69 76 |ne." (in|teractiv|
|00001b70| 65 29 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 c0 |e) (byte|-code ".|
|00001b80| 20 87 22 20 5b 6b 69 6c | 6c 2d 61 6c 6c 2d 6c 6f | ." [kil|l-all-lo|
|00001b90| 63 61 6c 2d 76 61 72 69 | 61 62 6c 65 73 5d 20 31 |cal-vari|ables] 1|
|00001ba0| 29 29 0a 28 70 75 74 20 | 28 71 75 6f 74 65 20 65 |)).(put |(quote e|
|00001bb0| 76 61 6c 2d 65 78 70 72 | 65 73 73 69 6f 6e 29 20 |val-expr|ession) |
|00001bc0| 28 71 75 6f 74 65 20 64 | 69 73 61 62 6c 65 64 29 |(quote d|isabled)|
|00001bd0| 20 74 29 0a 28 64 65 66 | 75 6e 20 65 76 61 6c 2d | t).(def|un eval-|
|00001be0| 65 78 70 72 65 73 73 69 | 6f 6e 20 28 65 78 70 72 |expressi|on (expr|
|00001bf0| 65 73 73 69 6f 6e 29 20 | 22 5c 0a 45 76 61 6c 75 |ession) |"\.Evalu|
|00001c00| 61 74 65 20 45 58 50 52 | 45 53 53 49 4f 4e 20 61 |ate EXPR|ESSION a|
|00001c10| 6e 64 20 70 72 69 6e 74 | 20 76 61 6c 75 65 20 69 |nd print| value i|
|00001c20| 6e 20 6d 69 6e 69 62 75 | 66 66 65 72 2e 0a 56 61 |n minibu|ffer..Va|
|00001c30| 6c 75 65 20 69 73 20 61 | 6c 73 6f 20 63 6f 6e 73 |lue is a|lso cons|
|00001c40| 65 64 20 6f 6e 20 74 6f | 20 66 72 6f 6e 74 20 6f |ed on to| front o|
|00001c50| 66 20 76 61 72 69 61 62 | 6c 65 20 20 76 61 6c 75 |f variab|le valu|
|00001c60| 65 73 20 20 27 73 20 76 | 61 6c 75 65 2e 22 20 28 |es 's v|alue." (|
|00001c70| 69 6e 74 65 72 61 63 74 | 69 76 65 20 22 78 45 76 |interact|ive "xEv|
|00001c80| 61 6c 3a 20 22 29 20 28 | 62 79 74 65 2d 63 6f 64 |al: ") (|byte-cod|
|00001c90| 65 20 22 c0 09 21 5c 6e | 42 12 c3 5c 6e 40 c4 5c |e "..!\n|B..\n@.\|
|00001ca0| 22 87 22 20 5b 65 76 61 | 6c 20 65 78 70 72 65 73 |"." [eva|l expres|
|00001cb0| 73 69 6f 6e 20 76 61 6c | 75 65 73 20 70 72 69 6e |sion val|ues prin|
|00001cc0| 31 20 74 5d 20 33 29 29 | 0a 28 64 65 66 75 6e 20 |1 t] 3))|.(defun |
|00001cd0| 65 64 69 74 2d 61 6e 64 | 2d 65 76 61 6c 2d 63 6f |edit-and|-eval-co|
|00001ce0| 6d 6d 61 6e 64 20 28 70 | 72 6f 6d 70 74 20 63 6f |mmand (p|rompt co|
|00001cf0| 6d 6d 61 6e 64 29 20 22 | 5c 0a 50 72 6f 6d 70 74 |mmand) "|\.Prompt|
|00001d00| 69 6e 67 20 77 69 74 68 | 20 50 52 4f 4d 50 54 2c |ing with| PROMPT,|
|00001d10| 20 6c 65 74 20 75 73 65 | 72 20 65 64 69 74 20 43 | let use|r edit C|
|00001d20| 4f 4d 4d 41 4e 44 20 61 | 6e 64 20 65 76 61 6c 20 |OMMAND a|nd eval |
|00001d30| 72 65 73 75 6c 74 2e 0a | 43 4f 4d 4d 41 4e 44 20 |result..|COMMAND |
|00001d40| 69 73 20 61 20 4c 69 73 | 70 20 65 78 70 72 65 73 |is a Lis|p expres|
|00001d50| 73 69 6f 6e 2e 20 20 4c | 65 74 20 75 73 65 72 20 |sion. L|et user |
|00001d60| 65 64 69 74 20 74 68 61 | 74 20 65 78 70 72 65 73 |edit tha|t expres|
|00001d70| 73 69 6f 6e 20 69 6e 0a | 74 68 65 20 6d 69 6e 69 |sion in.|the mini|
|00001d80| 62 75 66 66 65 72 2c 20 | 74 68 65 6e 20 72 65 61 |buffer, |then rea|
|00001d90| 64 20 61 6e 64 20 65 76 | 61 6c 75 61 74 65 20 74 |d and ev|aluate t|
|00001da0| 68 65 20 72 65 73 75 6c | 74 2e 22 20 28 62 79 74 |he resul|t." (byt|
|00001db0| 65 2d 63 6f 64 65 20 22 | c0 c1 5c 6e c3 0c 21 5c |e-code "|..\n..!\|
|00001dc0| 22 21 87 22 20 5b 65 76 | 61 6c 20 72 65 61 64 2d |"!." [ev|al read-|
|00001dd0| 6d 69 6e 69 62 75 66 66 | 65 72 20 70 72 6f 6d 70 |minibuff|er promp|
|00001de0| 74 20 70 72 69 6e 31 2d | 74 6f 2d 73 74 72 69 6e |t prin1-|to-strin|
|00001df0| 67 20 63 6f 6d 6d 61 6e | 64 5d 20 35 29 29 0a 28 |g comman|d] 5)).(|
|00001e00| 62 79 74 65 2d 63 6f 64 | 65 20 22 c0 c1 21 84 5c |byte-cod|e "..!.\|
|00001e10| 6e 00 c2 0b 21 11 c4 09 | c5 c6 23 88 c4 09 c7 c8 |n...!...|..#.....|
|00001e20| 23 87 22 20 5b 62 6f 75 | 6e 64 70 20 72 65 70 65 |#." [bou|ndp repe|
|00001e30| 61 74 2d 63 6f 6d 70 6c | 65 78 2d 63 6f 6d 6d 61 |at-compl|ex-comma|
|00001e40| 6e 64 2d 6d 61 70 20 63 | 6f 70 79 2d 61 6c 69 73 |nd-map c|opy-alis|
|00001e50| 74 20 6d 69 6e 69 62 75 | 66 66 65 72 2d 6c 6f 63 |t minibu|ffer-loc|
|00001e60| 61 6c 2d 6d 61 70 20 64 | 65 66 69 6e 65 2d 6b 65 |al-map d|efine-ke|
|00001e70| 79 20 22 1b 70 22 20 70 | 72 65 76 69 6f 75 73 2d |y ".p" p|revious-|
|00001e80| 63 6f 6d 70 6c 65 78 2d | 63 6f 6d 6d 61 6e 64 20 |complex-|command |
|00001e90| 22 1b 6e 22 20 6e 65 78 | 74 2d 63 6f 6d 70 6c 65 |".n" nex|t-comple|
|00001ea0| 78 2d 63 6f 6d 6d 61 6e | 64 5d 20 34 29 0a 28 64 |x-comman|d] 4).(d|
|00001eb0| 65 66 75 6e 20 72 65 70 | 65 61 74 2d 63 6f 6d 70 |efun rep|eat-comp|
|00001ec0| 6c 65 78 2d 63 6f 6d 6d | 61 6e 64 20 28 72 65 70 |lex-comm|and (rep|
|00001ed0| 65 61 74 2d 63 6f 6d 70 | 6c 65 78 2d 63 6f 6d 6d |eat-comp|lex-comm|
|00001ee0| 61 6e 64 2d 61 72 67 29 | 20 22 5c 0a 45 64 69 74 |and-arg)| "\.Edit|
|00001ef0| 20 61 6e 64 20 72 65 2d | 65 76 61 6c 75 61 74 65 | and re-|evaluate|
|00001f00| 20 6c 61 73 74 20 63 6f | 6d 70 6c 65 78 20 63 6f | last co|mplex co|
|00001f10| 6d 6d 61 6e 64 2c 20 6f | 72 20 41 52 47 74 68 20 |mmand, o|r ARGth |
|00001f20| 66 72 6f 6d 20 6c 61 73 | 74 2e 0a 41 20 63 6f 6d |from las|t..A com|
|00001f30| 70 6c 65 78 20 63 6f 6d | 6d 61 6e 64 20 69 73 20 |plex com|mand is |
|00001f40| 6f 6e 65 20 77 68 69 63 | 68 20 75 73 65 64 20 74 |one whic|h used t|
|00001f50| 68 65 20 6d 69 6e 69 62 | 75 66 66 65 72 2e 0a 54 |he minib|uffer..T|
|00001f60| 68 65 20 63 6f 6d 6d 61 | 6e 64 20 69 73 20 70 6c |he comma|nd is pl|
|00001f70| 61 63 65 64 20 69 6e 20 | 74 68 65 20 6d 69 6e 69 |aced in |the mini|
|00001f80| 62 75 66 66 65 72 20 61 | 73 20 61 20 4c 69 73 70 |buffer a|s a Lisp|
|00001f90| 20 66 6f 72 6d 20 66 6f | 72 20 65 64 69 74 69 6e | form fo|r editin|
|00001fa0| 67 2e 0a 54 68 65 20 72 | 65 73 75 6c 74 20 69 73 |g..The r|esult is|
|00001fb0| 20 65 78 65 63 75 74 65 | 64 2c 20 72 65 70 65 61 | execute|d, repea|
|00001fc0| 74 69 6e 67 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |ting the| command|
|00001fd0| 20 61 73 20 63 68 61 6e | 67 65 64 2e 0a 49 66 20 | as chan|ged..If |
|00001fe0| 74 68 65 20 63 6f 6d 6d | 61 6e 64 20 68 61 73 20 |the comm|and has |
|00001ff0| 62 65 65 6e 20 63 68 61 | 6e 67 65 64 20 6f 72 20 |been cha|nged or |
|00002000| 69 73 20 6e 6f 74 20 74 | 68 65 20 6d 6f 73 74 20 |is not t|he most |
|00002010| 72 65 63 65 6e 74 20 70 | 72 65 76 69 6f 75 73 20 |recent p|revious |
|00002020| 63 6f 6d 6d 61 6e 64 0a | 69 74 20 69 73 20 61 64 |command.|it is ad|
|00002030| 64 65 64 20 74 6f 20 74 | 68 65 20 66 72 6f 6e 74 |ded to t|he front|
|00002040| 20 6f 66 20 74 68 65 20 | 63 6f 6d 6d 61 6e 64 20 | of the |command |
|00002050| 68 69 73 74 6f 72 79 2e | 0a 57 68 69 6c 73 74 20 |history.|.Whilst |
|00002060| 65 64 69 74 69 6e 67 20 | 74 68 65 20 63 6f 6d 6d |editing |the comm|
|00002070| 61 6e 64 2c 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |and, the| followi|
|00002080| 6e 67 20 63 6f 6d 6d 61 | 6e 64 73 20 61 72 65 20 |ng comma|nds are |
|00002090| 61 76 61 69 6c 61 62 6c | 65 3a 0a 5c 5c 7b 72 65 |availabl|e:.\\{re|
|000020a0| 70 65 61 74 2d 63 6f 6d | 70 6c 65 78 2d 63 6f 6d |peat-com|plex-com|
|000020b0| 6d 61 6e 64 2d 6d 61 70 | 7d 22 20 28 69 6e 74 65 |mand-map|}" (inte|
|000020c0| 72 61 63 74 69 76 65 20 | 22 70 22 29 20 28 62 79 |ractive |"p") (by|
|000020d0| 74 65 2d 63 6f 64 65 20 | 22 08 53 09 38 c2 1b 89 |te-code |".S.8...|
|000020e0| 1c 83 27 00 c5 c6 c7 0c | 21 0e 08 c9 24 13 ca 0b |..'.....|!...$...|
|000020f0| 09 40 5c 22 84 21 00 0b | 09 42 11 cb 0b 21 82 29 |.@\".!..|.B...!.)|
|00002100| 00 cc 20 2a 87 22 20 5b | 72 65 70 65 61 74 2d 63 |.. *." [|repeat-c|
|00002110| 6f 6d 70 6c 65 78 2d 63 | 6f 6d 6d 61 6e 64 2d 61 |omplex-c|ommand-a|
|00002120| 72 67 20 63 6f 6d 6d 61 | 6e 64 2d 68 69 73 74 6f |rg comma|nd-histo|
|00002130| 72 79 20 6e 69 6c 20 6e | 65 77 63 6d 64 20 65 6c |ry nil n|ewcmd el|
|00002140| 74 20 72 65 61 64 2d 66 | 72 6f 6d 2d 6d 69 6e 69 |t read-f|rom-mini|
|00002150| 62 75 66 66 65 72 20 22 | 52 65 64 6f 3a 20 22 20 |buffer "|Redo: " |
|00002160| 70 72 69 6e 31 2d 74 6f | 2d 73 74 72 69 6e 67 20 |prin1-to|-string |
|00002170| 72 65 70 65 61 74 2d 63 | 6f 6d 70 6c 65 78 2d 63 |repeat-c|omplex-c|
|00002180| 6f 6d 6d 61 6e 64 2d 6d | 61 70 20 74 20 65 71 75 |ommand-m|ap t equ|
|00002190| 61 6c 20 65 76 61 6c 20 | 64 69 6e 67 5d 20 36 29 |al eval |ding] 6)|
|000021a0| 29 0a 28 64 65 66 75 6e | 20 6e 65 78 74 2d 63 6f |).(defun| next-co|
|000021b0| 6d 70 6c 65 78 2d 63 6f | 6d 6d 61 6e 64 20 28 6e |mplex-co|mmand (n|
|000021c0| 29 20 22 5c 0a 49 6e 73 | 65 72 74 73 20 74 68 65 |) "\.Ins|erts the|
|000021d0| 20 6e 65 78 74 20 65 6c | 65 6d 65 6e 74 20 6f 66 | next el|ement of|
|000021e0| 20 60 63 6f 6d 6d 61 6e | 64 2d 68 69 73 74 6f 72 | `comman|d-histor|
|000021f0| 79 27 20 69 6e 74 6f 20 | 74 68 65 20 6d 69 6e 69 |y' into |the mini|
|00002200| 62 75 66 66 65 72 2e 22 | 20 28 69 6e 74 65 72 61 |buffer."| (intera|
|00002210| 63 74 69 76 65 20 22 70 | 22 29 20 28 62 79 74 65 |ctive "p|") (byte|
|00002220| 2d 63 6f 64 65 20 22 c0 | 09 5c 6e 5a 5d 0b 47 5e |-code ".|.\nZ].G^|
|00002230| 1c 09 0c 55 83 1f 00 c5 | 09 c0 55 83 1a 00 c6 82 |...U....|..U.....|
|00002240| 1b 00 c7 21 82 2e 00 c8 | 20 88 0c 11 c9 09 53 0b |...!....| .....S.|
|00002250| 38 21 63 88 65 62 29 87 | 22 20 5b 31 20 72 65 70 |8!c.eb).|" [1 rep|
|00002260| 65 61 74 2d 63 6f 6d 70 | 6c 65 78 2d 63 6f 6d 6d |eat-comp|lex-comm|
|00002270| 61 6e 64 2d 61 72 67 20 | 6e 20 63 6f 6d 6d 61 6e |and-arg |n comman|
|00002280| 64 2d 68 69 73 74 6f 72 | 79 20 6e 61 72 67 20 65 |d-histor|y narg e|
|00002290| 72 72 6f 72 20 22 4e 6f | 20 66 6f 6c 6c 6f 77 69 |rror "No| followi|
|000022a0| 6e 67 20 69 74 65 6d 20 | 69 6e 20 63 6f 6d 6d 61 |ng item |in comma|
|000022b0| 6e 64 20 68 69 73 74 6f | 72 79 22 20 22 4e 6f 20 |nd histo|ry" "No |
|000022c0| 70 72 65 63 65 65 64 69 | 6e 67 20 69 74 65 6d 20 |preceedi|ng item |
|000022d0| 63 6f 6d 6d 61 6e 64 20 | 68 69 73 74 6f 72 79 22 |command |history"|
|000022e0| 20 65 72 61 73 65 2d 62 | 75 66 66 65 72 20 70 72 | erase-b|uffer pr|
|000022f0| 69 6e 31 2d 74 6f 2d 73 | 74 72 69 6e 67 5d 20 33 |in1-to-s|tring] 3|
|00002300| 29 29 0a 28 64 65 66 75 | 6e 20 70 72 65 76 69 6f |)).(defu|n previo|
|00002310| 75 73 2d 63 6f 6d 70 6c | 65 78 2d 63 6f 6d 6d 61 |us-compl|ex-comma|
|00002320| 6e 64 20 28 6e 29 20 22 | 5c 0a 49 6e 73 65 72 74 |nd (n) "|\.Insert|
|00002330| 73 20 74 68 65 20 70 72 | 65 76 69 6f 75 73 20 65 |s the pr|evious e|
|00002340| 6c 65 6d 65 6e 74 20 6f | 66 20 60 63 6f 6d 6d 61 |lement o|f `comma|
|00002350| 6e 64 2d 68 69 73 74 6f | 72 79 27 20 69 6e 74 6f |nd-histo|ry' into|
|00002360| 20 74 68 65 20 6d 69 6e | 69 62 75 66 66 65 72 2e | the min|ibuffer.|
|00002370| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 20 22 |" (inter|active "|
|00002380| 70 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |p") (byt|e-code "|
|00002390| c0 09 5b 21 87 22 20 5b | 6e 65 78 74 2d 63 6f 6d |..[!." [|next-com|
|000023a0| 70 6c 65 78 2d 63 6f 6d | 6d 61 6e 64 20 6e 5d 20 |plex-com|mand n] |
|000023b0| 32 29 29 0a 28 64 65 66 | 75 6e 20 67 6f 74 6f 2d |2)).(def|un goto-|
|000023c0| 6c 69 6e 65 20 28 61 72 | 67 29 20 22 5c 0a 47 6f |line (ar|g) "\.Go|
|000023d0| 74 6f 20 6c 69 6e 65 20 | 41 52 47 2c 20 63 6f 75 |to line |ARG, cou|
|000023e0| 6e 74 69 6e 67 20 66 72 | 6f 6d 20 6c 69 6e 65 20 |nting fr|om line |
|000023f0| 31 20 61 74 20 62 65 67 | 69 6e 6e 69 6e 67 20 6f |1 at beg|inning o|
|00002400| 66 20 62 75 66 66 65 72 | 2e 22 20 28 69 6e 74 65 |f buffer|." (inte|
|00002410| 72 61 63 74 69 76 65 20 | 22 4e 47 6f 74 6f 20 6c |ractive |"NGoto l|
|00002420| 69 6e 65 3a 20 22 29 20 | 28 62 79 74 65 2d 63 6f |ine: ") |(byte-co|
|00002430| 64 65 20 22 8c c0 20 88 | c1 62 88 5c 6e c3 3d 83 |de ".. .|.b.\n.=.|
|00002440| 18 00 c4 c5 c6 c7 0e 08 | 53 24 82 1d 00 c9 0e 08 |........|S$......|
|00002450| 53 21 29 87 22 20 5b 77 | 69 64 65 6e 20 31 20 73 |S!)." [w|iden 1 s|
|00002460| 65 6c 65 63 74 69 76 65 | 2d 64 69 73 70 6c 61 79 |elective|-display|
|00002470| 20 74 20 72 65 2d 73 65 | 61 72 63 68 2d 66 6f 72 | t re-se|arch-for|
|00002480| 77 61 72 64 20 22 5b 5c | 6e 0d 5d 22 20 6e 69 6c |ward "[\|n.]" nil|
|00002490| 20 65 6e 64 20 61 72 67 | 20 66 6f 72 77 61 72 64 | end arg| forward|
|000024a0| 2d 6c 69 6e 65 5d 20 35 | 29 29 0a 28 66 73 65 74 |-line] 5|)).(fset|
|000024b0| 20 28 71 75 6f 74 65 20 | 61 64 76 65 72 74 69 73 | (quote |advertis|
|000024c0| 65 64 2d 75 6e 64 6f 29 | 20 28 71 75 6f 74 65 20 |ed-undo)| (quote |
|000024d0| 75 6e 64 6f 29 29 0a 28 | 64 65 66 75 6e 20 75 6e |undo)).(|defun un|
|000024e0| 64 6f 20 28 26 6f 70 74 | 69 6f 6e 61 6c 20 61 72 |do (&opt|ional ar|
|000024f0| 67 29 20 22 5c 0a 55 6e | 64 6f 20 73 6f 6d 65 20 |g) "\.Un|do some |
|00002500| 70 72 65 76 69 6f 75 73 | 20 63 68 61 6e 67 65 73 |previous| changes|
|00002510| 2e 0a 52 65 70 65 61 74 | 20 74 68 69 73 20 63 6f |..Repeat| this co|
|00002520| 6d 6d 61 6e 64 20 74 6f | 20 75 6e 64 6f 20 6d 6f |mmand to| undo mo|
|00002530| 72 65 20 63 68 61 6e 67 | 65 73 2e 0a 41 20 6e 75 |re chang|es..A nu|
|00002540| 6d 65 72 69 63 20 61 72 | 67 75 6d 65 6e 74 20 73 |meric ar|gument s|
|00002550| 65 72 76 65 73 20 61 73 | 20 61 20 72 65 70 65 61 |erves as| a repea|
|00002560| 74 20 63 6f 75 6e 74 2e | 22 20 28 69 6e 74 65 72 |t count.|" (inter|
|00002570| 61 63 74 69 76 65 20 22 | 2a 70 22 29 20 28 62 79 |active "|*p") (by|
|00002580| 74 65 2d 63 6f 64 65 20 | 22 c0 20 19 c2 20 c3 20 |te-code |". .. . |
|00002590| 3d 84 0f 00 c4 c5 21 88 | 0e 06 c7 3d 84 1d 00 c8 |=.....!.|...=....|
|000025a0| 20 88 c9 ca 21 88 c7 16 | 0b c9 0e 0c 86 27 00 ca | ...!...|.....'..|
|000025b0| 21 88 09 85 35 00 c0 20 | 3f 85 35 00 cd 20 29 87 |!...5.. |?.5.. ).|
|000025c0| 22 20 5b 62 75 66 66 65 | 72 2d 6d 6f 64 69 66 69 |" [buffe|r-modifi|
|000025d0| 65 64 2d 70 20 6d 6f 64 | 69 66 69 65 64 20 73 65 |ed-p mod|ified se|
|000025e0| 6c 65 63 74 65 64 2d 77 | 69 6e 64 6f 77 20 6d 69 |lected-w|indow mi|
|000025f0| 6e 69 62 75 66 66 65 72 | 2d 77 69 6e 64 6f 77 20 |nibuffer|-window |
|00002600| 6d 65 73 73 61 67 65 20 | 22 55 6e 64 6f 21 22 20 |message |"Undo!" |
|00002610| 6c 61 73 74 2d 63 6f 6d | 6d 61 6e 64 20 75 6e 64 |last-com|mand und|
|00002620| 6f 20 75 6e 64 6f 2d 73 | 74 61 72 74 20 75 6e 64 |o undo-s|tart und|
|00002630| 6f 2d 6d 6f 72 65 20 31 | 20 74 68 69 73 2d 63 6f |o-more 1| this-co|
|00002640| 6d 6d 61 6e 64 20 61 72 | 67 20 64 65 6c 65 74 65 |mmand ar|g delete|
|00002650| 2d 61 75 74 6f 2d 73 61 | 76 65 2d 66 69 6c 65 2d |-auto-sa|ve-file-|
|00002660| 69 66 2d 6e 65 63 65 73 | 73 61 72 79 5d 20 32 29 |if-neces|sary] 2)|
|00002670| 29 0a 28 64 65 66 75 6e | 20 73 68 65 6c 6c 2d 63 |).(defun| shell-c|
|00002680| 6f 6d 6d 61 6e 64 20 28 | 63 6f 6d 6d 61 6e 64 20 |ommand (|command |
|00002690| 26 6f 70 74 69 6f 6e 61 | 6c 20 66 6c 61 67 29 20 |&optiona|l flag) |
|000026a0| 22 5c 0a 45 78 65 63 75 | 74 65 20 73 74 72 69 6e |"\.Execu|te strin|
|000026b0| 67 20 43 4f 4d 4d 41 4e | 44 20 69 6e 20 69 6e 66 |g COMMAN|D in inf|
|000026c0| 65 72 69 6f 72 20 73 68 | 65 6c 6c 3b 20 64 69 73 |erior sh|ell; dis|
|000026d0| 70 6c 61 79 20 6f 75 74 | 70 75 74 2c 20 69 66 20 |play out|put, if |
|000026e0| 61 6e 79 2e 0a 4f 70 74 | 69 6f 6e 61 6c 20 73 65 |any..Opt|ional se|
|000026f0| 63 6f 6e 64 20 61 72 67 | 20 6e 6f 6e 2d 6e 69 6c |cond arg| non-nil|
|00002700| 20 28 70 72 65 66 69 78 | 20 61 72 67 2c 20 69 66 | (prefix| arg, if|
|00002710| 20 69 6e 74 65 72 61 63 | 74 69 76 65 29 0a 6d 65 | interac|tive).me|
|00002720| 61 6e 73 20 69 6e 73 65 | 72 74 20 6f 75 74 70 75 |ans inse|rt outpu|
|00002730| 74 20 69 6e 20 63 75 72 | 72 65 6e 74 20 62 75 66 |t in cur|rent buf|
|00002740| 66 65 72 20 61 66 74 65 | 72 20 70 6f 69 6e 74 20 |fer afte|r point |
|00002750| 28 6c 65 61 76 65 20 6d | 61 72 6b 20 61 66 74 65 |(leave m|ark afte|
|00002760| 72 20 69 74 29 2e 22 20 | 28 69 6e 74 65 72 61 63 |r it)." |(interac|
|00002770| 74 69 76 65 20 22 73 53 | 68 65 6c 6c 20 63 6f 6d |tive "sS|hell com|
|00002780| 6d 61 6e 64 3a 20 5c 6e | 50 22 29 20 28 62 79 74 |mand: \n|P") (byt|
|00002790| 65 2d 63 6f 64 65 20 22 | 08 83 18 00 c1 20 88 c2 |e-code "|..... ..|
|000027a0| 20 88 c3 0c c5 c6 c5 c7 | 0e 08 26 06 88 c9 20 87 | .......|..&... .|
|000027b0| ca 60 60 0e 08 c5 24 87 | 22 20 5b 66 6c 61 67 20 |.``...$.|" [flag |
|000027c0| 62 61 72 66 2d 69 66 2d | 62 75 66 66 65 72 2d 72 |barf-if-|buffer-r|
|000027d0| 65 61 64 2d 6f 6e 6c 79 | 20 70 75 73 68 2d 6d 61 |ead-only| push-ma|
|000027e0| 72 6b 20 63 61 6c 6c 2d | 70 72 6f 63 65 73 73 20 |rk call-|process |
|000027f0| 73 68 65 6c 6c 2d 66 69 | 6c 65 2d 6e 61 6d 65 20 |shell-fi|le-name |
|00002800| 6e 69 6c 20 74 20 22 2d | 63 22 20 63 6f 6d 6d 61 |nil t "-|c" comma|
|00002810| 6e 64 20 65 78 63 68 61 | 6e 67 65 2d 70 6f 69 6e |nd excha|nge-poin|
|00002820| 74 2d 61 6e 64 2d 6d 61 | 72 6b 20 73 68 65 6c 6c |t-and-ma|rk shell|
|00002830| 2d 63 6f 6d 6d 61 6e 64 | 2d 6f 6e 2d 72 65 67 69 |-command|-on-regi|
|00002840| 6f 6e 5d 20 37 29 29 0a | 28 64 65 66 75 6e 20 73 |on] 7)).|(defun s|
|00002850| 68 65 6c 6c 2d 63 6f 6d | 6d 61 6e 64 2d 6f 6e 2d |hell-com|mand-on-|
|00002860| 72 65 67 69 6f 6e 20 28 | 73 74 61 72 74 20 65 6e |region (|start en|
|00002870| 64 20 63 6f 6d 6d 61 6e | 64 20 26 6f 70 74 69 6f |d comman|d &optio|
|00002880| 6e 61 6c 20 66 6c 61 67 | 20 69 6e 74 65 72 61 63 |nal flag| interac|
|00002890| 74 69 76 65 29 20 22 5c | 0a 45 78 65 63 75 74 65 |tive) "\|.Execute|
|000028a0| 20 73 74 72 69 6e 67 20 | 43 4f 4d 4d 41 4e 44 20 | string |COMMAND |
|000028b0| 69 6e 20 69 6e 66 65 72 | 69 6f 72 20 73 68 65 6c |in infer|ior shel|
|000028c0| 6c 20 77 69 74 68 20 72 | 65 67 69 6f 6e 20 61 73 |l with r|egion as|
|000028d0| 20 69 6e 70 75 74 2e 0a | 4e 6f 72 6d 61 6c 6c 79 | input..|Normally|
|000028e0| 20 64 69 73 70 6c 61 79 | 20 6f 75 74 70 75 74 20 | display| output |
|000028f0| 28 69 66 20 61 6e 79 29 | 20 69 6e 20 74 65 6d 70 |(if any)| in temp|
|00002900| 20 62 75 66 66 65 72 3b | 0a 50 72 65 66 69 78 20 | buffer;|.Prefix |
|00002910| 61 72 67 20 6d 65 61 6e | 73 20 72 65 70 6c 61 63 |arg mean|s replac|
|00002920| 65 20 74 68 65 20 72 65 | 67 69 6f 6e 20 77 69 74 |e the re|gion wit|
|00002930| 68 20 69 74 2e 0a 4e 6f | 6e 69 6e 74 65 72 61 63 |h it..No|ninterac|
|00002940| 74 69 76 65 20 61 72 67 | 73 20 61 72 65 20 53 54 |tive arg|s are ST|
|00002950| 41 52 54 2c 20 45 4e 44 | 2c 20 43 4f 4d 4d 41 4e |ART, END|, COMMAN|
|00002960| 44 2c 20 46 4c 41 47 2e | 0a 4e 6f 6e 69 6e 74 65 |D, FLAG.|.Noninte|
|00002970| 72 61 63 74 69 76 65 6c | 79 20 46 4c 41 47 20 6d |ractivel|y FLAG m|
|00002980| 65 61 6e 73 20 69 6e 73 | 65 72 74 20 6f 75 74 70 |eans ins|ert outp|
|00002990| 75 74 20 69 6e 20 70 6c | 61 63 65 20 6f 66 20 74 |ut in pl|ace of t|
|000029a0| 65 78 74 20 66 72 6f 6d | 20 53 54 41 52 54 20 74 |ext from| START t|
|000029b0| 6f 20 45 4e 44 2c 0a 61 | 6e 64 20 70 75 74 20 70 |o END,.a|nd put p|
|000029c0| 6f 69 6e 74 20 61 74 20 | 74 68 65 20 65 6e 64 2c |oint at |the end,|
|000029d0| 20 62 75 74 20 64 6f 6e | 27 74 20 61 6c 74 65 72 | but don|'t alter|
|000029e0| 20 74 68 65 20 6d 61 72 | 6b 2e 22 20 28 69 6e 74 | the mar|k." (int|
|000029f0| 65 72 61 63 74 69 76 65 | 20 22 72 5c 6e 73 53 68 |eractive| "r\nsSh|
|00002a00| 65 6c 6c 20 63 6f 6d 6d | 61 6e 64 20 6f 6e 20 72 |ell comm|and on r|
|00002a10| 65 67 69 6f 6e 3a 20 5c | 6e 50 5c 6e 70 22 29 20 |egion: \|nP\np") |
|00002a20| 28 62 79 74 65 2d 63 6f | 64 65 20 22 08 83 30 00 |(byte-co|de "..0.|
|00002a30| 09 85 0c 00 60 c2 20 57 | 1b 09 83 14 00 c4 20 88 |....`. W|...... .|
|00002a40| c5 0e 06 0e 07 0e 08 c9 | 89 ca cb 0e 0c 26 08 88 |........|.....&..|
|00002a50| 09 85 2e 00 0b 85 2e 00 | cd 20 29 87 ce cf 21 89 |........|. )...!.|
|00002a60| 1e 10 70 3d 83 58 00 d1 | 0e 07 64 5c 22 88 d1 65 |..p=.X..|..d\"..e|
|00002a70| 0e 06 5c 22 88 c5 65 64 | 0e 08 c9 89 ca cb 0e 0c |..\"..ed|........|
|00002a80| 26 08 88 82 72 00 8a 0e | 10 71 88 d2 20 88 29 c5 |&...r...|.q.. .).|
|00002a90| 0e 06 0e 07 0e 08 ca 0e | 10 ca cb 0e 0c 26 08 88 |........|.....&..|
|00002aa0| 8a 0e 10 71 88 d3 20 d4 | 56 29 83 89 00 d5 d6 0e |...q.. .|V)......|
|00002ab0| 10 21 d7 5c 22 82 8c 00 | d8 d9 21 29 87 22 20 5b |.!.\"...|..!)." [|
|00002ac0| 66 6c 61 67 20 69 6e 74 | 65 72 61 63 74 69 76 65 |flag int|eractive|
|00002ad0| 20 6d 61 72 6b 20 73 77 | 61 70 20 70 75 73 68 2d | mark sw|ap push-|
|00002ae0| 6d 61 72 6b 20 63 61 6c | 6c 2d 70 72 6f 63 65 73 |mark cal|l-proces|
|00002af0| 73 2d 72 65 67 69 6f 6e | 20 73 74 61 72 74 20 65 |s-region| start e|
|00002b00| 6e 64 20 73 68 65 6c 6c | 2d 66 69 6c 65 2d 6e 61 |nd shell|-file-na|
|00002b10| 6d 65 20 74 20 6e 69 6c | 20 22 2d 63 22 20 63 6f |me t nil| "-c" co|
|00002b20| 6d 6d 61 6e 64 20 65 78 | 63 68 61 6e 67 65 2d 70 |mmand ex|change-p|
|00002b30| 6f 69 6e 74 2d 61 6e 64 | 2d 6d 61 72 6b 20 67 65 |oint-and|-mark ge|
|00002b40| 74 2d 62 75 66 66 65 72 | 2d 63 72 65 61 74 65 20 |t-buffer|-create |
|00002b50| 22 2a 53 68 65 6c 6c 20 | 43 6f 6d 6d 61 6e 64 20 |"*Shell |Command |
|00002b60| 4f 75 74 70 75 74 2a 22 | 20 62 75 66 66 65 72 20 |Output*"| buffer |
|00002b70| 64 65 6c 65 74 65 2d 72 | 65 67 69 6f 6e 20 65 72 |delete-r|egion er|
|00002b80| 61 73 65 2d 62 75 66 66 | 65 72 20 62 75 66 66 65 |ase-buff|er buffe|
|00002b90| 72 2d 73 69 7a 65 20 30 | 20 73 65 74 2d 77 69 6e |r-size 0| set-win|
|00002ba0| 64 6f 77 2d 73 74 61 72 | 74 20 64 69 73 70 6c 61 |dow-star|t displa|
|00002bb0| 79 2d 62 75 66 66 65 72 | 20 31 20 6d 65 73 73 61 |y-buffer| 1 messa|
|00002bc0| 67 65 20 22 28 53 68 65 | 6c 6c 20 63 6f 6d 6d 61 |ge "(She|ll comma|
|00002bd0| 6e 64 20 63 6f 6d 70 6c | 65 74 65 64 20 77 69 74 |nd compl|eted wit|
|00002be0| 68 20 6e 6f 20 6f 75 74 | 70 75 74 29 22 5d 20 31 |h no out|put)"] 1|
|00002bf0| 30 29 29 0a 28 64 65 66 | 75 6e 20 75 6e 69 76 65 |0)).(def|un unive|
|00002c00| 72 73 61 6c 2d 61 72 67 | 75 6d 65 6e 74 20 6e 69 |rsal-arg|ument ni|
|00002c10| 6c 20 22 5c 0a 42 65 67 | 69 6e 20 61 20 6e 75 6d |l "\.Beg|in a num|
|00002c20| 65 72 69 63 20 61 72 67 | 75 6d 65 6e 74 20 66 6f |eric arg|ument fo|
|00002c30| 72 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |r the fo|llowing |
|00002c40| 63 6f 6d 6d 61 6e 64 2e | 0a 44 69 67 69 74 73 20 |command.|.Digits |
|00002c50| 6f 72 20 6d 69 6e 75 73 | 20 73 69 67 6e 20 66 6f |or minus| sign fo|
|00002c60| 6c 6c 6f 77 69 6e 67 20 | 5c 5c 5b 75 6e 69 76 65 |llowing |\\[unive|
|00002c70| 72 73 61 6c 2d 61 72 67 | 75 6d 65 6e 74 5d 20 6d |rsal-arg|ument] m|
|00002c80| 61 6b 65 20 75 70 20 74 | 68 65 20 6e 75 6d 65 72 |ake up t|he numer|
|00002c90| 69 63 20 61 72 67 75 6d | 65 6e 74 2e 0a 5c 5c 5b |ic argum|ent..\\[|
|00002ca0| 75 6e 69 76 65 72 73 61 | 6c 2d 61 72 67 75 6d 65 |universa|l-argume|
|00002cb0| 6e 74 5d 20 66 6f 6c 6c | 6f 77 69 6e 67 20 74 68 |nt] foll|owing th|
|00002cc0| 65 20 64 69 67 69 74 73 | 20 6f 72 20 6d 69 6e 75 |e digits| or minu|
|00002cd0| 73 20 73 69 67 6e 20 65 | 6e 64 73 20 74 68 65 20 |s sign e|nds the |
|00002ce0| 61 72 67 75 6d 65 6e 74 | 2e 0a 5c 5c 5b 75 6e 69 |argument|..\\[uni|
|00002cf0| 76 65 72 73 61 6c 2d 61 | 72 67 75 6d 65 6e 74 5d |versal-a|rgument]|
|00002d00| 20 77 69 74 68 6f 75 74 | 20 64 69 67 69 74 73 20 | without| digits |
|00002d10| 6f 72 20 6d 69 6e 75 73 | 20 73 69 67 6e 20 70 72 |or minus| sign pr|
|00002d20| 6f 76 69 64 65 73 20 34 | 20 61 73 20 61 72 67 75 |ovides 4| as argu|
|00002d30| 6d 65 6e 74 2e 0a 52 65 | 70 65 61 74 69 6e 67 20 |ment..Re|peating |
|00002d40| 5c 5c 5b 75 6e 69 76 65 | 72 73 61 6c 2d 61 72 67 |\\[unive|rsal-arg|
|00002d50| 75 6d 65 6e 74 5d 20 77 | 69 74 68 6f 75 74 20 64 |ument] w|ithout d|
|00002d60| 69 67 69 74 73 20 6f 72 | 20 6d 69 6e 75 73 20 73 |igits or| minus s|
|00002d70| 69 67 6e 0a 20 6d 75 6c | 74 69 70 6c 69 65 73 20 |ign. mul|tiplies |
|00002d80| 74 68 65 20 61 72 67 75 | 6d 65 6e 74 20 62 79 20 |the argu|ment by |
|00002d90| 34 20 65 61 63 68 20 74 | 69 6d 65 2e 22 20 28 69 |4 each t|ime." (i|
|00002da0| 6e 74 65 72 61 63 74 69 | 76 65 20 6e 69 6c 29 20 |nteracti|ve nil) |
|00002db0| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c0 09 c2 1b |(byte-co|de "....|
|00002dc0| 1c 1d c6 20 89 13 0c 55 | 83 1b 00 c7 0d c0 5c 22 |... ...U|......\"|
|00002dd0| 15 c6 20 89 13 82 5c 6e | 00 c8 0b 0d c2 23 2b 87 |.. ...\n|.....#+.|
|00002de0| 22 20 5b 34 20 6c 61 73 | 74 2d 63 6f 6d 6d 61 6e |" [4 las|t-comman|
|00002df0| 64 2d 63 68 61 72 20 6e | 69 6c 20 63 68 61 72 20 |d-char n|il char |
|00002e00| 61 72 67 73 74 61 72 74 | 63 68 61 72 20 63 2d 75 |argstart|char c-u|
|00002e10| 20 72 65 61 64 2d 63 68 | 61 72 20 2a 20 70 72 65 | read-ch|ar * pre|
|00002e20| 66 69 78 2d 61 72 67 2d | 69 6e 74 65 72 6e 61 6c |fix-arg-|internal|
|00002e30| 5d 20 35 29 29 0a 28 66 | 73 65 74 20 28 71 75 6f |] 5)).(f|set (quo|
|00002e40| 74 65 20 70 72 65 66 69 | 78 2d 61 72 67 2d 69 6e |te prefi|x-arg-in|
|00002e50| 74 65 72 6e 61 6c 29 20 | 28 71 75 6f 74 65 20 28 |ternal) |(quote (|
|00002e60| 6c 61 6d 62 64 61 20 28 | 63 68 61 72 20 63 2d 75 |lambda (|char c-u|
|00002e70| 20 76 61 6c 75 65 29 20 | 28 62 79 74 65 2d 63 6f | value) |(byte-co|
|00002e80| 64 65 20 22 c0 19 c2 0b | 21 83 13 00 0b c4 57 83 |de "....|!.....W.|
|00002e90| 13 00 c5 11 0b 5b 13 0b | c6 3d 83 1d 00 c5 11 c7 |.....[..|.=......|
|00002ea0| 13 0e 08 c9 55 83 32 00 | 09 5b 11 c7 16 5c 6e cb |....U.2.|.[...\n.|
|00002eb0| 20 89 16 08 82 1f 00 0e | 08 cc 59 83 5f 00 0e 08 | .......|..Y._...|
|00002ec0| cd 58 83 5f 00 ce c2 0b | 21 83 4b 00 0b 82 4c 00 |.X._....|!.K...L.|
|00002ed0| c4 cf 5c 22 0e 08 cc 5a | 5c 5c 13 c7 16 5c 6e cb |..\"...Z|\\...\n.|
|00002ee0| 20 89 16 08 82 34 00 d0 | 0e 11 d2 c0 0e 08 5c 22 | ....4..|......\"|
|00002ef0| 5c 22 d3 3d 83 71 00 cb | 20 16 08 0e 5c 6e 83 7c |\".=.q..| ...\n.||
|00002f00| 00 0e 5c 6e 43 82 90 00 | c2 0b 21 83 89 00 ce 0b |..\nC...|..!.....|
|00002f10| 09 5c 22 82 90 00 09 c5 | 55 85 90 00 c6 16 14 0e |.\".....|U.......|
|00002f20| 08 89 16 15 29 87 22 20 | 5b 31 20 73 69 67 6e 20 |....)." |[1 sign |
|00002f30| 6e 75 6d 62 65 72 70 20 | 76 61 6c 75 65 20 30 20 |numberp |value 0 |
|00002f40| 2d 31 20 2d 20 6e 69 6c | 20 63 68 61 72 20 34 35 |-1 - nil| char 45|
|00002f50| 20 63 2d 75 20 72 65 61 | 64 2d 63 68 61 72 20 34 | c-u rea|d-char 4|
|00002f60| 38 20 35 37 20 2a 20 31 | 30 20 6c 6f 6f 6b 75 70 |8 57 * 1|0 lookup|
|00002f70| 2d 6b 65 79 20 67 6c 6f | 62 61 6c 2d 6d 61 70 20 |-key glo|bal-map |
|00002f80| 6d 61 6b 65 2d 73 74 72 | 69 6e 67 20 75 6e 69 76 |make-str|ing univ|
|00002f90| 65 72 73 61 6c 2d 61 72 | 67 75 6d 65 6e 74 20 70 |ersal-ar|gument p|
|00002fa0| 72 65 66 69 78 2d 61 72 | 67 20 75 6e 72 65 61 64 |refix-ar|g unread|
|00002fb0| 2d 63 6f 6d 6d 61 6e 64 | 2d 63 68 61 72 5d 20 36 |-command|-char] 6|
|00002fc0| 29 29 29 29 0a 28 64 65 | 66 75 6e 20 64 69 67 69 |)))).(de|fun digi|
|00002fd0| 74 2d 61 72 67 75 6d 65 | 6e 74 20 28 61 72 67 29 |t-argume|nt (arg)|
|00002fe0| 20 22 5c 0a 50 61 72 74 | 20 6f 66 20 74 68 65 20 | "\.Part| of the |
|00002ff0| 6e 75 6d 65 72 69 63 20 | 61 72 67 75 6d 65 6e 74 |numeric |argument|
|00003000| 20 66 6f 72 20 74 68 65 | 20 6e 65 78 74 20 63 6f | for the| next co|
|00003010| 6d 6d 61 6e 64 2e 0a 5c | 5c 5b 75 6e 69 76 65 72 |mmand..\|\[univer|
|00003020| 73 61 6c 2d 61 72 67 75 | 6d 65 6e 74 5d 20 66 6f |sal-argu|ment] fo|
|00003030| 6c 6c 6f 77 69 6e 67 20 | 64 69 67 69 74 73 20 6f |llowing |digits o|
|00003040| 72 20 6d 69 6e 75 73 20 | 73 69 67 6e 20 65 6e 64 |r minus |sign end|
|00003050| 73 20 74 68 65 20 61 72 | 67 75 6d 65 6e 74 2e 22 |s the ar|gument."|
|00003060| 20 28 69 6e 74 65 72 61 | 63 74 69 76 65 20 22 50 | (intera|ctive "P|
|00003070| 22 29 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 c0 |") (byte|-code ".|
|00003080| 09 c2 0b 23 87 22 20 5b | 70 72 65 66 69 78 2d 61 |...#." [|prefix-a|
|00003090| 72 67 2d 69 6e 74 65 72 | 6e 61 6c 20 6c 61 73 74 |rg-inter|nal last|
|000030a0| 2d 63 6f 6d 6d 61 6e 64 | 2d 63 68 61 72 20 6e 69 |-command|-char ni|
|000030b0| 6c 20 61 72 67 5d 20 34 | 29 29 0a 28 64 65 66 75 |l arg] 4|)).(defu|
|000030c0| 6e 20 6e 65 67 61 74 69 | 76 65 2d 61 72 67 75 6d |n negati|ve-argum|
|000030d0| 65 6e 74 20 28 61 72 67 | 29 20 22 5c 0a 42 65 67 |ent (arg|) "\.Beg|
|000030e0| 69 6e 20 61 20 6e 65 67 | 61 74 69 76 65 20 6e 75 |in a neg|ative nu|
|000030f0| 6d 65 72 69 63 20 61 72 | 67 75 6d 65 6e 74 20 66 |meric ar|gument f|
|00003100| 6f 72 20 74 68 65 20 6e | 65 78 74 20 63 6f 6d 6d |or the n|ext comm|
|00003110| 61 6e 64 2e 0a 5c 5c 5b | 75 6e 69 76 65 72 73 61 |and..\\[|universa|
|00003120| 6c 2d 61 72 67 75 6d 65 | 6e 74 5d 20 66 6f 6c 6c |l-argume|nt] foll|
|00003130| 6f 77 69 6e 67 20 64 69 | 67 69 74 73 20 6f 72 20 |owing di|gits or |
|00003140| 6d 69 6e 75 73 20 73 69 | 67 6e 20 65 6e 64 73 20 |minus si|gn ends |
|00003150| 74 68 65 20 61 72 67 75 | 6d 65 6e 74 2e 22 20 28 |the argu|ment." (|
|00003160| 69 6e 74 65 72 61 63 74 | 69 76 65 20 22 50 22 29 |interact|ive "P")|
|00003170| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c0 c1 c2 | (byte-c|ode "...|
|00003180| 0b 23 87 22 20 5b 70 72 | 65 66 69 78 2d 61 72 67 |.#." [pr|efix-arg|
|00003190| 2d 69 6e 74 65 72 6e 61 | 6c 20 34 35 20 6e 69 6c |-interna|l 45 nil|
|000031a0| 20 61 72 67 5d 20 34 29 | 29 0a 28 64 65 66 75 6e | arg] 4)|).(defun|
|000031b0| 20 66 6f 72 77 61 72 64 | 2d 74 6f 2d 69 6e 64 65 | forward|-to-inde|
|000031c0| 6e 74 61 74 69 6f 6e 20 | 28 61 72 67 29 20 22 5c |ntation |(arg) "\|
|000031d0| 0a 4d 6f 76 65 20 66 6f | 72 77 61 72 64 20 41 52 |.Move fo|rward AR|
|000031e0| 47 20 6c 69 6e 65 73 20 | 61 6e 64 20 70 6f 73 69 |G lines |and posi|
|000031f0| 74 69 6f 6e 20 61 74 20 | 66 69 72 73 74 20 6e 6f |tion at |first no|
|00003200| 6e 62 6c 61 6e 6b 20 63 | 68 61 72 61 63 74 65 72 |nblank c|haracter|
|00003210| 2e 22 20 28 69 6e 74 65 | 72 61 63 74 69 76 65 20 |." (inte|ractive |
|00003220| 22 70 22 29 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |"p") (by|te-code |
|00003230| 22 c0 09 21 88 c2 c3 21 | 87 22 20 5b 66 6f 72 77 |"..!...!|." [forw|
|00003240| 61 72 64 2d 6c 69 6e 65 | 20 61 72 67 20 73 6b 69 |ard-line| arg ski|
|00003250| 70 2d 63 68 61 72 73 2d | 66 6f 72 77 61 72 64 20 |p-chars-|forward |
|00003260| 22 20 09 22 5d 20 32 29 | 29 0a 28 64 65 66 75 6e |" ."] 2)|).(defun|
|00003270| 20 62 61 63 6b 77 61 72 | 64 2d 74 6f 2d 69 6e 64 | backwar|d-to-ind|
|00003280| 65 6e 74 61 74 69 6f 6e | 20 28 61 72 67 29 20 22 |entation| (arg) "|
|00003290| 5c 0a 4d 6f 76 65 20 62 | 61 63 6b 77 61 72 64 20 |\.Move b|ackward |
|000032a0| 41 52 47 20 6c 69 6e 65 | 73 20 61 6e 64 20 70 6f |ARG line|s and po|
|000032b0| 73 69 74 69 6f 6e 20 61 | 74 20 66 69 72 73 74 20 |sition a|t first |
|000032c0| 6e 6f 6e 62 6c 61 6e 6b | 20 63 68 61 72 61 63 74 |nonblank| charact|
|000032d0| 65 72 2e 22 20 28 69 6e | 74 65 72 61 63 74 69 76 |er." (in|teractiv|
|000032e0| 65 20 22 70 22 29 20 28 | 62 79 74 65 2d 63 6f 64 |e "p") (|byte-cod|
|000032f0| 65 20 22 c0 09 5b 21 88 | c2 c3 21 87 22 20 5b 66 |e "..[!.|..!." [f|
|00003300| 6f 72 77 61 72 64 2d 6c | 69 6e 65 20 61 72 67 20 |orward-l|ine arg |
|00003310| 73 6b 69 70 2d 63 68 61 | 72 73 2d 66 6f 72 77 61 |skip-cha|rs-forwa|
|00003320| 72 64 20 22 20 09 22 5d | 20 32 29 29 0a 28 64 65 |rd " ."]| 2)).(de|
|00003330| 66 75 6e 20 6b 69 6c 6c | 2d 6c 69 6e 65 20 28 26 |fun kill|-line (&|
|00003340| 6f 70 74 69 6f 6e 61 6c | 20 61 72 67 29 20 22 5c |optional| arg) "\|
|00003350| 0a 4b 69 6c 6c 20 74 68 | 65 20 72 65 73 74 20 6f |.Kill th|e rest o|
|00003360| 66 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 6c 69 |f the cu|rrent li|
|00003370| 6e 65 3b 20 69 66 20 6e | 6f 20 6e 6f 6e 62 6c 61 |ne; if n|o nonbla|
|00003380| 6e 6b 73 20 74 68 65 72 | 65 2c 20 6b 69 6c 6c 20 |nks ther|e, kill |
|00003390| 74 68 72 75 20 6e 65 77 | 6c 69 6e 65 2e 0a 57 69 |thru new|line..Wi|
|000033a0| 74 68 20 70 72 65 66 69 | 78 20 61 72 67 75 6d 65 |th prefi|x argume|
|000033b0| 6e 74 2c 20 6b 69 6c 6c | 20 74 68 61 74 20 6d 61 |nt, kill| that ma|
|000033c0| 6e 79 20 6c 69 6e 65 73 | 20 66 72 6f 6d 20 70 6f |ny lines| from po|
|000033d0| 69 6e 74 2e 0a 4e 65 67 | 61 74 69 76 65 20 61 72 |int..Neg|ative ar|
|000033e0| 67 75 6d 65 6e 74 73 20 | 6b 69 6c 6c 20 6c 69 6e |guments |kill lin|
|000033f0| 65 73 20 62 61 63 6b 77 | 61 72 64 2e 0a 0a 57 68 |es backw|ard...Wh|
|00003400| 65 6e 20 63 61 6c 6c 69 | 6e 67 20 66 72 6f 6d 20 |en calli|ng from |
|00003410| 61 20 70 72 6f 67 72 61 | 6d 2c 20 6e 69 6c 20 6d |a progra|m, nil m|
|00003420| 65 61 6e 73 20 5c 22 6e | 6f 20 61 72 67 5c 22 2c |eans \"n|o arg\",|
|00003430| 0a 61 20 6e 75 6d 62 65 | 72 20 63 6f 75 6e 74 73 |.a numbe|r counts|
|00003440| 20 61 73 20 61 20 70 72 | 65 66 69 78 20 61 72 67 | as a pr|efix arg|
|00003450| 2e 22 20 28 69 6e 74 65 | 72 61 63 74 69 76 65 20 |." (inte|ractive |
|00003460| 22 2a 50 22 29 20 28 62 | 79 74 65 2d 63 6f 64 65 |"*P") (b|yte-code|
|00003470| 20 22 c0 60 09 83 0f 00 | c2 c3 09 21 21 88 82 28 | ".`....|...!!..(|
|00003480| 00 6d 83 18 00 c4 c5 c6 | 5c 22 88 c7 c8 21 83 25 |.m......|\"...!.%|
|00003490| 00 c2 c9 21 88 82 28 00 | ca 20 88 60 5c 22 87 22 |...!..(.|. .`\"."|
|000034a0| 20 5b 6b 69 6c 6c 2d 72 | 65 67 69 6f 6e 20 61 72 | [kill-r|egion ar|
|000034b0| 67 20 66 6f 72 77 61 72 | 64 2d 6c 69 6e 65 20 70 |g forwar|d-line p|
|000034c0| 72 65 66 69 78 2d 6e 75 | 6d 65 72 69 63 2d 76 61 |refix-nu|meric-va|
|000034d0| 6c 75 65 20 73 69 67 6e | 61 6c 20 65 6e 64 2d 6f |lue sign|al end-o|
|000034e0| 66 2d 62 75 66 66 65 72 | 20 6e 69 6c 20 6c 6f 6f |f-buffer| nil loo|
|000034f0| 6b 69 6e 67 2d 61 74 20 | 22 5b 20 09 5d 2a 24 22 |king-at |"[ .]*$"|
|00003500| 20 31 20 65 6e 64 2d 6f | 66 2d 6c 69 6e 65 5d 20 | 1 end-o|f-line] |
|00003510| 35 29 29 0a 28 64 65 66 | 76 61 72 20 6b 69 6c 6c |5)).(def|var kill|
|00003520| 2d 72 69 6e 67 20 6e 69 | 6c 20 22 5c 0a 4c 69 73 |-ring ni|l "\.Lis|
|00003530| 74 20 6f 66 20 6b 69 6c | 6c 65 64 20 74 65 78 74 |t of kil|led text|
|00003540| 20 73 65 71 75 65 6e 63 | 65 73 2e 22 29 0a 28 64 | sequenc|es.").(d|
|00003550| 65 66 63 6f 6e 73 74 20 | 6b 69 6c 6c 2d 72 69 6e |efconst |kill-rin|
|00003560| 67 2d 6d 61 78 20 33 30 | 20 22 5c 0a 2a 4d 61 78 |g-max 30| "\.*Max|
|00003570| 69 6d 75 6d 20 6c 65 6e | 67 74 68 20 6f 66 20 6b |imum len|gth of k|
|00003580| 69 6c 6c 20 72 69 6e 67 | 20 62 65 66 6f 72 65 20 |ill ring| before |
|00003590| 6f 6c 64 65 73 74 20 65 | 6c 65 6d 65 6e 74 73 20 |oldest e|lements |
|000035a0| 61 72 65 20 74 68 72 6f | 77 6e 20 61 77 61 79 2e |are thro|wn away.|
|000035b0| 22 29 0a 28 64 65 66 76 | 61 72 20 6b 69 6c 6c 2d |").(defv|ar kill-|
|000035c0| 72 69 6e 67 2d 79 61 6e | 6b 2d 70 6f 69 6e 74 65 |ring-yan|k-pointe|
|000035d0| 72 20 6e 69 6c 20 22 5c | 0a 54 68 65 20 74 61 69 |r nil "\|.The tai|
|000035e0| 6c 20 6f 66 20 74 68 65 | 20 6b 69 6c 6c 20 72 69 |l of the| kill ri|
|000035f0| 6e 67 20 77 68 6f 73 65 | 20 63 61 72 20 69 73 20 |ng whose| car is |
|00003600| 74 68 65 20 6c 61 73 74 | 20 74 68 69 6e 67 20 79 |the last| thing y|
|00003610| 61 6e 6b 65 64 2e 22 29 | 0a 28 66 73 65 74 20 28 |anked.")|.(fset (|
|00003620| 71 75 6f 74 65 20 6b 69 | 6c 6c 2d 61 70 70 65 6e |quote ki|ll-appen|
|00003630| 64 29 20 28 71 75 6f 74 | 65 20 28 6c 61 6d 62 64 |d) (quot|e (lambd|
|00003640| 61 20 28 73 74 72 69 6e | 67 20 62 65 66 6f 72 65 |a (strin|g before|
|00003650| 2d 70 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |-p) (byt|e-code "|
|00003660| c0 09 5c 6e 83 0d 00 0b | 09 40 50 82 11 00 09 40 |..\n....|.@P....@|
|00003670| 0b 50 5c 22 87 22 20 5b | 73 65 74 63 61 72 20 6b |.P\"." [|setcar k|
|00003680| 69 6c 6c 2d 72 69 6e 67 | 20 62 65 66 6f 72 65 2d |ill-ring| before-|
|00003690| 70 20 73 74 72 69 6e 67 | 5d 20 34 29 29 29 29 0a |p string|] 4)))).|
|000036a0| 28 64 65 66 75 6e 20 6b | 69 6c 6c 2d 72 65 67 69 |(defun k|ill-regi|
|000036b0| 6f 6e 20 28 62 65 67 20 | 65 6e 64 29 20 22 5c 0a |on (beg |end) "\.|
|000036c0| 4b 69 6c 6c 20 62 65 74 | 77 65 65 6e 20 70 6f 69 |Kill bet|ween poi|
|000036d0| 6e 74 20 61 6e 64 20 6d | 61 72 6b 2e 0a 54 68 65 |nt and m|ark..The|
|000036e0| 20 74 65 78 74 20 69 73 | 20 64 65 6c 65 74 65 64 | text is| deleted|
|000036f0| 20 62 75 74 20 73 61 76 | 65 64 20 69 6e 20 74 68 | but sav|ed in th|
|00003700| 65 20 6b 69 6c 6c 20 72 | 69 6e 67 2e 0a 54 68 65 |e kill r|ing..The|
|00003710| 20 63 6f 6d 6d 61 6e 64 | 20 5c 5c 5b 79 61 6e 6b | command| \\[yank|
|00003720| 5d 20 63 61 6e 20 72 65 | 74 72 69 65 76 65 20 69 |] can re|trieve i|
|00003730| 74 20 66 72 6f 6d 20 74 | 68 65 72 65 2e 0a 28 49 |t from t|here..(I|
|00003740| 66 20 79 6f 75 20 77 61 | 6e 74 20 74 6f 20 6b 69 |f you wa|nt to ki|
|00003750| 6c 6c 20 61 6e 64 20 74 | 68 65 6e 20 79 61 6e 6b |ll and t|hen yank|
|00003760| 20 69 6d 6d 65 64 69 61 | 74 65 6c 79 2c 20 75 73 | immedia|tely, us|
|00003770| 65 20 5c 5c 5b 63 6f 70 | 79 2d 72 65 67 69 6f 6e |e \\[cop|y-region|
|00003780| 2d 61 73 2d 6b 69 6c 6c | 5d 2e 29 0a 0a 54 68 69 |-as-kill|].)..Thi|
|00003790| 73 20 69 73 20 74 68 65 | 20 70 72 69 6d 69 74 69 |s is the| primiti|
|000037a0| 76 65 20 66 6f 72 20 70 | 72 6f 67 72 61 6d 73 20 |ve for p|rograms |
|000037b0| 74 6f 20 6b 69 6c 6c 20 | 74 65 78 74 20 28 61 73 |to kill |text (as|
|000037c0| 20 6f 70 70 6f 73 65 64 | 20 74 6f 20 64 65 6c 65 | opposed| to dele|
|000037d0| 74 69 6e 67 20 69 74 29 | 2e 0a 53 75 70 70 6c 79 |ting it)|..Supply|
|000037e0| 20 74 77 6f 20 61 72 67 | 75 6d 65 6e 74 73 2c 20 | two arg|uments, |
|000037f0| 63 68 61 72 61 63 74 65 | 72 20 6e 75 6d 62 65 72 |characte|r number|
|00003800| 73 20 69 6e 64 69 63 61 | 74 69 6e 67 20 74 68 65 |s indica|ting the|
|00003810| 20 73 74 72 65 74 63 68 | 20 6f 66 20 74 65 78 74 | stretch| of text|
|00003820| 0a 20 74 6f 20 62 65 20 | 6b 69 6c 6c 65 64 2e 0a |. to be |killed..|
|00003830| 41 6e 79 20 63 6f 6d 6d | 61 6e 64 20 74 68 61 74 |Any comm|and that|
|00003840| 20 63 61 6c 6c 73 20 74 | 68 69 73 20 66 75 6e 63 | calls t|his func|
|00003850| 74 69 6f 6e 20 69 73 20 | 61 20 5c 22 6b 69 6c 6c |tion is |a \"kill|
|00003860| 20 63 6f 6d 6d 61 6e 64 | 5c 22 2e 0a 49 66 20 74 | command|\"..If t|
|00003870| 68 65 20 70 72 65 76 69 | 6f 75 73 20 63 6f 6d 6d |he previ|ous comm|
|00003880| 61 6e 64 20 77 61 73 20 | 61 6c 73 6f 20 61 20 6b |and was |also a k|
|00003890| 69 6c 6c 20 63 6f 6d 6d | 61 6e 64 2c 0a 74 68 65 |ill comm|and,.the|
|000038a0| 20 74 65 78 74 20 6b 69 | 6c 6c 65 64 20 74 68 69 | text ki|lled thi|
|000038b0| 73 20 74 69 6d 65 20 61 | 70 70 65 6e 64 73 20 74 |s time a|ppends t|
|000038c0| 6f 20 74 68 65 20 74 65 | 78 74 20 6b 69 6c 6c 65 |o the te|xt kille|
|000038d0| 64 20 6c 61 73 74 20 74 | 69 6d 65 0a 74 6f 20 6d |d last t|ime.to m|
|000038e0| 61 6b 65 20 6f 6e 65 20 | 65 6e 74 72 79 20 69 6e |ake one |entry in|
|000038f0| 20 74 68 65 20 6b 69 6c | 6c 20 72 69 6e 67 2e 22 | the kil|l ring."|
|00003900| 20 28 69 6e 74 65 72 61 | 63 74 69 76 65 20 22 2a | (intera|ctive "*|
|00003910| 72 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |r") (byt|e-code "|
|00003920| 08 c1 3d 84 4c 00 5c 6e | c3 3d 84 4c 00 0c 0d 3d |..=.L.\n|.=.L...=|
|00003930| 84 4c 00 0e 06 84 4c 00 | 0c 0d 5d 0c 0d 5e 5a c7 |.L....L.|..]..^Z.|
|00003940| 5c 5c 1e 08 c9 0c 0d 5c | 22 88 08 40 40 0e 5c 6e |\\.....\|"..@@.\n|
|00003950| 42 89 16 5c 6e 47 0e 0b | 56 83 42 00 cc cd 0e 0b |B..\nG..|V.B.....|
|00003960| 53 0e 5c 6e 5c 22 ce 5c | 22 88 c3 16 0f 0e 5c 6e |S.\n\".\|".....\n|
|00003970| 89 16 10 29 87 d1 0c 0d | 5c 22 88 c9 0c 0d 5c 22 |...)....|\"....\"|
|00003980| 87 22 20 5b 62 75 66 66 | 65 72 2d 75 6e 64 6f 2d |." [buff|er-undo-|
|00003990| 6c 69 73 74 20 74 20 6c | 61 73 74 2d 63 6f 6d 6d |list t l|ast-comm|
|000039a0| 61 6e 64 20 6b 69 6c 6c | 2d 72 65 67 69 6f 6e 20 |and kill|-region |
|000039b0| 62 65 67 20 65 6e 64 20 | 62 75 66 66 65 72 2d 72 |beg end |buffer-r|
|000039c0| 65 61 64 2d 6f 6e 6c 79 | 20 31 30 30 20 75 6e 64 |ead-only| 100 und|
|000039d0| 6f 2d 68 69 67 68 2d 74 | 68 72 65 73 68 6f 6c 64 |o-high-t|hreshold|
|000039e0| 20 64 65 6c 65 74 65 2d | 72 65 67 69 6f 6e 20 6b | delete-|region k|
|000039f0| 69 6c 6c 2d 72 69 6e 67 | 20 6b 69 6c 6c 2d 72 69 |ill-ring| kill-ri|
|00003a00| 6e 67 2d 6d 61 78 20 73 | 65 74 63 64 72 20 6e 74 |ng-max s|etcdr nt|
|00003a10| 68 63 64 72 20 6e 69 6c | 20 74 68 69 73 2d 63 6f |hcdr nil| this-co|
|00003a20| 6d 6d 61 6e 64 20 6b 69 | 6c 6c 2d 72 69 6e 67 2d |mmand ki|ll-ring-|
|00003a30| 79 61 6e 6b 2d 70 6f 69 | 6e 74 65 72 20 63 6f 70 |yank-poi|nter cop|
|00003a40| 79 2d 72 65 67 69 6f 6e | 2d 61 73 2d 6b 69 6c 6c |y-region|-as-kill|
|00003a50| 5d 20 35 29 29 0a 28 66 | 73 65 74 20 28 71 75 6f |] 5)).(f|set (quo|
|00003a60| 74 65 20 6b 69 6c 6c 2d | 72 69 6e 67 2d 73 61 76 |te kill-|ring-sav|
|00003a70| 65 29 20 28 71 75 6f 74 | 65 20 63 6f 70 79 2d 72 |e) (quot|e copy-r|
|00003a80| 65 67 69 6f 6e 2d 61 73 | 2d 6b 69 6c 6c 29 29 0a |egion-as|-kill)).|
|00003a90| 28 64 65 66 75 6e 20 63 | 6f 70 79 2d 72 65 67 69 |(defun c|opy-regi|
|00003aa0| 6f 6e 2d 61 73 2d 6b 69 | 6c 6c 20 28 62 65 67 20 |on-as-ki|ll (beg |
|00003ab0| 65 6e 64 29 20 22 5c 0a | 53 61 76 65 20 74 68 65 |end) "\.|Save the|
|00003ac0| 20 72 65 67 69 6f 6e 20 | 61 73 20 69 66 20 6b 69 | region |as if ki|
|00003ad0| 6c 6c 65 64 2c 20 62 75 | 74 20 64 6f 6e 27 74 20 |lled, bu|t don't |
|00003ae0| 6b 69 6c 6c 20 69 74 2e | 22 20 28 69 6e 74 65 72 |kill it.|" (inter|
|00003af0| 61 63 74 69 76 65 20 22 | 72 22 29 20 28 62 79 74 |active "|r") (byt|
|00003b00| 65 2d 63 6f 64 65 20 22 | 08 c1 3d 83 13 00 c2 c3 |e-code "|..=.....|
|00003b10| 0c 0d 5c 22 0d 0c 57 5c | 22 88 82 2f 00 c3 0c 0d |..\"..W\|"../....|
|00003b20| 5c 22 0e 06 42 89 16 06 | 47 0e 07 56 83 2f 00 c8 |\"..B...|G..V./..|
|00003b30| c9 0e 07 53 0e 06 5c 22 | ca 5c 22 88 c1 16 0b 0e |...S..\"|.\".....|
|00003b40| 06 89 16 0c 87 22 20 5b | 6c 61 73 74 2d 63 6f 6d |....." [|last-com|
|00003b50| 6d 61 6e 64 20 6b 69 6c | 6c 2d 72 65 67 69 6f 6e |mand kil|l-region|
|00003b60| 20 6b 69 6c 6c 2d 61 70 | 70 65 6e 64 20 62 75 66 | kill-ap|pend buf|
|00003b70| 66 65 72 2d 73 75 62 73 | 74 72 69 6e 67 20 62 65 |fer-subs|tring be|
|00003b80| 67 20 65 6e 64 20 6b 69 | 6c 6c 2d 72 69 6e 67 20 |g end ki|ll-ring |
|00003b90| 6b 69 6c 6c 2d 72 69 6e | 67 2d 6d 61 78 20 73 65 |kill-rin|g-max se|
|00003ba0| 74 63 64 72 20 6e 74 68 | 63 64 72 20 6e 69 6c 20 |tcdr nth|cdr nil |
|00003bb0| 74 68 69 73 2d 63 6f 6d | 6d 61 6e 64 20 6b 69 6c |this-com|mand kil|
|00003bc0| 6c 2d 72 69 6e 67 2d 79 | 61 6e 6b 2d 70 6f 69 6e |l-ring-y|ank-poin|
|00003bd0| 74 65 72 5d 20 35 29 29 | 0a 28 64 65 66 75 6e 20 |ter] 5))|.(defun |
|00003be0| 61 70 70 65 6e 64 2d 6e | 65 78 74 2d 6b 69 6c 6c |append-n|ext-kill|
|00003bf0| 20 6e 69 6c 20 22 5c 0a | 43 61 75 73 65 20 66 6f | nil "\.|Cause fo|
|00003c00| 6c 6c 6f 77 69 6e 67 20 | 63 6f 6d 6d 61 6e 64 2c |llowing |command,|
|00003c10| 20 69 66 20 6b 69 6c 6c | 2c 20 74 6f 20 61 70 70 | if kill|, to app|
|00003c20| 65 6e 64 20 74 6f 20 70 | 72 65 76 69 6f 75 73 20 |end to p|revious |
|00003c30| 6b 69 6c 6c 2e 22 20 28 | 69 6e 74 65 72 61 63 74 |kill." (|interact|
|00003c40| 69 76 65 29 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |ive) (by|te-code |
|00003c50| 22 74 83 08 00 c0 89 11 | 87 c0 89 12 87 22 20 5b |"t......|....." [|
|00003c60| 6b 69 6c 6c 2d 72 65 67 | 69 6f 6e 20 74 68 69 73 |kill-reg|ion this|
|00003c70| 2d 63 6f 6d 6d 61 6e 64 | 20 6c 61 73 74 2d 63 6f |-command| last-co|
|00003c80| 6d 6d 61 6e 64 5d 20 32 | 29 29 0a 28 64 65 66 75 |mmand] 2|)).(defu|
|00003c90| 6e 20 72 6f 74 61 74 65 | 2d 79 61 6e 6b 2d 70 6f |n rotate|-yank-po|
|00003ca0| 69 6e 74 65 72 20 28 61 | 72 67 29 20 22 5c 0a 52 |inter (a|rg) "\.R|
|00003cb0| 6f 74 61 74 65 20 74 68 | 65 20 79 61 6e 6b 69 6e |otate th|e yankin|
|00003cc0| 67 20 70 6f 69 6e 74 20 | 69 6e 20 74 68 65 20 6b |g point |in the k|
|00003cd0| 69 6c 6c 20 72 69 6e 67 | 2e 22 20 28 69 6e 74 65 |ill ring|." (inte|
|00003ce0| 72 61 63 74 69 76 65 20 | 22 70 22 29 20 28 62 79 |ractive |"p") (by|
|00003cf0| 74 65 2d 63 6f 64 65 20 | 22 08 47 89 19 c2 55 83 |te-code |".G...U.|
|00003d00| 0f 00 c3 c4 21 82 20 00 | c5 c6 0e 07 09 0e 08 47 |....!. .|.......G|
|00003d10| 5a 5c 5c 09 5c 22 08 5c | 22 89 16 08 29 87 22 20 |Z\\.\".\|"...)." |
|00003d20| 5b 6b 69 6c 6c 2d 72 69 | 6e 67 20 6c 65 6e 67 74 |[kill-ri|ng lengt|
|00003d30| 68 20 30 20 65 72 72 6f | 72 20 22 4b 69 6c 6c 20 |h 0 erro|r "Kill |
|00003d40| 72 69 6e 67 20 69 73 20 | 65 6d 70 74 79 22 20 6e |ring is |empty" n|
|00003d50| 74 68 63 64 72 20 25 20 | 61 72 67 20 6b 69 6c 6c |thcdr % |arg kill|
|00003d60| 2d 72 69 6e 67 2d 79 61 | 6e 6b 2d 70 6f 69 6e 74 |-ring-ya|nk-point|
|00003d70| 65 72 5d 20 36 29 29 0a | 28 64 65 66 75 6e 20 79 |er] 6)).|(defun y|
|00003d80| 61 6e 6b 2d 70 6f 70 20 | 28 61 72 67 29 20 22 5c |ank-pop |(arg) "\|
|00003d90| 0a 52 65 70 6c 61 63 65 | 20 6a 75 73 74 2d 79 61 |.Replace| just-ya|
|00003da0| 6e 6b 65 64 20 73 74 72 | 65 74 63 68 20 6f 66 20 |nked str|etch of |
|00003db0| 6b 69 6c 6c 65 64 2d 74 | 65 78 74 20 77 69 74 68 |killed-t|ext with|
|00003dc0| 20 61 20 64 69 66 66 65 | 72 65 6e 74 20 73 74 72 | a diffe|rent str|
|00003dd0| 65 74 63 68 2e 0a 54 68 | 69 73 20 63 6f 6d 6d 61 |etch..Th|is comma|
|00003de0| 6e 64 20 69 73 20 61 6c | 6c 6f 77 65 64 20 6f 6e |nd is al|lowed on|
|00003df0| 6c 79 20 69 6d 6d 65 64 | 69 61 74 65 6c 79 20 61 |ly immed|iately a|
|00003e00| 66 74 65 72 20 61 20 20 | 79 61 6e 6b 20 20 6f 72 |fter a |yank or|
|00003e10| 20 61 20 20 79 61 6e 6b | 2d 70 6f 70 2e 0a 41 74 | a yank|-pop..At|
|00003e20| 20 73 75 63 68 20 61 20 | 74 69 6d 65 2c 20 74 68 | such a |time, th|
|00003e30| 65 20 72 65 67 69 6f 6e | 20 63 6f 6e 74 61 69 6e |e region| contain|
|00003e40| 73 20 61 20 73 74 72 65 | 74 63 68 20 6f 66 20 72 |s a stre|tch of r|
|00003e50| 65 69 6e 73 65 72 74 65 | 64 0a 70 72 65 76 69 6f |einserte|d.previo|
|00003e60| 75 73 6c 79 2d 6b 69 6c | 6c 65 64 20 74 65 78 74 |usly-kil|led text|
|00003e70| 2e 20 20 79 61 6e 6b 2d | 70 6f 70 20 20 64 65 6c |. yank-|pop del|
|00003e80| 65 74 65 73 20 74 68 61 | 74 20 74 65 78 74 20 61 |etes tha|t text a|
|00003e90| 6e 64 20 69 6e 73 65 72 | 74 73 20 69 6e 20 69 74 |nd inser|ts in it|
|00003ea0| 73 0a 70 6c 61 63 65 20 | 61 20 64 69 66 66 65 72 |s.place |a differ|
|00003eb0| 65 6e 74 20 73 74 72 65 | 74 63 68 20 6f 66 20 6b |ent stre|tch of k|
|00003ec0| 69 6c 6c 65 64 20 74 65 | 78 74 2e 0a 0a 57 69 74 |illed te|xt...Wit|
|00003ed0| 68 20 6e 6f 20 61 72 67 | 75 6d 65 6e 74 2c 20 74 |h no arg|ument, t|
|00003ee0| 68 65 20 70 72 65 76 69 | 6f 75 73 20 6b 69 6c 6c |he previ|ous kill|
|00003ef0| 20 69 73 20 69 6e 73 65 | 72 74 65 64 2e 0a 57 69 | is inse|rted..Wi|
|00003f00| 74 68 20 61 72 67 75 6d | 65 6e 74 20 6e 2c 20 74 |th argum|ent n, t|
|00003f10| 68 65 20 6e 27 74 68 20 | 70 72 65 76 69 6f 75 73 |he n'th |previous|
|00003f20| 20 6b 69 6c 6c 20 69 73 | 20 69 6e 73 65 72 74 65 | kill is| inserte|
|00003f30| 64 2e 0a 49 66 20 6e 20 | 69 73 20 6e 65 67 61 74 |d..If n |is negat|
|00003f40| 69 76 65 2c 20 74 68 69 | 73 20 69 73 20 61 20 6d |ive, thi|s is a m|
|00003f50| 6f 72 65 20 72 65 63 65 | 6e 74 20 6b 69 6c 6c 2e |ore rece|nt kill.|
|00003f60| 0a 0a 54 68 65 20 73 65 | 71 75 65 6e 63 65 20 6f |..The se|quence o|
|00003f70| 66 20 6b 69 6c 6c 73 20 | 77 72 61 70 73 20 61 72 |f kills |wraps ar|
|00003f80| 6f 75 6e 64 2c 20 73 6f | 20 74 68 61 74 20 61 66 |ound, so| that af|
|00003f90| 74 65 72 20 74 68 65 20 | 6f 6c 64 65 73 74 20 6f |ter the |oldest o|
|00003fa0| 6e 65 0a 63 6f 6d 65 73 | 20 74 68 65 20 6e 65 77 |ne.comes| the new|
|00003fb0| 65 73 74 20 6f 6e 65 2e | 22 20 28 69 6e 74 65 72 |est one.|" (inter|
|00003fc0| 61 63 74 69 76 65 20 22 | 2a 70 22 29 20 28 62 79 |active "|*p") (by|
|00003fd0| 74 65 2d 63 6f 64 65 20 | 22 08 c1 3d 84 5c 6e 00 |te-code |"..=.\n.|
|00003fe0| c2 c3 21 88 c1 14 60 c5 | 20 57 1e 06 c7 60 c5 20 |..!...`.| W...`. |
|00003ff0| 5c 22 88 c8 0e 09 21 88 | ca 60 21 88 0e 0b 40 63 |\"....!.|.`!...@c|
|00004000| 88 0e 06 85 2d 00 cc 20 | 29 87 22 20 5b 6c 61 73 |....-.. |)." [las|
|00004010| 74 2d 63 6f 6d 6d 61 6e | 64 20 79 61 6e 6b 20 65 |t-comman|d yank e|
|00004020| 72 72 6f 72 20 22 50 72 | 65 76 69 6f 75 73 20 63 |rror "Pr|evious c|
|00004030| 6f 6d 6d 61 6e 64 20 77 | 61 73 20 6e 6f 74 20 61 |ommand w|as not a|
|00004040| 20 79 61 6e 6b 22 20 74 | 68 69 73 2d 63 6f 6d 6d | yank" t|his-comm|
|00004050| 61 6e 64 20 6d 61 72 6b | 20 62 65 66 6f 72 65 20 |and mark| before |
|00004060| 64 65 6c 65 74 65 2d 72 | 65 67 69 6f 6e 20 72 6f |delete-r|egion ro|
|00004070| 74 61 74 65 2d 79 61 6e | 6b 2d 70 6f 69 6e 74 65 |tate-yan|k-pointe|
|00004080| 72 20 61 72 67 20 73 65 | 74 2d 6d 61 72 6b 20 6b |r arg se|t-mark k|
|00004090| 69 6c 6c 2d 72 69 6e 67 | 2d 79 61 6e 6b 2d 70 6f |ill-ring|-yank-po|
|000040a0| 69 6e 74 65 72 20 65 78 | 63 68 61 6e 67 65 2d 70 |inter ex|change-p|
|000040b0| 6f 69 6e 74 2d 61 6e 64 | 2d 6d 61 72 6b 5d 20 33 |oint-and|-mark] 3|
|000040c0| 29 29 0a 28 64 65 66 75 | 6e 20 79 61 6e 6b 20 28 |)).(defu|n yank (|
|000040d0| 26 6f 70 74 69 6f 6e 61 | 6c 20 61 72 67 29 20 22 |&optiona|l arg) "|
|000040e0| 5c 0a 52 65 69 6e 73 65 | 72 74 20 74 68 65 20 6c |\.Reinse|rt the l|
|000040f0| 61 73 74 20 73 74 72 65 | 74 63 68 20 6f 66 20 6b |ast stre|tch of k|
|00004100| 69 6c 6c 65 64 20 74 65 | 78 74 2e 0a 4d 6f 72 65 |illed te|xt..More|
|00004110| 20 70 72 65 63 69 73 65 | 6c 79 2c 20 72 65 69 6e | precise|ly, rein|
|00004120| 73 65 72 74 20 74 68 65 | 20 73 74 72 65 74 63 68 |sert the| stretch|
|00004130| 20 6f 66 20 6b 69 6c 6c | 65 64 20 74 65 78 74 20 | of kill|ed text |
|00004140| 6d 6f 73 74 20 72 65 63 | 65 6e 74 6c 79 0a 6b 69 |most rec|ently.ki|
|00004150| 6c 6c 65 64 20 4f 52 20 | 79 61 6e 6b 65 64 2e 0a |lled OR |yanked..|
|00004160| 57 69 74 68 20 6a 75 73 | 74 20 43 2d 55 20 61 73 |With jus|t C-U as|
|00004170| 20 61 72 67 75 6d 65 6e | 74 2c 20 73 61 6d 65 20 | argumen|t, same |
|00004180| 62 75 74 20 70 75 74 20 | 70 6f 69 6e 74 20 69 6e |but put |point in|
|00004190| 20 66 72 6f 6e 74 20 28 | 61 6e 64 20 6d 61 72 6b | front (|and mark|
|000041a0| 20 61 74 20 65 6e 64 29 | 2e 0a 57 69 74 68 20 61 | at end)|..With a|
|000041b0| 72 67 75 6d 65 6e 74 20 | 6e 2c 20 72 65 69 6e 73 |rgument |n, reins|
|000041c0| 65 72 74 20 74 68 65 20 | 6e 74 68 20 6d 6f 73 74 |ert the |nth most|
|000041d0| 20 72 65 63 65 6e 74 6c | 79 20 6b 69 6c 6c 65 64 | recentl|y killed|
|000041e0| 20 73 74 72 65 74 63 68 | 20 6f 66 20 6b 69 6c 6c | stretch| of kill|
|000041f0| 65 64 0a 74 65 78 74 2e | 0a 53 65 65 20 61 6c 73 |ed.text.|.See als|
|00004200| 6f 20 74 68 65 20 63 6f | 6d 6d 61 6e 64 20 5c 5c |o the co|mmand \\|
|00004210| 5b 79 61 6e 6b 2d 70 6f | 70 5d 2e 22 20 28 69 6e |[yank-po|p]." (in|
|00004220| 74 65 72 61 63 74 69 76 | 65 20 22 2a 50 22 29 20 |teractiv|e "*P") |
|00004230| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c0 09 3c 83 |(byte-co|de "..<.|
|00004240| 5c 6e 00 c2 82 16 00 09 | c3 3d 83 14 00 c4 82 16 |\n......|.=......|
|00004250| 00 09 53 21 88 c5 60 21 | 88 0e 06 40 63 88 09 3a |..S!..`!|...@c..:|
|00004260| 85 28 00 c7 20 87 22 20 | 5b 72 6f 74 61 74 65 2d |.(.. ." |[rotate-|
|00004270| 79 61 6e 6b 2d 70 6f 69 | 6e 74 65 72 20 61 72 67 |yank-poi|nter arg|
|00004280| 20 30 20 2d 20 2d 31 20 | 70 75 73 68 2d 6d 61 72 | 0 - -1 |push-mar|
|00004290| 6b 20 6b 69 6c 6c 2d 72 | 69 6e 67 2d 79 61 6e 6b |k kill-r|ing-yank|
|000042a0| 2d 70 6f 69 6e 74 65 72 | 20 65 78 63 68 61 6e 67 |-pointer| exchang|
|000042b0| 65 2d 70 6f 69 6e 74 2d | 61 6e 64 2d 6d 61 72 6b |e-point-|and-mark|
|000042c0| 5d 20 33 29 29 0a 28 64 | 65 66 75 6e 20 69 6e 73 |] 3)).(d|efun ins|
|000042d0| 65 72 74 2d 62 75 66 66 | 65 72 20 28 62 75 66 66 |ert-buff|er (buff|
|000042e0| 65 72 29 20 22 5c 0a 49 | 6e 73 65 72 74 20 61 66 |er) "\.I|nsert af|
|000042f0| 74 65 72 20 70 6f 69 6e | 74 20 74 68 65 20 63 6f |ter poin|t the co|
|00004300| 6e 74 65 6e 74 73 20 6f | 66 20 42 55 46 46 45 52 |ntents o|f BUFFER|
|00004310| 2e 0a 50 75 74 73 20 6d | 61 72 6b 20 61 66 74 65 |..Puts m|ark afte|
|00004320| 72 20 74 68 65 20 69 6e | 73 65 72 74 65 64 20 74 |r the in|serted t|
|00004330| 65 78 74 2e 0a 42 55 46 | 46 45 52 20 6d 61 79 20 |ext..BUF|FER may |
|00004340| 62 65 20 61 20 62 75 66 | 66 65 72 20 6f 72 20 61 |be a buf|fer or a|
|00004350| 20 62 75 66 66 65 72 20 | 6e 61 6d 65 2e 22 20 28 | buffer |name." (|
|00004360| 69 6e 74 65 72 61 63 74 | 69 76 65 20 22 2a 62 49 |interact|ive "*bI|
|00004370| 6e 73 65 72 74 20 62 75 | 66 66 65 72 3a 20 22 29 |nsert bu|ffer: ")|
|00004380| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c0 09 21 | (byte-c|ode "..!|
|00004390| 84 5c 6e 00 c2 09 21 11 | c3 89 89 1c 1d 1e 06 8a |.\n...!.|........|
|000043a0| 8a 09 71 88 65 16 06 64 | 15 29 c7 09 0e 06 0d 23 |..q.e..d|.).....#|
|000043b0| 88 60 14 29 c8 0c 21 2b | 87 22 20 5b 62 75 66 66 |.`.)..!+|." [buff|
|000043c0| 65 72 70 20 62 75 66 66 | 65 72 20 67 65 74 2d 62 |erp buff|er get-b|
|000043d0| 75 66 66 65 72 20 6e 69 | 6c 20 6e 65 77 6d 61 72 |uffer ni|l newmar|
|000043e0| 6b 20 65 6e 64 20 73 74 | 61 72 74 20 69 6e 73 65 |k end st|art inse|
|000043f0| 72 74 2d 62 75 66 66 65 | 72 2d 73 75 62 73 74 72 |rt-buffe|r-substr|
|00004400| 69 6e 67 20 70 75 73 68 | 2d 6d 61 72 6b 5d 20 34 |ing push|-mark] 4|
|00004410| 29 29 0a 28 64 65 66 75 | 6e 20 61 70 70 65 6e 64 |)).(defu|n append|
|00004420| 2d 74 6f 2d 62 75 66 66 | 65 72 20 28 62 75 66 66 |-to-buff|er (buff|
|00004430| 65 72 20 73 74 61 72 74 | 20 65 6e 64 29 20 22 5c |er start| end) "\|
|00004440| 0a 41 70 70 65 6e 64 20 | 74 6f 20 73 70 65 63 69 |.Append |to speci|
|00004450| 66 69 65 64 20 62 75 66 | 66 65 72 20 74 68 65 20 |fied buf|fer the |
|00004460| 74 65 78 74 20 6f 66 20 | 74 68 65 20 72 65 67 69 |text of |the regi|
|00004470| 6f 6e 2e 0a 49 74 20 69 | 73 20 69 6e 73 65 72 74 |on..It i|s insert|
|00004480| 65 64 20 69 6e 74 6f 20 | 74 68 61 74 20 62 75 66 |ed into |that buf|
|00004490| 66 65 72 20 62 65 66 6f | 72 65 20 69 74 73 20 70 |fer befo|re its p|
|000044a0| 6f 69 6e 74 2e 0a 0a 57 | 68 65 6e 20 63 61 6c 6c |oint...W|hen call|
|000044b0| 69 6e 67 20 66 72 6f 6d | 20 61 20 70 72 6f 67 72 |ing from| a progr|
|000044c0| 61 6d 2c 20 67 69 76 65 | 20 74 68 72 65 65 20 61 |am, give| three a|
|000044d0| 72 67 75 6d 65 6e 74 73 | 3a 0a 61 20 62 75 66 66 |rguments|:.a buff|
|000044e0| 65 72 20 6f 72 20 74 68 | 65 20 6e 61 6d 65 20 6f |er or th|e name o|
|000044f0| 66 20 6f 6e 65 2c 20 61 | 6e 64 20 74 77 6f 20 63 |f one, a|nd two c|
|00004500| 68 61 72 61 63 74 65 72 | 20 6e 75 6d 62 65 72 73 |haracter| numbers|
|00004510| 0a 73 70 65 63 69 66 79 | 69 6e 67 20 74 68 65 20 |.specify|ing the |
|00004520| 70 6f 72 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 63 |portion |of the c|
|00004530| 75 72 72 65 6e 74 20 62 | 75 66 66 65 72 20 74 6f |urrent b|uffer to|
|00004540| 20 62 65 20 63 6f 70 69 | 65 64 2e 22 20 28 69 6e | be copi|ed." (in|
|00004550| 74 65 72 61 63 74 69 76 | 65 20 22 42 41 70 70 65 |teractiv|e "BAppe|
|00004560| 6e 64 20 74 6f 20 62 75 | 66 66 65 72 3a 20 5c 6e |nd to bu|ffer: \n|
|00004570| 72 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |r") (byt|e-code "|
|00004580| 70 18 8a c1 5c 6e 21 71 | 88 c3 08 0c 0d 23 2a 87 |p...\n!q|.....#*.|
|00004590| 22 20 5b 6f 6c 64 62 75 | 66 20 67 65 74 2d 62 75 |" [oldbu|f get-bu|
|000045a0| 66 66 65 72 2d 63 72 65 | 61 74 65 20 62 75 66 66 |ffer-cre|ate buff|
|000045b0| 65 72 20 69 6e 73 65 72 | 74 2d 62 75 66 66 65 72 |er inser|t-buffer|
|000045c0| 2d 73 75 62 73 74 72 69 | 6e 67 20 73 74 61 72 74 |-substri|ng start|
|000045d0| 20 65 6e 64 5d 20 34 29 | 29 0a 28 64 65 66 75 6e | end] 4)|).(defun|
|000045e0| 20 70 72 65 70 65 6e 64 | 2d 74 6f 2d 62 75 66 66 | prepend|-to-buff|
|000045f0| 65 72 20 28 62 75 66 66 | 65 72 20 73 74 61 72 74 |er (buff|er start|
|00004600| 20 65 6e 64 29 20 22 5c | 0a 50 72 65 70 65 6e 64 | end) "\|.Prepend|
|00004610| 20 74 6f 20 73 70 65 63 | 69 66 69 65 64 20 62 75 | to spec|ified bu|
|00004620| 66 66 65 72 20 74 68 65 | 20 74 65 78 74 20 6f 66 |ffer the| text of|
|00004630| 20 74 68 65 20 72 65 67 | 69 6f 6e 2e 0a 49 74 20 | the reg|ion..It |
|00004640| 69 73 20 69 6e 73 65 72 | 74 65 64 20 69 6e 74 6f |is inser|ted into|
|00004650| 20 74 68 61 74 20 62 75 | 66 66 65 72 20 61 66 74 | that bu|ffer aft|
|00004660| 65 72 20 69 74 73 20 70 | 6f 69 6e 74 2e 0a 0a 57 |er its p|oint...W|
|00004670| 68 65 6e 20 63 61 6c 6c | 69 6e 67 20 66 72 6f 6d |hen call|ing from|
|00004680| 20 61 20 70 72 6f 67 72 | 61 6d 2c 20 67 69 76 65 | a progr|am, give|
|00004690| 20 74 68 72 65 65 20 61 | 72 67 75 6d 65 6e 74 73 | three a|rguments|
|000046a0| 3a 0a 61 20 62 75 66 66 | 65 72 20 6f 72 20 74 68 |:.a buff|er or th|
|000046b0| 65 20 6e 61 6d 65 20 6f | 66 20 6f 6e 65 2c 20 61 |e name o|f one, a|
|000046c0| 6e 64 20 74 77 6f 20 63 | 68 61 72 61 63 74 65 72 |nd two c|haracter|
|000046d0| 20 6e 75 6d 62 65 72 73 | 0a 73 70 65 63 69 66 79 | numbers|.specify|
|000046e0| 69 6e 67 20 74 68 65 20 | 70 6f 72 74 69 6f 6e 20 |ing the |portion |
|000046f0| 6f 66 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 62 |of the c|urrent b|
|00004700| 75 66 66 65 72 20 74 6f | 20 62 65 20 63 6f 70 69 |uffer to| be copi|
|00004710| 65 64 2e 22 20 28 69 6e | 74 65 72 61 63 74 69 76 |ed." (in|teractiv|
|00004720| 65 20 22 42 50 72 65 70 | 65 6e 64 20 74 6f 20 62 |e "BPrep|end to b|
|00004730| 75 66 66 65 72 3a 20 5c | 6e 72 22 29 20 28 62 79 |uffer: \|nr") (by|
|00004740| 74 65 2d 63 6f 64 65 20 | 22 70 18 8a c1 5c 6e 21 |te-code |"p...\n!|
|00004750| 71 88 8a c3 08 0c 0d 23 | 2b 87 22 20 5b 6f 6c 64 |q......#|+." [old|
|00004760| 62 75 66 20 67 65 74 2d | 62 75 66 66 65 72 2d 63 |buf get-|buffer-c|
|00004770| 72 65 61 74 65 20 62 75 | 66 66 65 72 20 69 6e 73 |reate bu|ffer ins|
|00004780| 65 72 74 2d 62 75 66 66 | 65 72 2d 73 75 62 73 74 |ert-buff|er-subst|
|00004790| 72 69 6e 67 20 73 74 61 | 72 74 20 65 6e 64 5d 20 |ring sta|rt end] |
|000047a0| 34 29 29 0a 28 64 65 66 | 75 6e 20 63 6f 70 79 2d |4)).(def|un copy-|
|000047b0| 74 6f 2d 62 75 66 66 65 | 72 20 28 62 75 66 66 65 |to-buffe|r (buffe|
|000047c0| 72 20 73 74 61 72 74 20 | 65 6e 64 29 20 22 5c 0a |r start |end) "\.|
|000047d0| 43 6f 70 79 20 74 6f 20 | 73 70 65 63 69 66 69 65 |Copy to |specifie|
|000047e0| 64 20 62 75 66 66 65 72 | 20 74 68 65 20 74 65 78 |d buffer| the tex|
|000047f0| 74 20 6f 66 20 74 68 65 | 20 72 65 67 69 6f 6e 2e |t of the| region.|
|00004800| 0a 49 74 20 69 73 20 69 | 6e 73 65 72 74 65 64 20 |.It is i|nserted |
|00004810| 69 6e 74 6f 20 74 68 61 | 74 20 62 75 66 66 65 72 |into tha|t buffer|
|00004820| 2c 20 72 65 70 6c 61 63 | 69 6e 67 20 65 78 69 73 |, replac|ing exis|
|00004830| 74 69 6e 67 20 74 65 78 | 74 20 74 68 65 72 65 2e |ting tex|t there.|
|00004840| 0a 0a 57 68 65 6e 20 63 | 61 6c 6c 69 6e 67 20 66 |..When c|alling f|
|00004850| 72 6f 6d 20 61 20 70 72 | 6f 67 72 61 6d 2c 20 67 |rom a pr|ogram, g|
|00004860| 69 76 65 20 74 68 72 65 | 65 20 61 72 67 75 6d 65 |ive thre|e argume|
|00004870| 6e 74 73 3a 0a 61 20 62 | 75 66 66 65 72 20 6f 72 |nts:.a b|uffer or|
|00004880| 20 74 68 65 20 6e 61 6d | 65 20 6f 66 20 6f 6e 65 | the nam|e of one|
|00004890| 2c 20 61 6e 64 20 74 77 | 6f 20 63 68 61 72 61 63 |, and tw|o charac|
|000048a0| 74 65 72 20 6e 75 6d 62 | 65 72 73 0a 73 70 65 63 |ter numb|ers.spec|
|000048b0| 69 66 79 69 6e 67 20 74 | 68 65 20 70 6f 72 74 69 |ifying t|he porti|
|000048c0| 6f 6e 20 6f 66 20 74 68 | 65 20 63 75 72 72 65 6e |on of th|e curren|
|000048d0| 74 20 62 75 66 66 65 72 | 20 74 6f 20 62 65 20 63 |t buffer| to be c|
|000048e0| 6f 70 69 65 64 2e 22 20 | 28 69 6e 74 65 72 61 63 |opied." |(interac|
|000048f0| 74 69 76 65 20 22 42 43 | 6f 70 79 20 74 6f 20 62 |tive "BC|opy to b|
|00004900| 75 66 66 65 72 3a 20 5c | 6e 72 22 29 20 28 62 79 |uffer: \|nr") (by|
|00004910| 74 65 2d 63 6f 64 65 20 | 22 70 18 8a c1 5c 6e 21 |te-code |"p...\n!|
|00004920| 71 88 c3 20 88 8a c4 08 | 0d 0e 06 23 2b 87 22 20 |q.. ....|...#+." |
|00004930| 5b 6f 6c 64 62 75 66 20 | 67 65 74 2d 62 75 66 66 |[oldbuf |get-buff|
|00004940| 65 72 2d 63 72 65 61 74 | 65 20 62 75 66 66 65 72 |er-creat|e buffer|
|00004950| 20 65 72 61 73 65 2d 62 | 75 66 66 65 72 20 69 6e | erase-b|uffer in|
|00004960| 73 65 72 74 2d 62 75 66 | 66 65 72 2d 73 75 62 73 |sert-buf|fer-subs|
|00004970| 74 72 69 6e 67 20 73 74 | 61 72 74 20 65 6e 64 5d |tring st|art end]|
|00004980| 20 34 29 29 0a 28 64 65 | 66 75 6e 20 6d 61 72 6b | 4)).(de|fun mark|
|00004990| 20 6e 69 6c 20 22 5c 0a | 52 65 74 75 72 6e 20 74 | nil "\.|Return t|
|000049a0| 68 69 73 20 62 75 66 66 | 65 72 27 73 20 6d 61 72 |his buff|er's mar|
|000049b0| 6b 20 76 61 6c 75 65 20 | 61 73 20 69 6e 74 65 67 |k value |as integ|
|000049c0| 65 72 2c 20 6f 72 20 6e | 69 6c 20 69 66 20 6e 6f |er, or n|il if no|
|000049d0| 20 6d 61 72 6b 2e 0a 49 | 66 20 79 6f 75 20 61 72 | mark..I|f you ar|
|000049e0| 65 20 75 73 69 6e 67 20 | 74 68 69 73 20 69 6e 20 |e using |this in |
|000049f0| 61 6e 20 65 64 69 74 69 | 6e 67 20 63 6f 6d 6d 61 |an editi|ng comma|
|00004a00| 6e 64 2c 20 79 6f 75 20 | 61 72 65 20 6d 6f 73 74 |nd, you |are most|
|00004a10| 20 6c 69 6b 65 6c 79 20 | 6d 61 6b 69 6e 67 0a 61 | likely |making.a|
|00004a20| 20 6d 69 73 74 61 6b 65 | 3b 20 73 65 65 20 74 68 | mistake|; see th|
|00004a30| 65 20 64 6f 63 75 6d 65 | 6e 74 61 74 69 6f 6e 20 |e docume|ntation |
|00004a40| 6f 66 20 60 73 65 74 2d | 6d 61 72 6b 27 2e 22 20 |of `set-|mark'." |
|00004a50| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c0 c1 20 21 |(byte-co|de ".. !|
|00004a60| 87 22 20 5b 6d 61 72 6b | 65 72 2d 70 6f 73 69 74 |." [mark|er-posit|
|00004a70| 69 6f 6e 20 6d 61 72 6b | 2d 6d 61 72 6b 65 72 5d |ion mark|-marker]|
|00004a80| 20 32 29 29 0a 28 64 65 | 66 75 6e 20 73 65 74 2d | 2)).(de|fun set-|
|00004a90| 6d 61 72 6b 20 28 70 6f | 73 29 20 22 5c 0a 53 65 |mark (po|s) "\.Se|
|00004aa0| 74 20 74 68 69 73 20 62 | 75 66 66 65 72 27 73 20 |t this b|uffer's |
|00004ab0| 6d 61 72 6b 20 74 6f 20 | 50 4f 53 2e 20 20 44 6f |mark to |POS. Do|
|00004ac0| 6e 27 74 20 75 73 65 20 | 74 68 69 73 20 66 75 6e |n't use |this fun|
|00004ad0| 63 74 69 6f 6e 21 0a 54 | 68 61 74 20 69 73 20 74 |ction!.T|hat is t|
|00004ae0| 6f 20 73 61 79 2c 20 64 | 6f 6e 27 74 20 75 73 65 |o say, d|on't use|
|00004af0| 20 74 68 69 73 20 66 75 | 6e 63 74 69 6f 6e 20 75 | this fu|nction u|
|00004b00| 6e 6c 65 73 73 20 79 6f | 75 20 77 61 6e 74 0a 74 |nless yo|u want.t|
|00004b10| 68 65 20 75 73 65 72 20 | 74 6f 20 73 65 65 20 74 |he user |to see t|
|00004b20| 68 61 74 20 74 68 65 20 | 6d 61 72 6b 20 68 61 73 |hat the |mark has|
|00004b30| 20 6d 6f 76 65 64 2c 20 | 61 6e 64 20 79 6f 75 20 | moved, |and you |
|00004b40| 77 61 6e 74 20 74 68 65 | 20 70 72 65 76 69 6f 75 |want the| previou|
|00004b50| 73 0a 6d 61 72 6b 20 70 | 6f 73 69 74 69 6f 6e 20 |s.mark p|osition |
|00004b60| 74 6f 20 62 65 20 6c 6f | 73 74 2e 0a 0a 4e 6f 72 |to be lo|st...Nor|
|00004b70| 6d 61 6c 6c 79 2c 20 77 | 68 65 6e 20 61 20 6e 65 |mally, w|hen a ne|
|00004b80| 77 20 6d 61 72 6b 20 69 | 73 20 73 65 74 2c 20 74 |w mark i|s set, t|
|00004b90| 68 65 20 6f 6c 64 20 6f | 6e 65 20 73 68 6f 75 6c |he old o|ne shoul|
|00004ba0| 64 20 67 6f 20 6f 6e 20 | 74 68 65 20 73 74 61 63 |d go on |the stac|
|00004bb0| 6b 2e 0a 54 68 69 73 20 | 69 73 20 77 68 79 20 6d |k..This |is why m|
|00004bc0| 6f 73 74 20 61 70 70 6c | 69 63 61 74 69 6f 6e 73 |ost appl|ications|
|00004bd0| 20 73 68 6f 75 6c 64 20 | 75 73 65 20 70 75 73 68 | should |use push|
|00004be0| 2d 6d 61 72 6b 2c 20 6e | 6f 74 20 73 65 74 2d 6d |-mark, n|ot set-m|
|00004bf0| 61 72 6b 2e 0a 0a 4e 6f | 76 69 63 65 20 65 6d 61 |ark...No|vice ema|
|00004c00| 63 73 2d 6c 69 73 70 20 | 70 72 6f 67 72 61 6d 6d |cs-lisp |programm|
|00004c10| 65 72 73 20 6f 66 74 65 | 6e 20 74 72 79 20 74 6f |ers ofte|n try to|
|00004c20| 20 75 73 65 20 74 68 65 | 20 6d 61 72 6b 20 66 6f | use the| mark fo|
|00004c30| 72 20 74 68 65 20 77 72 | 6f 6e 67 0a 70 75 72 70 |r the wr|ong.purp|
|00004c40| 6f 73 65 73 2e 20 20 54 | 68 65 20 6d 61 72 6b 20 |oses. T|he mark |
|00004c50| 73 61 76 65 73 20 61 20 | 6c 6f 63 61 74 69 6f 6e |saves a |location|
|00004c60| 20 66 6f 72 20 74 68 65 | 20 75 73 65 72 27 73 20 | for the| user's |
|00004c70| 63 6f 6e 76 65 6e 69 65 | 6e 63 65 2e 0a 4d 6f 73 |convenie|nce..Mos|
|00004c80| 74 20 65 64 69 74 69 6e | 67 20 63 6f 6d 6d 61 6e |t editin|g comman|
|00004c90| 64 73 20 73 68 6f 75 6c | 64 20 6e 6f 74 20 61 6c |ds shoul|d not al|
|00004ca0| 74 65 72 20 74 68 65 20 | 6d 61 72 6b 2e 0a 54 6f |ter the |mark..To|
|00004cb0| 20 72 65 6d 65 6d 62 65 | 72 20 61 20 6c 6f 63 61 | remembe|r a loca|
|00004cc0| 74 69 6f 6e 20 66 6f 72 | 20 69 6e 74 65 72 6e 61 |tion for| interna|
|00004cd0| 6c 20 75 73 65 20 69 6e | 20 74 68 65 20 4c 69 73 |l use in| the Lis|
|00004ce0| 70 20 70 72 6f 67 72 61 | 6d 2c 0a 73 74 6f 72 65 |p progra|m,.store|
|00004cf0| 20 69 74 20 69 6e 20 61 | 20 4c 69 73 70 20 76 61 | it in a| Lisp va|
|00004d00| 72 69 61 62 6c 65 2e 20 | 20 45 78 61 6d 70 6c 65 |riable. | Example|
|00004d10| 3a 0a 0a 20 20 20 28 6c | 65 74 20 28 28 62 65 67 |:.. (l|et ((beg|
|00004d20| 20 28 70 6f 69 6e 74 29 | 29 29 20 28 66 6f 72 77 | (point)|)) (forw|
|00004d30| 61 72 64 2d 6c 69 6e 65 | 20 31 29 20 28 64 65 6c |ard-line| 1) (del|
|00004d40| 65 74 65 2d 72 65 67 69 | 6f 6e 20 62 65 67 20 28 |ete-regi|on beg (|
|00004d50| 70 6f 69 6e 74 29 29 29 | 2e 22 20 28 62 79 74 65 |point)))|." (byte|
|00004d60| 2d 63 6f 64 65 20 22 c0 | c1 20 5c 6e 70 23 87 22 |-code ".|. \np#."|
|00004d70| 20 5b 73 65 74 2d 6d 61 | 72 6b 65 72 20 6d 61 72 | [set-ma|rker mar|
|00004d80| 6b 2d 6d 61 72 6b 65 72 | 20 70 6f 73 5d 20 34 29 |k-marker| pos] 4)|
|00004d90| 29 0a 28 64 65 66 76 61 | 72 20 6d 61 72 6b 2d 72 |).(defva|r mark-r|
|00004da0| 69 6e 67 20 6e 69 6c 20 | 22 5c 0a 54 68 65 20 6c |ing nil |"\.The l|
|00004db0| 69 73 74 20 6f 66 20 73 | 61 76 65 64 20 66 6f 72 |ist of s|aved for|
|00004dc0| 6d 65 72 20 6d 61 72 6b | 73 20 6f 66 20 74 68 65 |mer mark|s of the|
|00004dd0| 20 63 75 72 72 65 6e 74 | 20 62 75 66 66 65 72 2c | current| buffer,|
|00004de0| 0a 6d 6f 73 74 20 72 65 | 63 65 6e 74 20 66 69 72 |.most re|cent fir|
|00004df0| 73 74 2e 22 29 0a 28 6d | 61 6b 65 2d 76 61 72 69 |st.").(m|ake-vari|
|00004e00| 61 62 6c 65 2d 62 75 66 | 66 65 72 2d 6c 6f 63 61 |able-buf|fer-loca|
|00004e10| 6c 20 28 71 75 6f 74 65 | 20 6d 61 72 6b 2d 72 69 |l (quote| mark-ri|
|00004e20| 6e 67 29 29 0a 28 64 65 | 66 63 6f 6e 73 74 20 6d |ng)).(de|fconst m|
|00004e30| 61 72 6b 2d 72 69 6e 67 | 2d 6d 61 78 20 31 36 20 |ark-ring|-max 16 |
|00004e40| 22 5c 0a 2a 4d 61 78 69 | 6d 75 6d 20 73 69 7a 65 |"\.*Maxi|mum size|
|00004e50| 20 6f 66 20 6d 61 72 6b | 20 72 69 6e 67 2e 20 20 | of mark| ring. |
|00004e60| 53 74 61 72 74 20 64 69 | 73 63 61 72 64 69 6e 67 |Start di|scarding|
|00004e70| 20 6f 66 66 20 65 6e 64 | 20 69 66 20 67 65 74 73 | off end| if gets|
|00004e80| 20 74 68 69 73 20 62 69 | 67 2e 22 29 0a 28 64 65 | this bi|g.").(de|
|00004e90| 66 75 6e 20 73 65 74 2d | 6d 61 72 6b 2d 63 6f 6d |fun set-|mark-com|
|00004ea0| 6d 61 6e 64 20 28 61 72 | 67 29 20 22 5c 0a 53 65 |mand (ar|g) "\.Se|
|00004eb0| 74 20 6d 61 72 6b 20 61 | 74 20 77 68 65 72 65 20 |t mark a|t where |
|00004ec0| 70 6f 69 6e 74 20 69 73 | 2c 20 6f 72 20 6a 75 6d |point is|, or jum|
|00004ed0| 70 20 74 6f 20 6d 61 72 | 6b 2e 0a 57 69 74 68 20 |p to mar|k..With |
|00004ee0| 6e 6f 20 70 72 65 66 69 | 78 20 61 72 67 75 6d 65 |no prefi|x argume|
|00004ef0| 6e 74 2c 20 73 65 74 20 | 6d 61 72 6b 2c 20 61 6e |nt, set |mark, an|
|00004f00| 64 20 70 75 73 68 20 70 | 72 65 76 69 6f 75 73 20 |d push p|revious |
|00004f10| 6d 61 72 6b 20 6f 6e 20 | 6d 61 72 6b 20 72 69 6e |mark on |mark rin|
|00004f20| 67 2e 0a 57 69 74 68 20 | 61 72 67 75 6d 65 6e 74 |g..With |argument|
|00004f30| 2c 20 6a 75 6d 70 20 74 | 6f 20 6d 61 72 6b 2c 20 |, jump t|o mark, |
|00004f40| 61 6e 64 20 70 6f 70 20 | 69 6e 74 6f 20 6d 61 72 |and pop |into mar|
|00004f50| 6b 20 6f 66 66 20 74 68 | 65 20 6d 61 72 6b 20 72 |k off th|e mark r|
|00004f60| 69 6e 67 2e 0a 0a 4e 6f | 76 69 63 65 20 65 6d 61 |ing...No|vice ema|
|00004f70| 63 73 2d 6c 69 73 70 20 | 70 72 6f 67 72 61 6d 6d |cs-lisp |programm|
|00004f80| 65 72 73 20 6f 66 74 65 | 6e 20 74 72 79 20 74 6f |ers ofte|n try to|
|00004f90| 20 75 73 65 20 74 68 65 | 20 6d 61 72 6b 20 66 6f | use the| mark fo|
|00004fa0| 72 20 74 68 65 20 77 72 | 6f 6e 67 0a 70 75 72 70 |r the wr|ong.purp|
|00004fb0| 6f 73 65 73 2e 20 20 53 | 65 65 20 74 68 65 20 64 |oses. S|ee the d|
|00004fc0| 6f 63 75 6d 65 6e 74 61 | 74 69 6f 6e 20 6f 66 20 |ocumenta|tion of |
|00004fd0| 60 73 65 74 2d 6d 61 72 | 6b 27 20 66 6f 72 20 6d |`set-mar|k' for m|
|00004fe0| 6f 72 65 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 2e |ore info|rmation.|
|00004ff0| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 20 22 |" (inter|active "|
|00005000| 50 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |P") (byt|e-code "|
|00005010| 08 84 07 00 c1 20 87 c2 | 20 84 10 00 c3 c4 21 87 |..... ..| .....!.|
|00005020| c2 20 62 88 c5 20 87 22 | 20 5b 61 72 67 20 70 75 |. b.. ."| [arg pu|
|00005030| 73 68 2d 6d 61 72 6b 20 | 6d 61 72 6b 20 65 72 72 |sh-mark |mark err|
|00005040| 6f 72 20 22 4e 6f 20 6d | 61 72 6b 20 73 65 74 20 |or "No m|ark set |
|00005050| 69 6e 20 74 68 69 73 20 | 62 75 66 66 65 72 22 20 |in this |buffer" |
|00005060| 70 6f 70 2d 6d 61 72 6b | 5d 20 32 29 29 0a 28 64 |pop-mark|] 2)).(d|
|00005070| 65 66 75 6e 20 70 75 73 | 68 2d 6d 61 72 6b 20 28 |efun pus|h-mark (|
|00005080| 26 6f 70 74 69 6f 6e 61 | 6c 20 6c 6f 63 61 74 69 |&optiona|l locati|
|00005090| 6f 6e 20 6e 6f 6d 73 67 | 29 20 22 5c 0a 53 65 74 |on nomsg|) "\.Set|
|000050a0| 20 6d 61 72 6b 20 61 74 | 20 4c 4f 43 41 54 49 4f | mark at| LOCATIO|
|000050b0| 4e 20 28 70 6f 69 6e 74 | 2c 20 62 79 20 64 65 66 |N (point|, by def|
|000050c0| 61 75 6c 74 29 20 61 6e | 64 20 70 75 73 68 20 6f |ault) an|d push o|
|000050d0| 6c 64 20 6d 61 72 6b 20 | 6f 6e 20 6d 61 72 6b 20 |ld mark |on mark |
|000050e0| 72 69 6e 67 2e 0a 44 69 | 73 70 6c 61 79 73 20 5c |ring..Di|splays \|
|000050f0| 22 4d 61 72 6b 20 73 65 | 74 5c 22 20 75 6e 6c 65 |"Mark se|t\" unle|
|00005100| 73 73 20 74 68 65 20 6f | 70 74 69 6f 6e 61 6c 20 |ss the o|ptional |
|00005110| 73 65 63 6f 6e 64 20 61 | 72 67 20 4e 4f 4d 53 47 |second a|rg NOMSG|
|00005120| 20 69 73 20 6e 6f 6e 2d | 6e 69 6c 2e 0a 0a 4e 6f | is non-|nil...No|
|00005130| 76 69 63 65 20 65 6d 61 | 63 73 2d 6c 69 73 70 20 |vice ema|cs-lisp |
|00005140| 70 72 6f 67 72 61 6d 6d | 65 72 73 20 6f 66 74 65 |programm|ers ofte|
|00005150| 6e 20 74 72 79 20 74 6f | 20 75 73 65 20 74 68 65 |n try to| use the|
|00005160| 20 6d 61 72 6b 20 66 6f | 72 20 74 68 65 20 77 72 | mark fo|r the wr|
|00005170| 6f 6e 67 0a 70 75 72 70 | 6f 73 65 73 2e 20 20 53 |ong.purp|oses. S|
|00005180| 65 65 20 74 68 65 20 64 | 6f 63 75 6d 65 6e 74 61 |ee the d|ocumenta|
|00005190| 74 69 6f 6e 20 6f 66 20 | 60 73 65 74 2d 6d 61 72 |tion of |`set-mar|
|000051a0| 6b 27 20 66 6f 72 20 6d | 6f 72 65 20 69 6e 66 6f |k' for m|ore info|
|000051b0| 72 6d 61 74 69 6f 6e 2e | 22 20 28 62 79 74 65 2d |rmation.|" (byte-|
|000051c0| 63 6f 64 65 20 22 c0 20 | 83 25 00 c1 c2 20 21 0b |code ". |.%... !.|
|000051d0| 42 89 13 47 0c 56 83 25 | 00 c5 c6 0c 0b 5c 22 40 |B..G.V.%|.....\"@|
|000051e0| c7 5c 22 88 c8 c6 0c 53 | 0b 5c 22 c7 5c 22 88 c9 |.\"....S|.\".\"..|
|000051f0| 0e 5c 6e 86 2c 00 60 21 | 88 0e 0b 86 42 00 0e 0c |.\n.,.`!|....B...|
|00005200| 86 42 00 cd 20 ce 56 86 | 42 00 cf d0 21 87 22 20 |.B.. .V.|B...!." |
|00005210| 5b 6d 61 72 6b 20 63 6f | 70 79 2d 6d 61 72 6b 65 |[mark co|py-marke|
|00005220| 72 20 6d 61 72 6b 2d 6d | 61 72 6b 65 72 20 6d 61 |r mark-m|arker ma|
|00005230| 72 6b 2d 72 69 6e 67 20 | 6d 61 72 6b 2d 72 69 6e |rk-ring |mark-rin|
|00005240| 67 2d 6d 61 78 20 6d 6f | 76 65 2d 6d 61 72 6b 65 |g-max mo|ve-marke|
|00005250| 72 20 6e 74 68 63 64 72 | 20 6e 69 6c 20 73 65 74 |r nthcdr| nil set|
|00005260| 63 64 72 20 73 65 74 2d | 6d 61 72 6b 20 6c 6f 63 |cdr set-|mark loc|
|00005270| 61 74 69 6f 6e 20 6e 6f | 6d 73 67 20 65 78 65 63 |ation no|msg exec|
|00005280| 75 74 69 6e 67 2d 6d 61 | 63 72 6f 20 6d 69 6e 69 |uting-ma|cro mini|
|00005290| 62 75 66 66 65 72 2d 64 | 65 70 74 68 20 30 20 6d |buffer-d|epth 0 m|
|000052a0| 65 73 73 61 67 65 20 22 | 4d 61 72 6b 20 73 65 74 |essage "|Mark set|
|000052b0| 22 5d 20 35 29 29 0a 28 | 64 65 66 75 6e 20 70 6f |"] 5)).(|defun po|
|000052c0| 70 2d 6d 61 72 6b 20 6e | 69 6c 20 22 5c 0a 50 6f |p-mark n|il "\.Po|
|000052d0| 70 20 6f 66 66 20 6d 61 | 72 6b 20 72 69 6e 67 20 |p off ma|rk ring |
|000052e0| 69 6e 74 6f 20 74 68 65 | 20 62 75 66 66 65 72 27 |into the| buffer'|
|000052f0| 73 20 61 63 74 75 61 6c | 20 6d 61 72 6b 2e 0a 44 |s actual| mark..D|
|00005300| 6f 65 73 20 6e 6f 74 20 | 73 65 74 20 70 6f 69 6e |oes not |set poin|
|00005310| 74 2e 20 20 44 6f 65 73 | 20 6e 6f 74 68 69 6e 67 |t. Does| nothing|
|00005320| 20 69 66 20 6d 61 72 6b | 20 72 69 6e 67 20 69 73 | if mark| ring is|
|00005330| 20 65 6d 70 74 79 2e 22 | 20 28 62 79 74 65 2d 63 | empty."| (byte-c|
|00005340| 6f 64 65 20 22 08 85 24 | 00 c1 08 c2 c3 20 21 43 |ode "..$|..... !C|
|00005350| 5c 22 10 c4 08 40 21 88 | c5 08 40 c6 5c 22 88 c7 |\"...@!.|..@.\"..|
|00005360| 20 84 20 00 c8 20 88 08 | 41 89 10 87 22 20 5b 6d | . .. ..|A..." [m|
|00005370| 61 72 6b 2d 72 69 6e 67 | 20 6e 63 6f 6e 63 20 63 |ark-ring| nconc c|
|00005380| 6f 70 79 2d 6d 61 72 6b | 65 72 20 6d 61 72 6b 2d |opy-mark|er mark-|
|00005390| 6d 61 72 6b 65 72 20 73 | 65 74 2d 6d 61 72 6b 20 |marker s|et-mark |
|000053a0| 6d 6f 76 65 2d 6d 61 72 | 6b 65 72 20 6e 69 6c 20 |move-mar|ker nil |
|000053b0| 6d 61 72 6b 20 64 69 6e | 67 5d 20 34 29 29 0a 28 |mark din|g] 4)).(|
|000053c0| 66 73 65 74 20 28 71 75 | 6f 74 65 20 65 78 63 68 |fset (qu|ote exch|
|000053d0| 61 6e 67 65 2d 64 6f 74 | 2d 61 6e 64 2d 6d 61 72 |ange-dot|-and-mar|
|000053e0| 6b 29 20 28 71 75 6f 74 | 65 20 65 78 63 68 61 6e |k) (quot|e exchan|
|000053f0| 67 65 2d 70 6f 69 6e 74 | 2d 61 6e 64 2d 6d 61 72 |ge-point|-and-mar|
|00005400| 6b 29 29 0a 28 64 65 66 | 75 6e 20 65 78 63 68 61 |k)).(def|un excha|
|00005410| 6e 67 65 2d 70 6f 69 6e | 74 2d 61 6e 64 2d 6d 61 |nge-poin|t-and-ma|
|00005420| 72 6b 20 6e 69 6c 20 22 | 5c 0a 50 75 74 20 74 68 |rk nil "|\.Put th|
|00005430| 65 20 6d 61 72 6b 20 77 | 68 65 72 65 20 70 6f 69 |e mark w|here poi|
|00005440| 6e 74 20 69 73 20 6e 6f | 77 2c 20 61 6e 64 20 70 |nt is no|w, and p|
|00005450| 6f 69 6e 74 20 77 68 65 | 72 65 20 74 68 65 20 6d |oint whe|re the m|
|00005460| 61 72 6b 20 69 73 20 6e | 6f 77 2e 22 20 28 69 6e |ark is n|ow." (in|
|00005470| 74 65 72 61 63 74 69 76 | 65 20 6e 69 6c 29 20 28 |teractiv|e nil) (|
|00005480| 62 79 74 65 2d 63 6f 64 | 65 20 22 c0 20 89 19 84 |byte-cod|e ". ...|
|00005490| 0b 00 c2 c3 21 88 c4 60 | 21 88 09 62 88 29 c5 87 |....!..`|!..b.)..|
|000054a0| 22 20 5b 6d 61 72 6b 20 | 6f 6d 61 72 6b 20 65 72 |" [mark |omark er|
|000054b0| 72 6f 72 20 22 4e 6f 20 | 6d 61 72 6b 20 73 65 74 |ror "No |mark set|
|000054c0| 20 69 6e 20 74 68 69 73 | 20 62 75 66 66 65 72 22 | in this| buffer"|
|000054d0| 20 73 65 74 2d 6d 61 72 | 6b 20 6e 69 6c 5d 20 33 | set-mar|k nil] 3|
|000054e0| 29 29 0a 28 64 65 66 75 | 6e 20 6e 65 78 74 2d 6c |)).(defu|n next-l|
|000054f0| 69 6e 65 20 28 61 72 67 | 29 20 22 5c 0a 4d 6f 76 |ine (arg|) "\.Mov|
|00005500| 65 20 63 75 72 73 6f 72 | 20 76 65 72 74 69 63 61 |e cursor| vertica|
|00005510| 6c 6c 79 20 64 6f 77 6e | 20 41 52 47 20 6c 69 6e |lly down| ARG lin|
|00005520| 65 73 2e 0a 49 66 20 74 | 68 65 72 65 20 69 73 20 |es..If t|here is |
|00005530| 6e 6f 20 63 68 61 72 61 | 63 74 65 72 20 69 6e 20 |no chara|cter in |
|00005540| 74 68 65 20 74 61 72 67 | 65 74 20 6c 69 6e 65 20 |the targ|et line |
|00005550| 65 78 61 63 74 6c 79 20 | 75 6e 64 65 72 20 74 68 |exactly |under th|
|00005560| 65 20 63 75 72 72 65 6e | 74 20 63 6f 6c 75 6d 6e |e curren|t column|
|00005570| 2c 0a 74 68 65 20 63 75 | 72 73 6f 72 20 69 73 20 |,.the cu|rsor is |
|00005580| 70 6f 73 69 74 69 6f 6e | 65 64 20 61 66 74 65 72 |position|ed after|
|00005590| 20 74 68 65 20 63 68 61 | 72 61 63 74 65 72 20 69 | the cha|racter i|
|000055a0| 6e 20 74 68 61 74 20 6c | 69 6e 65 20 77 68 69 63 |n that l|ine whic|
|000055b0| 68 20 73 70 61 6e 73 20 | 74 68 69 73 0a 63 6f 6c |h spans |this.col|
|000055c0| 75 6d 6e 2c 20 6f 72 20 | 61 74 20 74 68 65 20 65 |umn, or |at the e|
|000055d0| 6e 64 20 6f 66 20 74 68 | 65 20 6c 69 6e 65 20 69 |nd of th|e line i|
|000055e0| 66 20 69 74 20 69 73 20 | 6e 6f 74 20 6c 6f 6e 67 |f it is |not long|
|000055f0| 20 65 6e 6f 75 67 68 2e | 0a 49 66 20 74 68 65 72 | enough.|.If ther|
|00005600| 65 20 69 73 20 6e 6f 20 | 6c 69 6e 65 20 69 6e 20 |e is no |line in |
|00005610| 74 68 65 20 62 75 66 66 | 65 72 20 61 66 74 65 72 |the buff|er after|
|00005620| 20 74 68 69 73 20 6f 6e | 65 2c 0a 61 20 6e 65 77 | this on|e,.a new|
|00005630| 6c 69 6e 65 20 63 68 61 | 72 61 63 74 65 72 20 69 |line cha|racter i|
|00005640| 73 20 69 6e 73 65 72 74 | 65 64 20 74 6f 20 63 72 |s insert|ed to cr|
|00005650| 65 61 74 65 20 61 20 6c | 69 6e 65 0a 61 6e 64 20 |eate a l|ine.and |
|00005660| 74 68 65 20 63 75 72 73 | 6f 72 20 6d 6f 76 65 73 |the curs|or moves|
|00005670| 20 74 6f 20 74 68 61 74 | 20 6c 69 6e 65 2e 0a 0a | to that| line...|
|00005680| 54 68 65 20 63 6f 6d 6d | 61 6e 64 20 5c 5c 5b 73 |The comm|and \\[s|
|00005690| 65 74 2d 67 6f 61 6c 2d | 63 6f 6c 75 6d 6e 5d 20 |et-goal-|column] |
|000056a0| 63 61 6e 20 62 65 20 75 | 73 65 64 20 74 6f 20 63 |can be u|sed to c|
|000056b0| 72 65 61 74 65 0a 61 20 | 73 65 6d 69 70 65 72 6d |reate.a |semiperm|
|000056c0| 61 6e 65 6e 74 20 67 6f | 61 6c 20 63 6f 6c 75 6d |anent go|al colum|
|000056d0| 6e 20 74 6f 20 77 68 69 | 63 68 20 74 68 69 73 20 |n to whi|ch this |
|000056e0| 63 6f 6d 6d 61 6e 64 20 | 61 6c 77 61 79 73 20 6d |command |always m|
|000056f0| 6f 76 65 73 2e 0a 54 68 | 65 6e 20 69 74 20 64 6f |oves..Th|en it do|
|00005700| 65 73 20 6e 6f 74 20 74 | 72 79 20 74 6f 20 6d 6f |es not t|ry to mo|
|00005710| 76 65 20 76 65 72 74 69 | 63 61 6c 6c 79 2e 0a 0a |ve verti|cally...|
|00005720| 49 66 20 79 6f 75 20 61 | 72 65 20 74 68 69 6e 6b |If you a|re think|
|00005730| 69 6e 67 20 6f 66 20 75 | 73 69 6e 67 20 74 68 69 |ing of u|sing thi|
|00005740| 73 20 69 6e 20 61 20 4c | 69 73 70 20 70 72 6f 67 |s in a L|isp prog|
|00005750| 72 61 6d 2c 20 63 6f 6e | 73 69 64 65 72 0a 75 73 |ram, con|sider.us|
|00005760| 69 6e 67 20 60 66 6f 72 | 77 61 72 64 2d 6c 69 6e |ing `for|ward-lin|
|00005770| 65 27 20 69 6e 73 74 65 | 61 64 2e 20 20 49 74 20 |e' inste|ad. It |
|00005780| 69 73 20 75 73 75 61 6c | 6c 79 20 65 61 73 69 65 |is usual|ly easie|
|00005790| 72 20 74 6f 20 75 73 65 | 0a 61 6e 64 20 6d 6f 72 |r to use|.and mor|
|000057a0| 65 20 72 65 6c 69 61 62 | 6c 65 20 28 6e 6f 20 64 |e reliab|le (no d|
|000057b0| 65 70 65 6e 64 65 6e 63 | 65 20 6f 6e 20 67 6f 61 |ependenc|e on goa|
|000057c0| 6c 20 63 6f 6c 75 6d 6e | 2c 20 65 74 63 2e 29 2e |l column|, etc.).|
|000057d0| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 20 22 |" (inter|active "|
|000057e0| 70 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |p") (byt|e-code "|
|000057f0| 08 c1 55 83 29 00 60 1a | c3 c1 21 88 5c 6e 60 55 |..U.).`.|..!.\n`U|
|00005800| 84 18 00 68 c4 3d 84 1e | 00 c4 63 88 82 25 00 5c |...h.=..|..c..%.\|
|00005810| 6e 62 88 c5 08 21 88 29 | 82 2d 00 c5 08 21 88 c6 |nb...!.)|.-...!..|
|00005820| 87 22 20 5b 61 72 67 20 | 31 20 6f 70 6f 69 6e 74 |." [arg |1 opoint|
|00005830| 20 66 6f 72 77 61 72 64 | 2d 6c 69 6e 65 20 31 30 | forward|-line 10|
|00005840| 20 6e 65 78 74 2d 6c 69 | 6e 65 2d 69 6e 74 65 72 | next-li|ne-inter|
|00005850| 6e 61 6c 20 6e 69 6c 5d | 20 32 29 29 0a 28 64 65 |nal nil]| 2)).(de|
|00005860| 66 75 6e 20 70 72 65 76 | 69 6f 75 73 2d 6c 69 6e |fun prev|ious-lin|
|00005870| 65 20 28 61 72 67 29 20 | 22 5c 0a 4d 6f 76 65 20 |e (arg) |"\.Move |
|00005880| 63 75 72 73 6f 72 20 76 | 65 72 74 69 63 61 6c 6c |cursor v|erticall|
|00005890| 79 20 75 70 20 41 52 47 | 20 6c 69 6e 65 73 2e 0a |y up ARG| lines..|
|000058a0| 49 66 20 74 68 65 72 65 | 20 69 73 20 6e 6f 20 63 |If there| is no c|
|000058b0| 68 61 72 61 63 74 65 72 | 20 69 6e 20 74 68 65 20 |haracter| in the |
|000058c0| 74 61 72 67 65 74 20 6c | 69 6e 65 20 65 78 61 63 |target l|ine exac|
|000058d0| 74 6c 79 20 6f 76 65 72 | 20 74 68 65 20 63 75 72 |tly over| the cur|
|000058e0| 72 65 6e 74 20 63 6f 6c | 75 6d 6e 2c 0a 74 68 65 |rent col|umn,.the|
|000058f0| 20 63 75 72 73 6f 72 20 | 69 73 20 70 6f 73 69 74 | cursor |is posit|
|00005900| 69 6f 6e 65 64 20 61 66 | 74 65 72 20 74 68 65 20 |ioned af|ter the |
|00005910| 63 68 61 72 61 63 74 65 | 72 20 69 6e 20 74 68 61 |characte|r in tha|
|00005920| 74 20 6c 69 6e 65 20 77 | 68 69 63 68 20 73 70 61 |t line w|hich spa|
|00005930| 6e 73 20 74 68 69 73 0a | 63 6f 6c 75 6d 6e 2c 20 |ns this.|column, |
|00005940| 6f 72 20 61 74 20 74 68 | 65 20 65 6e 64 20 6f 66 |or at th|e end of|
|00005950| 20 74 68 65 20 6c 69 6e | 65 20 69 66 20 69 74 20 | the lin|e if it |
|00005960| 69 73 20 6e 6f 74 20 6c | 6f 6e 67 20 65 6e 6f 75 |is not l|ong enou|
|00005970| 67 68 2e 0a 0a 54 68 65 | 20 63 6f 6d 6d 61 6e 64 |gh...The| command|
|00005980| 20 5c 5c 5b 73 65 74 2d | 67 6f 61 6c 2d 63 6f 6c | \\[set-|goal-col|
|00005990| 75 6d 6e 5d 20 63 61 6e | 20 62 65 20 75 73 65 64 |umn] can| be used|
|000059a0| 20 74 6f 20 63 72 65 61 | 74 65 0a 61 20 73 65 6d | to crea|te.a sem|
|000059b0| 69 70 65 72 6d 61 6e 65 | 6e 74 20 67 6f 61 6c 20 |ipermane|nt goal |
|000059c0| 63 6f 6c 75 6d 6e 20 74 | 6f 20 77 68 69 63 68 20 |column t|o which |
|000059d0| 74 68 69 73 20 63 6f 6d | 6d 61 6e 64 20 61 6c 77 |this com|mand alw|
|000059e0| 61 79 73 20 6d 6f 76 65 | 73 2e 0a 54 68 65 6e 20 |ays move|s..Then |
|000059f0| 69 74 20 64 6f 65 73 20 | 6e 6f 74 20 74 72 79 20 |it does |not try |
|00005a00| 74 6f 20 6d 6f 76 65 20 | 76 65 72 74 69 63 61 6c |to move |vertical|
|00005a10| 6c 79 2e 0a 0a 49 66 20 | 79 6f 75 20 61 72 65 20 |ly...If |you are |
|00005a20| 74 68 69 6e 6b 69 6e 67 | 20 6f 66 20 75 73 69 6e |thinking| of usin|
|00005a30| 67 20 74 68 69 73 20 69 | 6e 20 61 20 4c 69 73 70 |g this i|n a Lisp|
|00005a40| 20 70 72 6f 67 72 61 6d | 2c 20 63 6f 6e 73 69 64 | program|, consid|
|00005a50| 65 72 20 75 73 69 6e 67 | 0a 60 66 6f 72 77 61 72 |er using|.`forwar|
|00005a60| 64 2d 6c 69 6e 65 27 20 | 77 69 74 68 20 6e 65 67 |d-line' |with neg|
|00005a70| 61 74 69 76 65 20 61 72 | 67 75 6d 65 6e 74 20 69 |ative ar|gument i|
|00005a80| 6e 73 74 65 61 64 2e 2e | 20 20 49 74 20 69 73 20 |nstead..| It is |
|00005a90| 75 73 75 61 6c 6c 79 20 | 65 61 73 69 65 72 0a 74 |usually |easier.t|
|00005aa0| 6f 20 75 73 65 20 61 6e | 64 20 6d 6f 72 65 20 72 |o use an|d more r|
|00005ab0| 65 6c 69 61 62 6c 65 20 | 28 6e 6f 20 64 65 70 65 |eliable |(no depe|
|00005ac0| 6e 64 65 6e 63 65 20 6f | 6e 20 67 6f 61 6c 20 63 |ndence o|n goal c|
|00005ad0| 6f 6c 75 6d 6e 2c 20 65 | 74 63 2e 29 2e 22 20 28 |olumn, e|tc.)." (|
|00005ae0| 69 6e 74 65 72 61 63 74 | 69 76 65 20 22 70 22 29 |interact|ive "p")|
|00005af0| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c0 09 5b | (byte-c|ode "..[|
|00005b00| 21 88 c2 87 22 20 5b 6e | 65 78 74 2d 6c 69 6e 65 |!..." [n|ext-line|
|00005b10| 2d 69 6e 74 65 72 6e 61 | 6c 20 61 72 67 20 6e 69 |-interna|l arg ni|
|00005b20| 6c 5d 20 32 29 29 0a 28 | 64 65 66 63 6f 6e 73 74 |l] 2)).(|defconst|
|00005b30| 20 74 72 61 63 6b 2d 65 | 6f 6c 20 6e 69 6c 20 22 | track-e|ol nil "|
|00005b40| 5c 0a 2a 4e 6f 6e 2d 6e | 69 6c 20 6d 65 61 6e 73 |\.*Non-n|il means|
|00005b50| 20 76 65 72 74 69 63 61 | 6c 20 6d 6f 74 69 6f 6e | vertica|l motion|
|00005b60| 20 73 74 61 72 74 69 6e | 67 20 61 74 20 74 68 65 | startin|g at the|
|00005b70| 20 65 6e 64 20 6f 66 20 | 61 20 6c 69 6e 65 20 73 | end of |a line s|
|00005b80| 68 6f 75 6c 64 20 6b 65 | 65 70 20 74 6f 20 65 6e |hould ke|ep to en|
|00005b90| 64 73 20 6f 66 20 6c 69 | 6e 65 73 2e 0a 54 68 69 |ds of li|nes..Thi|
|00005ba0| 73 20 6d 65 61 6e 73 20 | 6d 6f 76 69 6e 67 20 74 |s means |moving t|
|00005bb0| 6f 20 74 68 65 20 65 6e | 64 20 6f 66 20 65 61 63 |o the en|d of eac|
|00005bc0| 68 20 6c 69 6e 65 20 6d | 6f 76 65 64 20 6f 6e 74 |h line m|oved ont|
|00005bd0| 6f 2e 22 29 0a 28 64 65 | 66 76 61 72 20 67 6f 61 |o.").(de|fvar goa|
|00005be0| 6c 2d 63 6f 6c 75 6d 6e | 20 6e 69 6c 20 22 5c 0a |l-column| nil "\.|
|00005bf0| 2a 53 65 6d 69 70 65 72 | 6d 61 6e 65 6e 74 20 67 |*Semiper|manent g|
|00005c00| 6f 61 6c 20 63 6f 6c 75 | 6d 6e 20 66 6f 72 20 76 |oal colu|mn for v|
|00005c10| 65 72 74 69 63 61 6c 20 | 6d 6f 74 69 6f 6e 2c 20 |ertical |motion, |
|00005c20| 61 73 20 73 65 74 20 62 | 79 20 5c 5c 5b 73 65 74 |as set b|y \\[set|
|00005c30| 2d 67 6f 61 6c 2d 63 6f | 6c 75 6d 6e 5d 2c 20 6f |-goal-co|lumn], o|
|00005c40| 72 20 6e 69 6c 2e 22 29 | 0a 28 64 65 66 76 61 72 |r nil.")|.(defvar|
|00005c50| 20 74 65 6d 70 6f 72 61 | 72 79 2d 67 6f 61 6c 2d | tempora|ry-goal-|
|00005c60| 63 6f 6c 75 6d 6e 20 30 | 20 22 5c 0a 43 75 72 72 |column 0| "\.Curr|
|00005c70| 65 6e 74 20 67 6f 61 6c | 20 63 6f 6c 75 6d 6e 20 |ent goal| column |
|00005c80| 66 6f 72 20 76 65 72 74 | 69 63 61 6c 20 6d 6f 74 |for vert|ical mot|
|00005c90| 69 6f 6e 2e 0a 49 74 20 | 69 73 20 74 68 65 20 63 |ion..It |is the c|
|00005ca0| 6f 6c 75 6d 6e 20 77 68 | 65 72 65 20 70 6f 69 6e |olumn wh|ere poin|
|00005cb0| 74 20 77 61 73 20 61 74 | 20 74 68 65 20 73 74 61 |t was at| the sta|
|00005cc0| 72 74 20 6f 66 20 63 75 | 72 72 65 6e 74 20 72 75 |rt of cu|rrent ru|
|00005cd0| 6e 20 6f 66 20 76 65 72 | 74 69 63 61 6c 20 6d 6f |n of ver|tical mo|
|00005ce0| 74 69 6f 6e 20 63 6f 6d | 6d 61 6e 64 73 2e 22 29 |tion com|mands.")|
|00005cf0| 0a 28 66 73 65 74 20 28 | 71 75 6f 74 65 20 6e 65 |.(fset (|quote ne|
|00005d00| 78 74 2d 6c 69 6e 65 2d | 69 6e 74 65 72 6e 61 6c |xt-line-|internal|
|00005d10| 29 20 28 71 75 6f 74 65 | 20 28 6c 61 6d 62 64 61 |) (quote| (lambda|
|00005d20| 20 28 61 72 67 29 20 28 | 62 79 74 65 2d 63 6f 64 | (arg) (|byte-cod|
|00005d30| 65 20 22 08 c1 3d 84 1a | 00 08 c2 3d 84 1a 00 0b |e "..=..|...=....|
|00005d40| 83 18 00 6c 83 18 00 c4 | 82 19 00 69 15 c6 0e 07 |...l....|...i....|
|00005d50| 21 84 29 00 c8 0e 09 21 | 88 82 5d 00 0e 09 ca 56 |!.)....!|..]....V|
|00005d60| 83 45 00 cb cc 21 88 cd | ce 21 88 c8 cc 21 88 0e |.E...!..|.!...!..|
|00005d70| 09 53 89 16 09 82 2b 00 | 0e 09 ca 57 83 5d 00 cb |.S....+.|...W.]..|
|00005d80| ce 21 88 c8 ca 21 88 0e | 09 54 89 16 09 82 47 00 |.!...!..|.T....G.|
|00005d90| 0e 0f 86 63 00 0d c4 3d | 83 6e 00 d0 20 88 82 77 |...c...=|.n.. ..w|
|00005da0| 00 d1 0e 0f 86 75 00 0d | 21 88 d2 87 22 20 5b 6c |.....u..|!..." [l|
|00005db0| 61 73 74 2d 63 6f 6d 6d | 61 6e 64 20 6e 65 78 74 |ast-comm|and next|
|00005dc0| 2d 6c 69 6e 65 20 70 72 | 65 76 69 6f 75 73 2d 6c |-line pr|evious-l|
|00005dd0| 69 6e 65 20 74 72 61 63 | 6b 2d 65 6f 6c 20 74 20 |ine trac|k-eol t |
|00005de0| 74 65 6d 70 6f 72 61 72 | 79 2d 67 6f 61 6c 2d 63 |temporar|y-goal-c|
|00005df0| 6f 6c 75 6d 6e 20 69 6e | 74 65 67 65 72 70 20 73 |olumn in|tegerp s|
|00005e00| 65 6c 65 63 74 69 76 65 | 2d 64 69 73 70 6c 61 79 |elective|-display|
|00005e10| 20 66 6f 72 77 61 72 64 | 2d 6c 69 6e 65 20 61 72 | forward|-line ar|
|00005e20| 67 20 30 20 76 65 72 74 | 69 63 61 6c 2d 6d 6f 74 |g 0 vert|ical-mot|
|00005e30| 69 6f 6e 20 31 20 66 6f | 72 77 61 72 64 2d 63 68 |ion 1 fo|rward-ch|
|00005e40| 61 72 20 2d 31 20 67 6f | 61 6c 2d 63 6f 6c 75 6d |ar -1 go|al-colum|
|00005e50| 6e 20 65 6e 64 2d 6f 66 | 2d 6c 69 6e 65 20 6d 6f |n end-of|-line mo|
|00005e60| 76 65 2d 74 6f 2d 63 6f | 6c 75 6d 6e 20 6e 69 6c |ve-to-co|lumn nil|
|00005e70| 5d 20 33 29 29 29 29 0a | 28 64 65 66 75 6e 20 73 |] 3)))).|(defun s|
|00005e80| 65 74 2d 67 6f 61 6c 2d | 63 6f 6c 75 6d 6e 20 28 |et-goal-|column (|
|00005e90| 61 72 67 29 20 22 5c 0a | 53 65 74 20 74 68 65 20 |arg) "\.|Set the |
|00005ea0| 63 75 72 72 65 6e 74 20 | 68 6f 72 69 7a 6f 6e 74 |current |horizont|
|00005eb0| 61 6c 20 70 6f 73 69 74 | 69 6f 6e 20 61 73 20 61 |al posit|ion as a|
|00005ec0| 20 67 6f 61 6c 20 66 6f | 72 20 5c 5c 5b 6e 65 78 | goal fo|r \\[nex|
|00005ed0| 74 2d 6c 69 6e 65 5d 20 | 61 6e 64 20 5c 5c 5b 70 |t-line] |and \\[p|
|00005ee0| 72 65 76 69 6f 75 73 2d | 6c 69 6e 65 5d 2e 0a 54 |revious-|line]..T|
|00005ef0| 68 6f 73 65 20 63 6f 6d | 6d 61 6e 64 73 20 77 69 |hose com|mands wi|
|00005f00| 6c 6c 20 6d 6f 76 65 20 | 74 6f 20 74 68 69 73 20 |ll move |to this |
|00005f10| 70 6f 73 69 74 69 6f 6e | 20 69 6e 20 74 68 65 20 |position| in the |
|00005f20| 6c 69 6e 65 20 6d 6f 76 | 65 64 20 74 6f 0a 72 61 |line mov|ed to.ra|
|00005f30| 74 68 65 72 20 74 68 61 | 6e 20 74 72 79 69 6e 67 |ther tha|n trying|
|00005f40| 20 74 6f 20 6b 65 65 70 | 20 74 68 65 20 73 61 6d | to keep| the sam|
|00005f50| 65 20 68 6f 72 69 7a 6f | 6e 74 61 6c 20 70 6f 73 |e horizo|ntal pos|
|00005f60| 69 74 69 6f 6e 2e 0a 57 | 69 74 68 20 61 20 6e 6f |ition..W|ith a no|
|00005f70| 6e 2d 6e 69 6c 20 61 72 | 67 75 6d 65 6e 74 2c 20 |n-nil ar|gument, |
|00005f80| 63 6c 65 61 72 73 20 6f | 75 74 20 74 68 65 20 67 |clears o|ut the g|
|00005f90| 6f 61 6c 20 63 6f 6c 75 | 6d 6e 0a 73 6f 20 74 68 |oal colu|mn.so th|
|00005fa0| 61 74 20 5c 5c 5b 6e 65 | 78 74 2d 6c 69 6e 65 5d |at \\[ne|xt-line]|
|00005fb0| 20 61 6e 64 20 5c 5c 5b | 70 72 65 76 69 6f 75 73 | and \\[|previous|
|00005fc0| 2d 6c 69 6e 65 5d 20 72 | 65 73 75 6d 65 20 76 65 |-line] r|esume ve|
|00005fd0| 72 74 69 63 61 6c 20 6d | 6f 74 69 6f 6e 2e 22 20 |rtical m|otion." |
|00005fe0| 28 69 6e 74 65 72 61 63 | 74 69 76 65 20 22 50 22 |(interac|tive "P"|
|00005ff0| 29 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 08 83 |) (byte-|code "..|
|00006000| 0d 00 c1 12 c3 c4 21 88 | 82 16 00 69 12 c3 c5 c6 |......!.|...i....|
|00006010| 21 5c 6e 5c 22 88 c1 87 | 22 20 5b 61 72 67 20 6e |!\n\"...|" [arg n|
|00006020| 69 6c 20 67 6f 61 6c 2d | 63 6f 6c 75 6d 6e 20 6d |il goal-|column m|
|00006030| 65 73 73 61 67 65 20 22 | 4e 6f 20 67 6f 61 6c 20 |essage "|No goal |
|00006040| 63 6f 6c 75 6d 6e 22 20 | 73 75 62 73 74 69 74 75 |column" |substitu|
|00006050| 74 65 2d 63 6f 6d 6d 61 | 6e 64 2d 6b 65 79 73 20 |te-comma|nd-keys |
|00006060| 22 47 6f 61 6c 20 63 6f | 6c 75 6d 6e 20 25 64 20 |"Goal co|lumn %d |
|00006070| 28 75 73 65 20 5c 5c 5b | 73 65 74 2d 67 6f 61 6c |(use \\[|set-goal|
|00006080| 2d 63 6f 6c 75 6d 6e 5d | 20 77 69 74 68 20 61 6e |-column]| with an|
|00006090| 20 61 72 67 20 74 6f 20 | 75 6e 73 65 74 20 69 74 | arg to |unset it|
|000060a0| 29 22 5d 20 33 29 29 0a | 28 64 65 66 75 6e 20 74 |)"] 3)).|(defun t|
|000060b0| 72 61 6e 73 70 6f 73 65 | 2d 63 68 61 72 73 20 28 |ranspose|-chars (|
|000060c0| 61 72 67 29 20 22 5c 0a | 49 6e 74 65 72 63 68 61 |arg) "\.|Intercha|
|000060d0| 6e 67 65 20 63 68 61 72 | 61 63 74 65 72 73 20 61 |nge char|acters a|
|000060e0| 72 6f 75 6e 64 20 70 6f | 69 6e 74 2c 20 6d 6f 76 |round po|int, mov|
|000060f0| 69 6e 67 20 66 6f 72 77 | 61 72 64 20 6f 6e 65 20 |ing forw|ard one |
|00006100| 63 68 61 72 61 63 74 65 | 72 2e 0a 57 69 74 68 20 |characte|r..With |
|00006110| 70 72 65 66 69 78 20 61 | 72 67 20 41 52 47 2c 20 |prefix a|rg ARG, |
|00006120| 65 66 66 65 63 74 20 69 | 73 20 74 6f 20 74 61 6b |effect i|s to tak|
|00006130| 65 20 63 68 61 72 61 63 | 74 65 72 20 62 65 66 6f |e charac|ter befo|
|00006140| 72 65 20 70 6f 69 6e 74 | 0a 61 6e 64 20 64 72 61 |re point|.and dra|
|00006150| 67 20 69 74 20 66 6f 72 | 77 61 72 64 20 70 61 73 |g it for|ward pas|
|00006160| 74 20 41 52 47 20 6f 74 | 68 65 72 20 63 68 61 72 |t ARG ot|her char|
|00006170| 61 63 74 65 72 73 20 28 | 62 61 63 6b 77 61 72 64 |acters (|backward|
|00006180| 20 69 66 20 41 52 47 20 | 6e 65 67 61 74 69 76 65 | if ARG |negative|
|00006190| 29 2e 0a 49 66 20 6e 6f | 20 61 72 67 75 6d 65 6e |)..If no| argumen|
|000061a0| 74 20 61 6e 64 20 61 74 | 20 65 6e 64 20 6f 66 20 |t and at| end of |
|000061b0| 6c 69 6e 65 2c 20 74 68 | 65 20 70 72 65 76 69 6f |line, th|e previo|
|000061c0| 75 73 20 74 77 6f 20 63 | 68 61 72 73 20 61 72 65 |us two c|hars are|
|000061d0| 20 65 78 63 68 61 6e 67 | 65 64 2e 22 20 28 69 6e | exchang|ed." (in|
|000061e0| 74 65 72 61 63 74 69 76 | 65 20 22 2a 50 22 29 20 |teractiv|e "*P") |
|000061f0| 28 62 79 74 65 2d 63 6f | 64 65 20 22 08 84 0c 00 |(byte-co|de "....|
|00006200| 6c 83 0c 00 c1 c2 21 88 | c3 c1 c4 08 21 5c 22 87 |l.....!.|....!\".|
|00006210| 22 20 5b 61 72 67 20 66 | 6f 72 77 61 72 64 2d 63 |" [arg f|orward-c|
|00006220| 68 61 72 20 2d 31 20 74 | 72 61 6e 73 70 6f 73 65 |har -1 t|ranspose|
|00006230| 2d 73 75 62 72 20 70 72 | 65 66 69 78 2d 6e 75 6d |-subr pr|efix-num|
|00006240| 65 72 69 63 2d 76 61 6c | 75 65 5d 20 34 29 29 0a |eric-val|ue] 4)).|
|00006250| 28 64 65 66 75 6e 20 74 | 72 61 6e 73 70 6f 73 65 |(defun t|ranspose|
|00006260| 2d 77 6f 72 64 73 20 28 | 61 72 67 29 20 22 5c 0a |-words (|arg) "\.|
|00006270| 49 6e 74 65 72 63 68 61 | 6e 67 65 20 77 6f 72 64 |Intercha|nge word|
|00006280| 73 20 61 72 6f 75 6e 64 | 20 70 6f 69 6e 74 2c 20 |s around| point, |
|00006290| 6c 65 61 76 69 6e 67 20 | 70 6f 69 6e 74 20 61 74 |leaving |point at|
|000062a0| 20 65 6e 64 20 6f 66 20 | 74 68 65 6d 2e 0a 57 69 | end of |them..Wi|
|000062b0| 74 68 20 70 72 65 66 69 | 78 20 61 72 67 20 41 52 |th prefi|x arg AR|
|000062c0| 47 2c 20 65 66 66 65 63 | 74 20 69 73 20 74 6f 20 |G, effec|t is to |
|000062d0| 74 61 6b 65 20 77 6f 72 | 64 20 62 65 66 6f 72 65 |take wor|d before|
|000062e0| 20 6f 72 20 61 72 6f 75 | 6e 64 20 70 6f 69 6e 74 | or arou|nd point|
|000062f0| 0a 61 6e 64 20 64 72 61 | 67 20 69 74 20 66 6f 72 |.and dra|g it for|
|00006300| 77 61 72 64 20 70 61 73 | 74 20 41 52 47 20 6f 74 |ward pas|t ARG ot|
|00006310| 68 65 72 20 77 6f 72 64 | 73 20 28 62 61 63 6b 77 |her word|s (backw|
|00006320| 61 72 64 20 69 66 20 41 | 52 47 20 6e 65 67 61 74 |ard if A|RG negat|
|00006330| 69 76 65 29 2e 0a 49 66 | 20 41 52 47 20 69 73 20 |ive)..If| ARG is |
|00006340| 7a 65 72 6f 2c 20 74 68 | 65 20 77 6f 72 64 73 20 |zero, th|e words |
|00006350| 61 72 6f 75 6e 64 20 6f | 72 20 61 66 74 65 72 20 |around o|r after |
|00006360| 70 6f 69 6e 74 20 61 6e | 64 20 61 72 6f 75 6e 64 |point an|d around|
|00006370| 20 6f 72 20 61 66 74 65 | 72 20 6d 61 72 6b 0a 61 | or afte|r mark.a|
|00006380| 72 65 20 69 6e 74 65 72 | 63 68 61 6e 67 65 64 2e |re inter|changed.|
|00006390| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 20 22 |" (inter|active "|
|000063a0| 2a 70 22 29 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |*p") (by|te-code |
|000063b0| 22 c0 c1 5c 6e 5c 22 87 | 22 20 5b 74 72 61 6e 73 |"..\n\".|" [trans|
|000063c0| 70 6f 73 65 2d 73 75 62 | 72 20 66 6f 72 77 61 72 |pose-sub|r forwar|
|000063d0| 64 2d 77 6f 72 64 20 61 | 72 67 5d 20 33 29 29 0a |d-word a|rg] 3)).|
|000063e0| 28 64 65 66 75 6e 20 74 | 72 61 6e 73 70 6f 73 65 |(defun t|ranspose|
|000063f0| 2d 73 65 78 70 73 20 28 | 61 72 67 29 20 22 5c 0a |-sexps (|arg) "\.|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.