home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Source / GNU / emacs / lisp / sort.elc < prev    next >
Emacs Compiled Lisp  |  1991-01-09  |  8.7 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

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

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) magic Unsupported
100% file Emacs v18 byte-compiled Lisp data default
99% file data default
100% gt2 Kopftext: '(provide (quote sort)) default (weak)
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime text/x-emacs-lisp default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 0a 28 70 72 6f 76 69 64 | 65 20 28 71 75 6f 74 65 |.(provid|e (quote|
|00000010| 20 73 6f 72 74 29 29 0a | 0a 28 64 65 66 75 6e 20 | sort)).|.(defun |
|00000020| 73 6f 72 74 2d 73 75 62 | 72 20 28 72 65 76 65 72 |sort-sub|r (rever|
|00000030| 73 65 20 6e 65 78 74 72 | 65 63 66 75 6e 20 65 6e |se nextr|ecfun en|
|00000040| 64 72 65 63 66 75 6e 20 | 26 6f 70 74 69 6f 6e 61 |drecfun |&optiona|
|00000050| 6c 20 73 74 61 72 74 6b | 65 79 66 75 6e 20 65 6e |l startk|eyfun en|
|00000060| 64 6b 65 79 66 75 6e 29 | 20 22 5c 0a 47 65 6e 65 |dkeyfun)| "\.Gene|
|00000070| 72 61 6c 20 74 65 78 74 | 20 73 6f 72 74 69 6e 67 |ral text| sorting|
|00000080| 20 72 6f 75 74 69 6e 65 | 20 74 6f 20 64 69 76 69 | routine| to divi|
|00000090| 64 65 20 62 75 66 66 65 | 72 20 69 6e 74 6f 20 72 |de buffe|r into r|
|000000a0| 65 63 6f 72 64 73 20 61 | 6e 64 20 73 6f 72 74 20 |ecords a|nd sort |
|000000b0| 74 68 65 6d 2e 0a 41 72 | 67 75 6d 65 6e 74 73 20 |them..Ar|guments |
|000000c0| 61 72 65 20 52 45 56 45 | 52 53 45 20 4e 45 58 54 |are REVE|RSE NEXT|
|000000d0| 52 45 43 46 55 4e 20 45 | 4e 44 52 45 43 46 55 4e |RECFUN E|NDRECFUN|
|000000e0| 20 26 6f 70 74 69 6f 6e | 61 6c 20 53 54 41 52 54 | &option|al START|
|000000f0| 4b 45 59 46 55 4e 20 45 | 4e 44 4b 45 59 46 55 4e |KEYFUN E|NDKEYFUN|
|00000100| 2e 0a 0a 57 65 20 63 6f | 6e 73 69 64 65 72 20 74 |...We co|nsider t|
|00000110| 68 69 73 20 70 6f 72 74 | 69 6f 6e 20 6f 66 20 74 |his port|ion of t|
|00000120| 68 65 20 62 75 66 66 65 | 72 20 74 6f 20 62 65 20 |he buffe|r to be |
|00000130| 64 69 76 69 64 65 64 20 | 69 6e 74 6f 20 64 69 73 |divided |into dis|
|00000140| 6a 6f 69 6e 74 20 70 69 | 65 63 65 73 0a 63 61 6c |joint pi|eces.cal|
|00000150| 6c 65 64 20 73 6f 72 74 | 20 72 65 63 6f 72 64 73 |led sort| records|
|00000160| 2e 20 20 41 20 70 6f 72 | 74 69 6f 6e 20 6f 66 20 |. A por|tion of |
|00000170| 65 61 63 68 20 73 6f 72 | 74 20 72 65 63 6f 72 64 |each sor|t record|
|00000180| 20 28 70 65 72 68 61 70 | 73 20 61 6c 6c 20 6f 66 | (perhap|s all of|
|00000190| 20 69 74 29 0a 69 73 20 | 64 65 73 69 67 6e 61 74 | it).is |designat|
|000001a0| 65 64 20 61 73 20 74 68 | 65 20 73 6f 72 74 20 6b |ed as th|e sort k|
|000001b0| 65 79 2e 20 20 54 68 65 | 20 72 65 63 6f 72 64 73 |ey. The| records|
|000001c0| 20 61 72 65 20 72 65 61 | 72 72 61 6e 67 65 64 20 | are rea|rranged |
|000001d0| 69 6e 20 74 68 65 20 62 | 75 66 66 65 72 0a 69 6e |in the b|uffer.in|
|000001e0| 20 6f 72 64 65 72 20 62 | 79 20 74 68 65 69 72 20 | order b|y their |
|000001f0| 73 6f 72 74 20 6b 65 79 | 73 2e 20 20 54 68 65 20 |sort key|s. The |
|00000200| 72 65 63 6f 72 64 73 20 | 6d 61 79 20 6f 72 20 6d |records |may or m|
|00000210| 61 79 20 6e 6f 74 20 62 | 65 20 63 6f 6e 74 69 67 |ay not b|e contig|
|00000220| 75 6f 75 73 2e 0a 0a 55 | 73 75 61 6c 6c 79 20 74 |uous...U|sually t|
|00000230| 68 65 20 72 65 63 6f 72 | 64 73 20 61 72 65 20 72 |he recor|ds are r|
|00000240| 65 61 72 72 61 6e 67 65 | 64 20 69 6e 20 6f 72 64 |earrange|d in ord|
|00000250| 65 72 20 6f 66 20 61 73 | 63 65 6e 64 69 6e 67 20 |er of as|cending |
|00000260| 73 6f 72 74 20 6b 65 79 | 2e 0a 49 66 20 52 45 56 |sort key|..If REV|
|00000270| 45 52 53 45 20 69 73 20 | 6e 6f 6e 2d 6e 69 6c 2c |ERSE is |non-nil,|
|00000280| 20 74 68 65 79 20 61 72 | 65 20 72 65 61 72 72 61 | they ar|e rearra|
|00000290| 6e 67 65 64 20 69 6e 20 | 6f 72 64 65 72 20 6f 66 |nged in |order of|
|000002a0| 20 64 65 73 63 65 6e 64 | 69 6e 67 20 73 6f 72 74 | descend|ing sort|
|000002b0| 20 6b 65 79 2e 0a 0a 54 | 68 65 20 6e 65 78 74 20 | key...T|he next |
|000002c0| 66 6f 75 72 20 61 72 67 | 75 6d 65 6e 74 73 20 61 |four arg|uments a|
|000002d0| 72 65 20 66 75 6e 63 74 | 69 6f 6e 73 20 74 6f 20 |re funct|ions to |
|000002e0| 62 65 20 63 61 6c 6c 65 | 64 20 74 6f 20 6d 6f 76 |be calle|d to mov|
|000002f0| 65 20 70 6f 69 6e 74 0a | 61 63 72 6f 73 73 20 61 |e point.|across a|
|00000300| 20 73 6f 72 74 20 72 65 | 63 6f 72 64 2e 20 20 54 | sort re|cord. T|
|00000310| 68 65 79 20 77 69 6c 6c | 20 62 65 20 63 61 6c 6c |hey will| be call|
|00000320| 65 64 20 6d 61 6e 79 20 | 74 69 6d 65 73 20 66 72 |ed many |times fr|
|00000330| 6f 6d 20 77 69 74 68 69 | 6e 20 73 6f 72 74 2d 73 |om withi|n sort-s|
|00000340| 75 62 72 2e 0a 0a 4e 45 | 58 54 52 45 43 46 55 4e |ubr...NE|XTRECFUN|
|00000350| 20 69 73 20 63 61 6c 6c | 65 64 20 77 69 74 68 20 | is call|ed with |
|00000360| 70 6f 69 6e 74 20 61 74 | 20 74 68 65 20 65 6e 64 |point at| the end|
|00000370| 20 6f 66 20 74 68 65 20 | 70 72 65 76 69 6f 75 73 | of the |previous|
|00000380| 20 72 65 63 6f 72 64 2e | 0a 49 74 20 6d 6f 76 65 | record.|.It move|
|00000390| 73 20 70 6f 69 6e 74 20 | 74 6f 20 74 68 65 20 73 |s point |to the s|
|000003a0| 74 61 72 74 20 6f 66 20 | 74 68 65 20 6e 65 78 74 |tart of |the next|
|000003b0| 20 72 65 63 6f 72 64 2e | 0a 54 68 65 20 66 69 72 | record.|.The fir|
|000003c0| 73 74 20 72 65 63 6f 72 | 64 20 69 73 20 61 73 73 |st recor|d is ass|
|000003d0| 75 6d 65 64 20 74 6f 20 | 73 74 61 72 74 20 61 74 |umed to |start at|
|000003e0| 20 74 68 65 20 70 6f 73 | 69 74 69 6f 6e 20 6f 66 | the pos|ition of|
|000003f0| 20 70 6f 69 6e 74 20 77 | 68 65 6e 20 73 6f 72 74 | point w|hen sort|
|00000400| 2d 73 75 62 72 0a 69 73 | 20 63 61 6c 6c 65 64 2e |-subr.is| called.|
|00000410| 0a 0a 45 4e 44 52 45 43 | 46 55 4e 20 69 73 20 69 |..ENDREC|FUN is i|
|00000420| 73 20 63 61 6c 6c 65 64 | 20 77 69 74 68 20 70 6f |s called| with po|
|00000430| 69 6e 74 20 77 69 74 68 | 69 6e 20 74 68 65 20 72 |int with|in the r|
|00000440| 65 63 6f 72 64 2e 0a 49 | 74 20 73 68 6f 75 6c 64 |ecord..I|t should|
|00000450| 20 6d 6f 76 65 20 70 6f | 69 6e 74 20 74 6f 20 74 | move po|int to t|
|00000460| 68 65 20 65 6e 64 20 6f | 66 20 74 68 65 20 72 65 |he end o|f the re|
|00000470| 63 6f 72 64 2e 0a 0a 53 | 54 41 52 54 4b 45 59 46 |cord...S|TARTKEYF|
|00000480| 55 4e 20 6d 61 79 20 6d | 6f 76 65 73 20 66 72 6f |UN may m|oves fro|
|00000490| 6d 20 74 68 65 20 73 74 | 61 72 74 20 6f 66 20 74 |m the st|art of t|
|000004a0| 68 65 20 72 65 63 6f 72 | 64 20 74 6f 20 74 68 65 |he recor|d to the|
|000004b0| 20 73 74 61 72 74 20 6f | 66 20 74 68 65 20 6b 65 | start o|f the ke|
|000004c0| 79 2e 0a 49 74 20 6d 61 | 79 20 72 65 74 75 72 6e |y..It ma|y return|
|000004d0| 20 65 69 74 68 65 72 20 | 72 65 74 75 72 6e 20 61 | either |return a|
|000004e0| 20 6e 6f 6e 2d 6e 69 6c | 20 76 61 6c 75 65 20 74 | non-nil| value t|
|000004f0| 6f 20 62 65 20 75 73 65 | 64 20 61 73 20 74 68 65 |o be use|d as the|
|00000500| 20 6b 65 79 2c 20 6f 72 | 0a 65 6c 73 65 20 74 68 | key, or|.else th|
|00000510| 65 20 6b 65 79 20 77 69 | 6c 6c 20 62 65 20 74 68 |e key wi|ll be th|
|00000520| 65 20 73 75 62 73 74 72 | 69 6e 67 20 62 65 74 77 |e substr|ing betw|
|00000530| 65 65 6e 20 74 68 65 20 | 76 61 6c 75 65 73 20 6f |een the |values o|
|00000540| 66 20 70 6f 69 6e 74 20 | 61 66 74 65 72 0a 53 54 |f point |after.ST|
|00000550| 41 52 54 4b 45 59 46 55 | 4e 20 61 6e 64 20 45 4e |ARTKEYFU|N and EN|
|00000560| 44 4b 45 59 46 55 4e 20 | 61 72 65 20 63 61 6c 6c |DKEYFUN |are call|
|00000570| 65 64 2e 20 20 49 66 20 | 53 54 41 52 54 4b 45 59 |ed. If |STARTKEY|
|00000580| 46 55 4e 20 69 73 20 6e | 69 6c 2c 20 74 68 65 20 |FUN is n|il, the |
|00000590| 6b 65 79 0a 73 74 61 72 | 74 73 20 61 74 20 74 68 |key.star|ts at th|
|000005a0| 65 20 62 65 67 69 6e 6e | 69 6e 67 20 6f 66 20 74 |e beginn|ing of t|
|000005b0| 68 65 20 72 65 63 6f 72 | 64 2e 0a 0a 45 4e 44 4b |he recor|d...ENDK|
|000005c0| 45 59 46 55 4e 20 6d 6f | 76 65 73 20 66 72 6f 6d |EYFUN mo|ves from|
|000005d0| 20 74 68 65 20 73 74 61 | 72 74 20 6f 66 20 74 68 | the sta|rt of th|
|000005e0| 65 20 73 6f 72 74 20 6b | 65 79 20 74 6f 20 74 68 |e sort k|ey to th|
|000005f0| 65 20 65 6e 64 20 6f 66 | 20 74 68 65 20 73 6f 72 |e end of| the sor|
|00000600| 74 20 6b 65 79 2e 0a 45 | 4e 44 52 45 43 46 55 4e |t key..E|NDRECFUN|
|00000610| 20 6d 61 79 20 62 65 20 | 6e 69 6c 20 69 66 20 53 | may be |nil if S|
|00000620| 54 41 52 54 4b 45 59 46 | 55 4e 20 72 65 74 75 72 |TARTKEYF|UN retur|
|00000630| 6e 73 20 61 20 76 61 6c | 75 65 20 6f 72 20 69 66 |ns a val|ue or if|
|00000640| 20 69 74 20 77 6f 75 6c | 64 20 62 65 20 74 68 65 | it woul|d be the|
|00000650| 0a 73 61 6d 65 20 61 73 | 20 45 4e 44 52 45 43 46 |.same as| ENDRECF|
|00000660| 55 4e 2e 22 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |UN." (by|te-code |
|00000670| 22 8a c9 ca 21 88 cb 09 | 0a 0b 0c 24 18 c7 08 21 |"...!...|...$...!|
|00000680| 1d 08 3f 83 19 00 c6 82 | 7d 00 0e 07 86 23 00 cc |..?.....|}....#..|
|00000690| 08 21 89 10 88 c9 cd 21 | 88 ce cf 21 83 4c 00 cf |.!.....!|...!.L..|
|000006a0| 08 d0 08 40 40 21 83 3c | 00 d1 82 48 00 08 40 40 |...@@!.<|...H..@@|
|000006b0| 3a 83 47 00 d2 82 48 00 | d3 5c 22 82 67 00 d4 08 |:.G...H.|.\".g...|
|000006c0| d0 08 40 40 21 83 5a 00 | d5 82 66 00 08 40 40 3a |..@@!.Z.|..f..@@:|
|000006d0| 83 65 00 d6 82 66 00 d7 | 5c 22 89 10 88 0e 07 85 |.e...f..|\"......|
|000006e0| 74 00 cc 08 21 89 10 88 | c9 d8 21 88 d9 08 0d 5c |t...!...|..!....\|
|000006f0| 22 2a 88 c9 da 21 29 87 | 22 20 5b 73 6f 72 74 2d |"*...!).|" [sort-|
|00000700| 6c 69 73 74 73 20 6e 65 | 78 74 72 65 63 66 75 6e |lists ne|xtrecfun|
|00000710| 20 65 6e 64 72 65 63 66 | 75 6e 20 73 74 61 72 74 | endrecf|un start|
|00000720| 6b 65 79 66 75 6e 20 65 | 6e 64 6b 65 79 66 75 6e |keyfun e|ndkeyfun|
|00000730| 20 6f 6c 64 20 6e 69 6c | 20 72 65 76 65 72 73 65 | old nil| reverse|
|00000740| 20 74 20 6d 65 73 73 61 | 67 65 20 22 46 69 6e 64 | t messa|ge "Find|
|00000750| 69 6e 67 20 73 6f 72 74 | 20 6b 65 79 73 2e 2e 2e |ing sort| keys...|
|00000760| 22 20 73 6f 72 74 2d 62 | 75 69 6c 64 2d 6c 69 73 |" sort-b|uild-lis|
|00000770| 74 73 20 6e 72 65 76 65 | 72 73 65 20 22 53 6f 72 |ts nreve|rse "Sor|
|00000780| 74 69 6e 67 20 72 65 63 | 6f 72 64 73 2e 2e 2e 22 |ting rec|ords..."|
|00000790| 20 66 62 6f 75 6e 64 70 | 20 73 6f 72 74 63 61 72 | fboundp| sortcar|
|000007a0| 20 6e 75 6d 62 65 72 70 | 20 3c 20 62 75 66 66 65 | numberp| < buffe|
|000007b0| 72 2d 73 75 62 73 74 72 | 69 6e 67 2d 6c 65 73 73 |r-substr|ing-less|
|000007c0| 70 20 73 74 72 69 6e 67 | 3c 20 73 6f 72 74 20 28 |p string|< sort (|
|000007d0| 6c 61 6d 62 64 61 20 28 | 61 20 62 29 20 28 62 79 |lambda (|a b) (by|
|000007e0| 74 65 2d 63 6f 64 65 20 | 22 08 40 09 40 57 87 22 |te-code |".@.@W."|
|000007f0| 20 5b 61 20 62 5d 20 32 | 29 29 20 28 6c 61 6d 62 | [a b] 2|)) (lamb|
|00000800| 64 61 20 28 61 20 62 29 | 20 28 62 79 74 65 2d 63 |da (a b)| (byte-c|
|00000810| 6f 64 65 20 22 c2 08 40 | 09 40 5c 22 87 22 20 5b |ode "..@|.@\"." [|
|00000820| 61 20 62 20 62 75 66 66 | 65 72 2d 73 75 62 73 74 |a b buff|er-subst|
|00000830| 72 69 6e 67 2d 6c 65 73 | 73 70 5d 20 33 29 29 20 |ring-les|sp] 3)) |
|00000840| 28 6c 61 6d 62 64 61 20 | 28 61 20 62 29 20 28 62 |(lambda |(a b) (b|
|00000850| 79 74 65 2d 63 6f 64 65 | 20 22 c2 08 40 09 40 5c |yte-code| "..@.@\|
|00000860| 22 87 22 20 5b 61 20 62 | 20 73 74 72 69 6e 67 3c |"." [a b| string<|
|00000870| 5d 20 33 29 29 20 22 52 | 65 6f 72 64 65 72 69 6e |] 3)) "R|eorderin|
|00000880| 67 20 62 75 66 66 65 72 | 2e 2e 2e 22 20 73 6f 72 |g buffer|..." sor|
|00000890| 74 2d 72 65 6f 72 64 65 | 72 2d 62 75 66 66 65 72 |t-reorde|r-buffer|
|000008a0| 20 22 52 65 6f 72 64 65 | 72 69 6e 67 20 62 75 66 | "Reorde|ring buf|
|000008b0| 66 65 72 2e 2e 2e 20 44 | 6f 6e 65 22 5d 20 31 35 |fer... D|one"] 15|
|000008c0| 29 29 0a 0a 28 64 65 66 | 75 6e 20 73 6f 72 74 2d |))..(def|un sort-|
|000008d0| 62 75 69 6c 64 2d 6c 69 | 73 74 73 20 28 6e 65 78 |build-li|sts (nex|
|000008e0| 74 72 65 63 66 75 6e 20 | 65 6e 64 72 65 63 66 75 |trecfun |endrecfu|
|000008f0| 6e 20 73 74 61 72 74 6b | 65 79 66 75 6e 20 65 6e |n startk|eyfun en|
|00000900| 64 6b 65 79 66 75 6e 29 | 20 28 62 79 74 65 2d 63 |dkeyfun)| (byte-c|
|00000910| 6f 64 65 20 22 c1 c1 c1 | c1 1c 1b 1a 18 6d 3f 85 |ode "...|.....m?.|
|00000920| 75 00 60 89 12 88 c1 89 | 13 88 c4 c8 8d 89 14 88 |u.`.....|........|
|00000930| 0b c1 89 13 88 86 3a 00 | 0d 83 2d 00 c9 0d 21 82 |......:.|..-...!.|
|00000940| 3a 00 0e 06 85 3a 00 c9 | 0e 06 21 88 c7 89 13 88 |:....:..|..!.....|
|00000950| 0c 85 62 00 0c 3a 85 51 | 00 ca 0c 40 0a 5c 22 85 |..b..:.Q|...@.\".|
|00000960| 51 00 ca 0c 41 60 5c 22 | 83 5a 00 0c 0c 42 82 5e |Q...A`\"|.Z...B.^|
|00000970| 00 0c 0a 60 45 08 42 89 | 10 88 0b 3f 85 71 00 0e |...`E.B.|...?.q..|
|00000980| 06 85 71 00 c9 0e 06 21 | 88 82 08 00 88 08 2c 87 |..q....!|......,.|
|00000990| 22 20 5b 73 6f 72 74 2d | 6c 69 73 74 73 20 6e 69 |" [sort-|lists ni|
|000009a0| 6c 20 73 74 61 72 74 2d | 72 65 63 20 64 6f 6e 65 |l start-|rec done|
|000009b0| 20 6b 65 79 20 65 6e 64 | 72 65 63 66 75 6e 20 6e | key end|recfun n|
|000009c0| 65 78 74 72 65 63 66 75 | 6e 20 74 20 28 62 79 74 |extrecfu|n t (byt|
|000009d0| 65 2d 63 6f 64 65 20 22 | 08 85 07 00 c6 08 21 86 |e-code "|......!.|
|000009e0| 29 00 60 19 c6 0a 86 16 | 00 0b c5 89 14 88 21 88 |).`.....|......!.|
|000009f0| c7 c8 21 83 24 00 09 60 | 42 82 28 00 c9 09 60 5c |..!.$..`|B.(...`\|
|00000a00| 22 29 87 22 20 5b 73 74 | 61 72 74 6b 65 79 66 75 |")." [st|artkeyfu|
|00000a10| 6e 20 73 74 61 72 74 20 | 65 6e 64 6b 65 79 66 75 |n start |endkeyfu|
|00000a20| 6e 20 65 6e 64 72 65 63 | 66 75 6e 20 64 6f 6e 65 |n endrec|fun done|
|00000a30| 20 74 20 66 75 6e 63 61 | 6c 6c 20 66 62 6f 75 6e | t funca|ll fboun|
|00000a40| 64 70 20 62 75 66 66 65 | 72 2d 73 75 62 73 74 72 |dp buffe|r-substr|
|00000a50| 69 6e 67 2d 6c 65 73 73 | 70 20 62 75 66 66 65 72 |ing-less|p buffer|
|00000a60| 2d 73 75 62 73 74 72 69 | 6e 67 5d 20 36 29 20 66 |-substri|ng] 6) f|
|00000a70| 75 6e 63 61 6c 6c 20 65 | 71 75 61 6c 5d 20 38 29 |uncall e|qual] 8)|
|00000a80| 29 0a 0a 28 64 65 66 75 | 6e 20 73 6f 72 74 2d 72 |)..(defu|n sort-r|
|00000a90| 65 6f 72 64 65 72 2d 62 | 75 66 66 65 72 20 28 73 |eorder-b|uffer (s|
|00000aa0| 6f 72 74 2d 6c 69 73 74 | 73 20 6f 6c 64 29 20 28 |ort-list|s old) (|
|00000ab0| 62 79 74 65 2d 63 6f 64 | 65 20 22 c1 65 65 64 1c |byte-cod|e ".eed.|
|00000ac0| 1b 1a 18 0d 85 3b 00 64 | 62 88 c7 70 0a c8 0e 06 |.....;.d|b..p....|
|00000ad0| 40 38 23 88 64 62 88 c7 | 70 c8 0d 40 38 c9 0d 40 |@8#.db..|p..@8..@|
|00000ae0| 38 23 88 c9 0e 06 40 38 | 12 0d 41 15 0e 06 41 89 |8#....@8|..A...A.|
|00000af0| 16 06 88 82 08 00 88 64 | 62 88 c7 70 0a 0c 23 88 |.......d|b..p..#.|
|00000b00| ca 0b 0c 5c 22 2c 87 22 | 20 5b 69 6e 68 69 62 69 |...\",."| [inhibi|
|00000b10| 74 2d 71 75 69 74 20 74 | 20 6c 61 73 74 20 6d 69 |t-quit t| last mi|
|00000b20| 6e 20 6d 61 78 20 73 6f | 72 74 2d 6c 69 73 74 73 |n max so|rt-lists|
|00000b30| 20 6f 6c 64 20 69 6e 73 | 65 72 74 2d 62 75 66 66 | old ins|ert-buff|
|00000b40| 65 72 2d 73 75 62 73 74 | 72 69 6e 67 20 31 20 32 |er-subst|ring 1 2|
|00000b50| 20 64 65 6c 65 74 65 2d | 72 65 67 69 6f 6e 5d 20 | delete-|region] |
|00000b60| 37 29 29 0a 0a 28 64 65 | 66 75 6e 20 73 6f 72 74 |7))..(de|fun sort|
|00000b70| 2d 6c 69 6e 65 73 20 28 | 72 65 76 65 72 73 65 20 |-lines (|reverse |
|00000b80| 62 65 67 20 65 6e 64 29 | 20 22 5c 0a 53 6f 72 74 |beg end)| "\.Sort|
|00000b90| 20 6c 69 6e 65 73 20 69 | 6e 20 72 65 67 69 6f 6e | lines i|n region|
|00000ba0| 20 61 6c 70 68 61 62 65 | 74 69 63 61 6c 6c 79 3b | alphabe|tically;|
|00000bb0| 20 61 72 67 75 6d 65 6e | 74 20 6d 65 61 6e 73 20 | argumen|t means |
|00000bc0| 64 65 73 63 65 6e 64 69 | 6e 67 20 6f 72 64 65 72 |descendi|ng order|
|00000bd0| 2e 0a 43 61 6c 6c 65 64 | 20 66 72 6f 6d 20 61 20 |..Called| from a |
|00000be0| 70 72 6f 67 72 61 6d 2c | 20 74 68 65 72 65 20 61 |program,| there a|
|00000bf0| 72 65 20 74 68 72 65 65 | 20 61 72 67 75 6d 65 6e |re three| argumen|
|00000c00| 74 73 3a 0a 52 45 56 45 | 52 53 45 20 28 6e 6f 6e |ts:.REVE|RSE (non|
|00000c10| 2d 6e 69 6c 20 6d 65 61 | 6e 73 20 72 65 76 65 72 |-nil mea|ns rever|
|00000c20| 73 65 20 6f 72 64 65 72 | 29 2c 20 42 45 47 20 61 |se order|), BEG a|
|00000c30| 6e 64 20 45 4e 44 20 28 | 72 65 67 69 6f 6e 20 74 |nd END (|region t|
|00000c40| 6f 20 73 6f 72 74 29 2e | 22 20 28 69 6e 74 65 72 |o sort).|" (inter|
|00000c50| 61 63 74 69 76 65 20 22 | 50 0a 72 22 29 20 28 62 |active "|P.r") (b|
|00000c60| 79 74 65 2d 63 6f 64 65 | 20 22 c3 88 8c c4 08 09 |yte-code| "......|
|00000c70| 5c 22 88 65 62 88 c5 0a | c6 c7 23 29 87 22 20 5b |\".eb...|..#)." [|
|00000c80| 62 65 67 20 65 6e 64 20 | 72 65 76 65 72 73 65 20 |beg end |reverse |
|00000c90| 6e 69 6c 20 6e 61 72 72 | 6f 77 2d 74 6f 2d 72 65 |nil narr|ow-to-re|
|00000ca0| 67 69 6f 6e 20 73 6f 72 | 74 2d 73 75 62 72 20 66 |gion sor|t-subr f|
|00000cb0| 6f 72 77 61 72 64 2d 6c | 69 6e 65 20 65 6e 64 2d |orward-l|ine end-|
|00000cc0| 6f 66 2d 6c 69 6e 65 5d | 20 35 29 29 0a 0a 28 64 |of-line]| 5))..(d|
|00000cd0| 65 66 75 6e 20 73 6f 72 | 74 2d 70 61 72 61 67 72 |efun sor|t-paragr|
|00000ce0| 61 70 68 73 20 28 72 65 | 76 65 72 73 65 20 62 65 |aphs (re|verse be|
|00000cf0| 67 20 65 6e 64 29 20 22 | 5c 0a 53 6f 72 74 20 70 |g end) "|\.Sort p|
|00000d00| 61 72 61 67 72 61 70 68 | 73 20 69 6e 20 72 65 67 |aragraph|s in reg|
|00000d10| 69 6f 6e 20 61 6c 70 68 | 61 62 65 74 69 63 61 6c |ion alph|abetical|
|00000d20| 6c 79 3b 20 61 72 67 75 | 6d 65 6e 74 20 6d 65 61 |ly; argu|ment mea|
|00000d30| 6e 73 20 64 65 73 63 65 | 6e 64 69 6e 67 20 6f 72 |ns desce|nding or|
|00000d40| 64 65 72 2e 0a 43 61 6c | 6c 65 64 20 66 72 6f 6d |der..Cal|led from|
|00000d50| 20 61 20 70 72 6f 67 72 | 61 6d 2c 20 74 68 65 72 | a progr|am, ther|
|00000d60| 65 20 61 72 65 20 74 68 | 72 65 65 20 61 72 67 75 |e are th|ree argu|
|00000d70| 6d 65 6e 74 73 3a 0a 52 | 45 56 45 52 53 45 20 28 |ments:.R|EVERSE (|
|00000d80| 6e 6f 6e 2d 6e 69 6c 20 | 6d 65 61 6e 73 20 72 65 |non-nil |means re|
|00000d90| 76 65 72 73 65 20 6f 72 | 64 65 72 29 2c 20 42 45 |verse or|der), BE|
|00000da0| 47 20 61 6e 64 20 45 4e | 44 20 28 72 65 67 69 6f |G and EN|D (regio|
|00000db0| 6e 20 74 6f 20 73 6f 72 | 74 29 2e 22 20 28 69 6e |n to sor|t)." (in|
|00000dc0| 74 65 72 61 63 74 69 76 | 65 20 22 50 0a 72 22 29 |teractiv|e "P.r")|
|00000dd0| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c3 88 8c | (byte-c|ode "...|
|00000de0| c4 08 09 5c 22 88 65 62 | 88 c5 0a c6 c7 23 29 87 |...\".eb|.....#).|
|00000df0| 22 20 5b 62 65 67 20 65 | 6e 64 20 72 65 76 65 72 |" [beg e|nd rever|
|00000e00| 73 65 20 6e 69 6c 20 6e | 61 72 72 6f 77 2d 74 6f |se nil n|arrow-to|
|00000e10| 2d 72 65 67 69 6f 6e 20 | 73 6f 72 74 2d 73 75 62 |-region |sort-sub|
|00000e20| 72 20 28 6c 61 6d 62 64 | 61 20 6e 69 6c 20 28 62 |r (lambd|a nil (b|
|00000e30| 79 74 65 2d 63 6f 64 65 | 20 22 c0 c1 21 87 22 20 |yte-code| "..!." |
|00000e40| 5b 73 6b 69 70 2d 63 68 | 61 72 73 2d 66 6f 72 77 |[skip-ch|ars-forw|
|00000e50| 61 72 64 20 22 0a 20 09 | 0c 22 5d 20 32 29 29 20 |ard ". .|."] 2)) |
|00000e60| 66 6f 72 77 61 72 64 2d | 70 61 72 61 67 72 61 70 |forward-|paragrap|
|00000e70| 68 5d 20 35 29 29 0a 0a | 28 64 65 66 75 6e 20 73 |h] 5))..|(defun s|
|00000e80| 6f 72 74 2d 70 61 67 65 | 73 20 28 72 65 76 65 72 |ort-page|s (rever|
|00000e90| 73 65 20 62 65 67 20 65 | 6e 64 29 20 22 5c 0a 53 |se beg e|nd) "\.S|
|00000ea0| 6f 72 74 20 70 61 67 65 | 73 20 69 6e 20 72 65 67 |ort page|s in reg|
|00000eb0| 69 6f 6e 20 61 6c 70 68 | 61 62 65 74 69 63 61 6c |ion alph|abetical|
|00000ec0| 6c 79 3b 20 61 72 67 75 | 6d 65 6e 74 20 6d 65 61 |ly; argu|ment mea|
|00000ed0| 6e 73 20 64 65 73 63 65 | 6e 64 69 6e 67 20 6f 72 |ns desce|nding or|
|00000ee0| 64 65 72 2e 0a 43 61 6c | 6c 65 64 20 66 72 6f 6d |der..Cal|led from|
|00000ef0| 20 61 20 70 72 6f 67 72 | 61 6d 2c 20 74 68 65 72 | a progr|am, ther|
|00000f00| 65 20 61 72 65 20 74 68 | 72 65 65 20 61 72 67 75 |e are th|ree argu|
|00000f10| 6d 65 6e 74 73 3a 0a 52 | 45 56 45 52 53 45 20 28 |ments:.R|EVERSE (|
|00000f20| 6e 6f 6e 2d 6e 69 6c 20 | 6d 65 61 6e 73 20 72 65 |non-nil |means re|
|00000f30| 76 65 72 73 65 20 6f 72 | 64 65 72 29 2c 20 42 45 |verse or|der), BE|
|00000f40| 47 20 61 6e 64 20 45 4e | 44 20 28 72 65 67 69 6f |G and EN|D (regio|
|00000f50| 6e 20 74 6f 20 73 6f 72 | 74 29 2e 22 20 28 69 6e |n to sor|t)." (in|
|00000f60| 74 65 72 61 63 74 69 76 | 65 20 22 50 0a 72 22 29 |teractiv|e "P.r")|
|00000f70| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c3 88 8c | (byte-c|ode "...|
|00000f80| c4 08 09 5c 22 88 65 62 | 88 c5 0a c6 c7 23 29 87 |...\".eb|.....#).|
|00000f90| 22 20 5b 62 65 67 20 65 | 6e 64 20 72 65 76 65 72 |" [beg e|nd rever|
|00000fa0| 73 65 20 6e 69 6c 20 6e | 61 72 72 6f 77 2d 74 6f |se nil n|arrow-to|
|00000fb0| 2d 72 65 67 69 6f 6e 20 | 73 6f 72 74 2d 73 75 62 |-region |sort-sub|
|00000fc0| 72 20 28 6c 61 6d 62 64 | 61 20 6e 69 6c 20 28 62 |r (lambd|a nil (b|
|00000fd0| 79 74 65 2d 63 6f 64 65 | 20 22 c0 c1 21 87 22 20 |yte-code| "..!." |
|00000fe0| 5b 73 6b 69 70 2d 63 68 | 61 72 73 2d 66 6f 72 77 |[skip-ch|ars-forw|
|00000ff0| 61 72 64 20 22 0a 22 5d | 20 32 29 29 20 66 6f 72 |ard "."]| 2)) for|
|00001000| 77 61 72 64 2d 70 61 67 | 65 5d 20 35 29 29 0a 0a |ward-pag|e] 5))..|
|00001010| 28 64 65 66 76 61 72 20 | 73 6f 72 74 2d 66 69 65 |(defvar |sort-fie|
|00001020| 6c 64 73 2d 73 79 6e 74 | 61 78 2d 74 61 62 6c 65 |lds-synt|ax-table|
|00001030| 20 6e 69 6c 29 0a 0a 28 | 69 66 20 73 6f 72 74 2d | nil)..(|if sort-|
|00001040| 66 69 65 6c 64 73 2d 73 | 79 6e 74 61 78 2d 74 61 |fields-s|yntax-ta|
|00001050| 62 6c 65 20 6e 69 6c 20 | 28 6c 65 74 20 28 28 74 |ble nil |(let ((t|
|00001060| 61 62 6c 65 20 28 6d 61 | 6b 65 2d 73 79 6e 74 61 |able (ma|ke-synta|
|00001070| 78 2d 74 61 62 6c 65 29 | 29 20 28 69 20 30 29 29 |x-table)|) (i 0))|
|00001080| 20 28 77 68 69 6c 65 20 | 28 3c 20 69 20 32 35 36 | (while |(< i 256|
|00001090| 29 20 28 6d 6f 64 69 66 | 79 2d 73 79 6e 74 61 78 |) (modif|y-syntax|
|000010a0| 2d 65 6e 74 72 79 20 69 | 20 22 77 22 20 74 61 62 |-entry i| "w" tab|
|000010b0| 6c 65 29 20 28 73 65 74 | 71 20 69 20 28 31 2b 20 |le) (set|q i (1+ |
|000010c0| 69 29 29 29 20 28 6d 6f | 64 69 66 79 2d 73 79 6e |i))) (mo|dify-syn|
|000010d0| 74 61 78 2d 65 6e 74 72 | 79 20 33 32 20 22 20 22 |tax-entr|y 32 " "|
|000010e0| 20 74 61 62 6c 65 29 20 | 28 6d 6f 64 69 66 79 2d | table) |(modify-|
|000010f0| 73 79 6e 74 61 78 2d 65 | 6e 74 72 79 20 39 20 22 |syntax-e|ntry 9 "|
|00001100| 20 22 20 74 61 62 6c 65 | 29 20 28 6d 6f 64 69 66 | " table|) (modif|
|00001110| 79 2d 73 79 6e 74 61 78 | 2d 65 6e 74 72 79 20 31 |y-syntax|-entry 1|
|00001120| 30 20 22 20 22 20 74 61 | 62 6c 65 29 20 28 73 65 |0 " " ta|ble) (se|
|00001130| 74 71 20 73 6f 72 74 2d | 66 69 65 6c 64 73 2d 73 |tq sort-|fields-s|
|00001140| 79 6e 74 61 78 2d 74 61 | 62 6c 65 20 74 61 62 6c |yntax-ta|ble tabl|
|00001150| 65 29 29 29 0a 0a 28 64 | 65 66 75 6e 20 73 6f 72 |e)))..(d|efun sor|
|00001160| 74 2d 6e 75 6d 65 72 69 | 63 2d 66 69 65 6c 64 73 |t-numeri|c-fields|
|00001170| 20 28 66 69 65 6c 64 20 | 62 65 67 20 65 6e 64 29 | (field |beg end)|
|00001180| 20 22 5c 0a 53 6f 72 74 | 20 6c 69 6e 65 73 20 69 | "\.Sort| lines i|
|00001190| 6e 20 72 65 67 69 6f 6e | 20 6e 75 6d 65 72 69 63 |n region| numeric|
|000011a0| 61 6c 6c 79 20 62 79 20 | 74 68 65 20 41 52 47 74 |ally by |the ARGt|
|000011b0| 68 20 66 69 65 6c 64 20 | 6f 66 20 65 61 63 68 20 |h field |of each |
|000011c0| 6c 69 6e 65 2e 0a 46 69 | 65 6c 64 73 20 61 72 65 |line..Fi|elds are|
|000011d0| 20 73 65 70 61 72 61 74 | 65 64 20 62 79 20 77 68 | separat|ed by wh|
|000011e0| 69 74 65 73 70 61 63 65 | 20 61 6e 64 20 6e 75 6d |itespace| and num|
|000011f0| 62 65 72 65 64 20 66 72 | 6f 6d 20 31 20 75 70 2e |bered fr|om 1 up.|
|00001200| 0a 53 70 65 63 69 66 69 | 65 64 20 66 69 65 6c 64 |.Specifi|ed field|
|00001210| 20 6d 75 73 74 20 63 6f | 6e 74 61 69 6e 20 61 20 | must co|ntain a |
|00001220| 6e 75 6d 62 65 72 20 69 | 6e 20 65 61 63 68 20 6c |number i|n each l|
|00001230| 69 6e 65 20 6f 66 20 74 | 68 65 20 72 65 67 69 6f |ine of t|he regio|
|00001240| 6e 2e 0a 57 69 74 68 20 | 61 20 6e 65 67 61 74 69 |n..With |a negati|
|00001250| 76 65 20 61 72 67 2c 20 | 73 6f 72 74 73 20 62 79 |ve arg, |sorts by|
|00001260| 20 74 68 65 20 2d 41 52 | 47 27 74 68 20 66 69 65 | the -AR|G'th fie|
|00001270| 6c 64 2c 20 69 6e 20 72 | 65 76 65 72 73 65 20 6f |ld, in r|everse o|
|00001280| 72 64 65 72 2e 0a 43 61 | 6c 6c 65 64 20 66 72 6f |rder..Ca|lled fro|
|00001290| 6d 20 61 20 70 72 6f 67 | 72 61 6d 2c 20 74 68 65 |m a prog|ram, the|
|000012a0| 72 65 20 61 72 65 20 74 | 68 72 65 65 20 61 72 67 |re are t|hree arg|
|000012b0| 75 6d 65 6e 74 73 3a 0a | 46 49 45 4c 44 2c 20 42 |uments:.|FIELD, B|
|000012c0| 45 47 20 61 6e 64 20 45 | 4e 44 2e 20 20 42 45 47 |EG and E|ND. BEG|
|000012d0| 20 61 6e 64 20 45 4e 44 | 20 73 70 65 63 69 66 79 | and END| specify|
|000012e0| 20 72 65 67 69 6f 6e 20 | 74 6f 20 73 6f 72 74 2e | region |to sort.|
|000012f0| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 20 22 |" (inter|active "|
|00001300| 70 0a 72 22 29 20 28 62 | 79 74 65 2d 63 6f 64 65 |p.r") (b|yte-code|
|00001310| 20 22 c3 88 c4 08 09 0a | c5 c3 25 87 22 20 5b 66 | "......|..%." [f|
|00001320| 69 65 6c 64 20 62 65 67 | 20 65 6e 64 20 6e 69 6c |ield beg| end nil|
|00001330| 20 73 6f 72 74 2d 66 69 | 65 6c 64 73 2d 31 20 28 | sort-fi|elds-1 (|
|00001340| 6c 61 6d 62 64 61 20 6e | 69 6c 20 28 62 79 74 65 |lambda n|il (byte|
|00001350| 2d 63 6f 64 65 20 22 c1 | 08 53 21 88 c2 c3 60 8a |-code ".|.S!...`.|
|00001360| c4 c5 21 88 60 29 5c 22 | 21 87 22 20 5b 66 69 65 |..!.`)\"|!." [fie|
|00001370| 6c 64 20 73 6f 72 74 2d | 73 6b 69 70 2d 66 69 65 |ld sort-|skip-fie|
|00001380| 6c 64 73 20 73 74 72 69 | 6e 67 2d 74 6f 2d 69 6e |lds stri|ng-to-in|
|00001390| 74 20 62 75 66 66 65 72 | 2d 73 75 62 73 74 72 69 |t buffer|-substri|
|000013a0| 6e 67 20 73 6b 69 70 2d | 63 68 61 72 73 2d 66 6f |ng skip-|chars-fo|
|000013b0| 72 77 61 72 64 20 22 2d | 30 2d 39 22 5d 20 36 29 |rward "-|0-9"] 6)|
|000013c0| 29 5d 20 36 29 29 0a 0a | 28 64 65 66 75 6e 20 73 |)] 6))..|(defun s|
|000013d0| 6f 72 74 2d 66 69 65 6c | 64 73 20 28 66 69 65 6c |ort-fiel|ds (fiel|
|000013e0| 64 20 62 65 67 20 65 6e | 64 29 20 22 5c 0a 53 6f |d beg en|d) "\.So|
|000013f0| 72 74 20 6c 69 6e 65 73 | 20 69 6e 20 72 65 67 69 |rt lines| in regi|
|00001400| 6f 6e 20 6c 65 78 69 63 | 6f 67 72 61 70 68 69 63 |on lexic|ographic|
|00001410| 61 6c 6c 79 20 62 79 20 | 74 68 65 20 41 52 47 74 |ally by |the ARGt|
|00001420| 68 20 66 69 65 6c 64 20 | 6f 66 20 65 61 63 68 20 |h field |of each |
|00001430| 6c 69 6e 65 2e 0a 46 69 | 65 6c 64 73 20 61 72 65 |line..Fi|elds are|
|00001440| 20 73 65 70 61 72 61 74 | 65 64 20 62 79 20 77 68 | separat|ed by wh|
|00001450| 69 74 65 73 70 61 63 65 | 20 61 6e 64 20 6e 75 6d |itespace| and num|
|00001460| 62 65 72 65 64 20 66 72 | 6f 6d 20 31 20 75 70 2e |bered fr|om 1 up.|
|00001470| 0a 57 69 74 68 20 61 20 | 6e 65 67 61 74 69 76 65 |.With a |negative|
|00001480| 20 61 72 67 2c 20 73 6f | 72 74 73 20 62 79 20 74 | arg, so|rts by t|
|00001490| 68 65 20 2d 41 52 47 27 | 74 68 20 66 69 65 6c 64 |he -ARG'|th field|
|000014a0| 2c 20 69 6e 20 72 65 76 | 65 72 73 65 20 6f 72 64 |, in rev|erse ord|
|000014b0| 65 72 2e 0a 43 61 6c 6c | 65 64 20 66 72 6f 6d 20 |er..Call|ed from |
|000014c0| 61 20 70 72 6f 67 72 61 | 6d 2c 20 74 68 65 72 65 |a progra|m, there|
|000014d0| 20 61 72 65 20 74 68 72 | 65 65 20 61 72 67 75 6d | are thr|ee argum|
|000014e0| 65 6e 74 73 3a 0a 46 49 | 45 4c 44 2c 20 42 45 47 |ents:.FI|ELD, BEG|
|000014f0| 20 61 6e 64 20 45 4e 44 | 2e 20 20 42 45 47 20 61 | and END|. BEG a|
|00001500| 6e 64 20 45 4e 44 20 73 | 70 65 63 69 66 79 20 72 |nd END s|pecify r|
|00001510| 65 67 69 6f 6e 20 74 6f | 20 73 6f 72 74 2e 22 20 |egion to| sort." |
|00001520| 28 69 6e 74 65 72 61 63 | 74 69 76 65 20 22 70 0a |(interac|tive "p.|
|00001530| 72 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |r") (byt|e-code "|
|00001540| c3 88 c4 08 09 0a c5 c6 | 25 87 22 20 5b 66 69 65 |........|%." [fie|
|00001550| 6c 64 20 62 65 67 20 65 | 6e 64 20 6e 69 6c 20 73 |ld beg e|nd nil s|
|00001560| 6f 72 74 2d 66 69 65 6c | 64 73 2d 31 20 28 6c 61 |ort-fiel|ds-1 (la|
|00001570| 6d 62 64 61 20 6e 69 6c | 20 28 62 79 74 65 2d 63 |mbda nil| (byte-c|
|00001580| 6f 64 65 20 22 c2 08 53 | 21 88 c1 87 22 20 5b 66 |ode "..S|!..." [f|
|00001590| 69 65 6c 64 20 6e 69 6c | 20 73 6f 72 74 2d 73 6b |ield nil| sort-sk|
|000015a0| 69 70 2d 66 69 65 6c 64 | 73 5d 20 32 29 29 20 28 |ip-field|s] 2)) (|
|000015b0| 6c 61 6d 62 64 61 20 6e | 69 6c 20 28 62 79 74 65 |lambda n|il (byte|
|000015c0| 2d 63 6f 64 65 20 22 c0 | c1 21 87 22 20 5b 73 6b |-code ".|.!." [sk|
|000015d0| 69 70 2d 63 68 61 72 73 | 2d 66 6f 72 77 61 72 64 |ip-chars|-forward|
|000015e0| 20 22 5e 20 09 0a 22 5d | 20 32 29 29 5d 20 36 29 | "^ .."]| 2))] 6)|
|000015f0| 29 0a 0a 28 64 65 66 75 | 6e 20 73 6f 72 74 2d 66 |)..(defu|n sort-f|
|00001600| 69 65 6c 64 73 2d 31 20 | 28 66 69 65 6c 64 20 62 |ields-1 |(field b|
|00001610| 65 67 20 65 6e 64 20 73 | 74 61 72 74 6b 65 79 66 |eg end s|tartkeyf|
|00001620| 75 6e 20 65 6e 64 6b 65 | 79 66 75 6e 29 20 28 62 |un endke|yfun) (b|
|00001630| 79 74 65 2d 63 6f 64 65 | 20 22 09 c8 57 c9 20 1a |yte-code| "..W. .|
|00001640| 18 ca cb 09 09 5b 23 89 | 11 88 cc 8e 8c cd 0b 0c |.....[#.|........|
|00001650| 5c 22 88 65 62 88 ce 0d | 21 88 cf 08 d0 d1 0e 06 |\".eb...|!.......|
|00001660| 0e 07 25 29 29 2a 87 22 | 20 5b 72 65 76 65 72 73 |..%))*."| [revers|
|00001670| 65 20 66 69 65 6c 64 20 | 74 62 6c 20 62 65 67 20 |e field |tbl beg |
|00001680| 65 6e 64 20 73 6f 72 74 | 2d 66 69 65 6c 64 73 2d |end sort|-fields-|
|00001690| 73 79 6e 74 61 78 2d 74 | 61 62 6c 65 20 73 74 61 |syntax-t|able sta|
|000016a0| 72 74 6b 65 79 66 75 6e | 20 65 6e 64 6b 65 79 66 |rtkeyfun| endkeyf|
|000016b0| 75 6e 20 30 20 73 79 6e | 74 61 78 2d 74 61 62 6c |un 0 syn|tax-tabl|
|000016c0| 65 20 6d 61 78 20 31 20 | 28 28 62 79 74 65 2d 63 |e max 1 |((byte-c|
|000016d0| 6f 64 65 20 22 c1 08 21 | 87 22 20 5b 74 62 6c 20 |ode "..!|." [tbl |
|000016e0| 73 65 74 2d 73 79 6e 74 | 61 78 2d 74 61 62 6c 65 |set-synt|ax-table|
|000016f0| 5d 20 32 29 29 20 6e 61 | 72 72 6f 77 2d 74 6f 2d |] 2)) na|rrow-to-|
|00001700| 72 65 67 69 6f 6e 20 73 | 65 74 2d 73 79 6e 74 61 |region s|et-synta|
|00001710| 78 2d 74 61 62 6c 65 20 | 73 6f 72 74 2d 73 75 62 |x-table |sort-sub|
|00001720| 72 20 66 6f 72 77 61 72 | 64 2d 6c 69 6e 65 20 65 |r forwar|d-line e|
|00001730| 6e 64 2d 6f 66 2d 6c 69 | 6e 65 5d 20 31 30 29 29 |nd-of-li|ne] 10))|
|00001740| 0a 0a 28 64 65 66 75 6e | 20 73 6f 72 74 2d 73 6b |..(defun| sort-sk|
|00001750| 69 70 2d 66 69 65 6c 64 | 73 20 28 6e 29 20 28 62 |ip-field|s (n) (b|
|00001760| 79 74 65 2d 63 6f 64 65 | 20 22 8a c2 c3 21 88 60 |yte-code| "...!.`|
|00001770| 29 18 c4 09 21 88 60 08 | 56 85 1e 00 c5 c6 c7 8a |)...!.`.|V.......|
|00001780| c8 20 88 60 29 08 5c 22 | 5c 22 88 c9 ca 21 29 87 |. .`).\"|\"...!).|
|00001790| 22 20 5b 65 6f 6c 20 6e | 20 65 6e 64 2d 6f 66 2d |" [eol n| end-of-|
|000017a0| 6c 69 6e 65 20 31 20 66 | 6f 72 77 61 72 64 2d 77 |line 1 f|orward-w|
|000017b0| 6f 72 64 20 65 72 72 6f | 72 20 22 4c 69 6e 65 20 |ord erro|r "Line |
|000017c0| 68 61 73 20 74 6f 6f 20 | 66 65 77 20 66 69 65 6c |has too |few fiel|
|000017d0| 64 73 3a 20 25 73 22 20 | 62 75 66 66 65 72 2d 73 |ds: %s" |buffer-s|
|000017e0| 75 62 73 74 72 69 6e 67 | 20 62 65 67 69 6e 6e 69 |ubstring| beginni|
|000017f0| 6e 67 2d 6f 66 2d 6c 69 | 6e 65 20 73 6b 69 70 2d |ng-of-li|ne skip-|
|00001800| 63 68 61 72 73 2d 66 6f | 72 77 61 72 64 20 22 20 |chars-fo|rward " |
|00001810| 09 22 5d 20 38 29 29 0a | 0a 28 64 65 66 75 6e 20 |."] 8)).|.(defun |
|00001820| 73 6f 72 74 2d 72 65 67 | 65 78 70 2d 66 69 65 6c |sort-reg|exp-fiel|
|00001830| 64 73 20 28 72 65 76 65 | 72 73 65 20 72 65 63 6f |ds (reve|rse reco|
|00001840| 72 64 2d 72 65 67 65 78 | 70 20 6b 65 79 2d 72 65 |rd-regex|p key-re|
|00001850| 67 65 78 70 20 62 65 67 | 20 65 6e 64 29 20 22 5c |gexp beg| end) "\|
|00001860| 0a 53 6f 72 74 20 74 68 | 65 20 72 65 67 69 6f 6e |.Sort th|e region|
|00001870| 20 6c 65 78 69 63 6f 67 | 72 61 70 68 69 63 61 6c | lexicog|raphical|
|00001880| 6c 79 20 61 73 20 73 70 | 65 63 69 66 65 64 20 62 |ly as sp|ecifed b|
|00001890| 79 20 52 45 43 4f 52 44 | 2d 52 45 47 45 58 50 20 |y RECORD|-REGEXP |
|000018a0| 61 6e 64 20 4b 45 59 2e | 0a 52 45 43 4f 52 44 2d |and KEY.|.RECORD-|
|000018b0| 52 45 47 45 58 50 20 73 | 70 65 63 69 66 69 65 73 |REGEXP s|pecifies|
|000018c0| 20 74 68 65 20 74 65 78 | 74 75 61 6c 20 75 6e 69 | the tex|tual uni|
|000018d0| 74 73 20 77 68 69 63 68 | 20 73 68 6f 75 6c 64 20 |ts which| should |
|000018e0| 62 65 20 73 6f 72 74 65 | 64 2e 0a 20 20 46 6f 72 |be sorte|d.. For|
|000018f0| 20 65 78 61 6d 70 6c 65 | 2c 20 74 6f 20 73 6f 72 | example|, to sor|
|00001900| 74 20 6c 69 6e 65 73 20 | 52 45 43 4f 52 44 2d 52 |t lines |RECORD-R|
|00001910| 45 47 45 58 50 20 77 6f | 75 6c 64 20 62 65 20 5c |EGEXP wo|uld be \|
|00001920| 22 5e 2e 2a 24 5c 22 0a | 4b 45 59 20 73 70 65 63 |"^.*$\".|KEY spec|
|00001930| 69 66 69 65 73 20 74 68 | 65 20 70 61 72 74 20 6f |ifies th|e part o|
|00001940| 66 20 65 61 63 68 20 72 | 65 63 6f 72 64 20 28 69 |f each r|ecord (i|
|00001950| 65 20 65 61 63 68 20 6d | 61 74 63 68 20 66 6f 72 |e each m|atch for|
|00001960| 20 52 45 43 4f 52 44 2d | 52 45 47 45 58 50 29 0a | RECORD-|REGEXP).|
|00001970| 20 20 69 73 20 74 6f 20 | 62 65 20 75 73 65 64 20 | is to |be used |
|00001980| 66 6f 72 20 73 6f 72 74 | 69 6e 67 2e 0a 20 20 49 |for sort|ing.. I|
|00001990| 66 20 69 74 20 69 73 20 | 5c 22 5c 5c 64 69 67 69 |f it is |\"\\digi|
|000019a0| 74 5c 22 20 74 68 65 6e | 20 74 68 65 20 64 69 67 |t\" then| the dig|
|000019b0| 69 74 27 74 68 20 5c 22 | 5c 5c 28 2e 2e 2e 5c 5c |it'th \"|\\(...\\|
|000019c0| 29 5c 22 20 6d 61 74 63 | 68 20 66 69 65 6c 64 20 |)\" matc|h field |
|000019d0| 66 72 6f 6d 0a 20 20 52 | 45 43 4f 52 44 2d 52 45 |from. R|ECORD-RE|
|000019e0| 47 45 58 50 20 69 73 20 | 75 73 65 64 2e 0a 20 20 |GEXP is |used.. |
|000019f0| 49 66 20 69 74 20 69 73 | 20 5c 22 5c 5c 26 5c 22 |If it is| \"\\&\"|
|00001a00| 20 74 68 65 6e 20 74 68 | 65 20 77 68 6f 6c 65 20 | then th|e whole |
|00001a10| 72 65 63 6f 72 64 20 69 | 73 20 75 73 65 64 2e 0a |record i|s used..|
|00001a20| 20 20 4f 74 68 65 72 77 | 69 73 65 2c 20 69 74 20 | Otherw|ise, it |
|00001a30| 69 73 20 61 20 72 65 67 | 75 6c 61 72 2d 65 78 70 |is a reg|ular-exp|
|00001a40| 72 65 73 73 69 6f 6e 20 | 66 6f 72 20 77 68 69 63 |ression |for whic|
|00001a50| 68 20 74 6f 20 73 65 61 | 72 63 68 20 77 69 74 68 |h to sea|rch with|
|00001a60| 69 6e 20 74 68 65 20 72 | 65 63 6f 72 64 2e 0a 49 |in the r|ecord..I|
|00001a70| 66 20 61 20 6d 61 74 63 | 68 20 66 6f 72 20 4b 45 |f a matc|h for KE|
|00001a80| 59 20 69 73 20 6e 6f 74 | 20 66 6f 75 6e 64 20 77 |Y is not| found w|
|00001a90| 69 74 68 69 6e 20 61 20 | 72 65 63 6f 72 64 20 74 |ithin a |record t|
|00001aa0| 68 65 6e 20 74 68 61 74 | 20 72 65 63 6f 72 64 20 |hen that| record |
|00001ab0| 69 73 20 69 67 6e 6f 72 | 65 64 2e 0a 0a 57 69 74 |is ignor|ed...Wit|
|00001ac0| 68 20 61 20 6e 65 67 61 | 74 69 76 65 20 70 72 65 |h a nega|tive pre|
|00001ad0| 66 69 78 20 61 72 67 20 | 73 6f 72 74 73 20 69 6e |fix arg |sorts in|
|00001ae0| 20 72 65 76 65 72 73 65 | 20 6f 72 64 65 72 2e 0a | reverse| order..|
|00001af0| 0a 46 6f 72 20 65 78 61 | 6d 70 6c 65 3a 20 74 6f |.For exa|mple: to|
|00001b00| 20 73 6f 72 74 20 6c 69 | 6e 65 73 20 69 6e 20 74 | sort li|nes in t|
|00001b10| 68 65 20 72 65 67 69 6f | 6e 20 62 79 20 74 68 65 |he regio|n by the|
|00001b20| 20 66 69 72 73 74 20 77 | 6f 72 64 20 6f 6e 20 65 | first w|ord on e|
|00001b30| 61 63 68 20 6c 69 6e 65 | 0a 20 73 74 61 72 74 69 |ach line|. starti|
|00001b40| 6e 67 20 77 69 74 68 20 | 74 68 65 20 6c 65 74 74 |ng with |the lett|
|00001b50| 65 72 20 5c 22 66 5c 22 | 2c 0a 20 52 45 43 4f 52 |er \"f\"|,. RECOR|
|00001b60| 44 2d 52 45 47 45 58 50 | 20 77 6f 75 6c 64 20 62 |D-REGEXP| would b|
|00001b70| 65 20 5c 22 5e 2e 2a 24 | 5c 22 20 61 6e 64 20 4b |e \"^.*$|\" and K|
|00001b80| 45 59 20 5c 22 5c 5c 3c | 66 5c 5c 77 2a 5c 5c 3e |EY \"\\<|f\\w*\\>|
|00001b90| 5c 22 22 20 28 69 6e 74 | 65 72 61 63 74 69 76 65 |\"" (int|eractive|
|00001ba0| 20 22 50 0a 73 52 65 67 | 65 78 70 20 73 70 65 63 | "P.sReg|exp spec|
|00001bb0| 69 66 79 69 6e 67 20 72 | 65 63 6f 72 64 73 20 74 |ifying r|ecords t|
|00001bc0| 6f 20 73 6f 72 74 3a 20 | 0a 73 52 65 67 65 78 70 |o sort: |.sRegexp|
|00001bd0| 20 73 70 65 63 69 66 79 | 69 6e 67 20 6b 65 79 20 | specify|ing key |
|00001be0| 77 69 74 68 69 6e 20 72 | 65 63 6f 72 64 3a 20 0a |within r|ecord: .|
|00001bf0| 72 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |r") (byt|e-code "|
|00001c00| c6 88 c7 08 c8 5c 22 86 | 0d 00 c7 08 c9 5c 22 83 |.....\".|.....\".|
|00001c10| 16 00 ca 89 10 82 24 00 | cb cc 08 5c 22 85 24 00 |......$.|...\".$.|
|00001c20| 08 cd 48 ce 5a 89 10 88 | 8c cf 09 0a 5c 22 88 65 |..H.Z...|....\".e|
|00001c30| 62 88 c6 1b d0 0c 21 88 | 60 89 13 88 d1 ca 21 62 |b.....!.|`.....!b|
|00001c40| 88 d2 0d d3 d4 d5 24 29 | 29 87 22 20 5b 6b 65 79 |......$)|)." [key|
|00001c50| 2d 72 65 67 65 78 70 20 | 62 65 67 20 65 6e 64 20 |-regexp |beg end |
|00001c60| 73 6f 72 74 2d 72 65 67 | 65 78 70 2d 72 65 63 6f |sort-reg|exp-reco|
|00001c70| 72 64 2d 65 6e 64 20 72 | 65 63 6f 72 64 2d 72 65 |rd-end r|ecord-re|
|00001c80| 67 65 78 70 20 72 65 76 | 65 72 73 65 20 6e 69 6c |gexp rev|erse nil|
|00001c90| 20 65 71 75 61 6c 20 22 | 22 20 22 5c 5c 26 22 20 | equal "|" "\\&" |
|00001ca0| 30 20 73 74 72 69 6e 67 | 2d 6d 61 74 63 68 20 22 |0 string|-match "|
|00001cb0| 5c 5c 60 5c 5c 5c 5c 5b | 31 2d 39 5d 5c 5c 27 22 |\\`\\\\[|1-9]\\'"|
|00001cc0| 20 31 20 34 38 20 6e 61 | 72 72 6f 77 2d 74 6f 2d | 1 48 na|rrow-to-|
|00001cd0| 72 65 67 69 6f 6e 20 72 | 65 2d 73 65 61 72 63 68 |region r|e-search|
|00001ce0| 2d 66 6f 72 77 61 72 64 | 20 6d 61 74 63 68 2d 62 |-forward| match-b|
|00001cf0| 65 67 69 6e 6e 69 6e 67 | 20 73 6f 72 74 2d 73 75 |eginning| sort-su|
|00001d00| 62 72 20 28 6c 61 6d 62 | 64 61 20 6e 69 6c 20 28 |br (lamb|da nil (|
|00001d10| 62 79 74 65 2d 63 6f 64 | 65 20 22 c3 08 c1 c4 23 |byte-cod|e "....#|
|00001d20| 85 14 00 c5 c6 21 89 12 | 85 14 00 c7 c6 21 62 87 |.....!..|.....!b.|
|00001d30| 22 20 5b 72 65 63 6f 72 | 64 2d 72 65 67 65 78 70 |" [recor|d-regexp|
|00001d40| 20 6e 69 6c 20 73 6f 72 | 74 2d 72 65 67 65 78 70 | nil sor|t-regexp|
|00001d50| 2d 72 65 63 6f 72 64 2d | 65 6e 64 20 72 65 2d 73 |-record-|end re-s|
|00001d60| 65 61 72 63 68 2d 66 6f | 72 77 61 72 64 20 6d 6f |earch-fo|rward mo|
|00001d70| 76 65 20 6d 61 74 63 68 | 2d 65 6e 64 20 30 20 6d |ve match|-end 0 m|
|00001d80| 61 74 63 68 2d 62 65 67 | 69 6e 6e 69 6e 67 5d 20 |atch-beg|inning] |
|00001d90| 34 29 29 20 28 6c 61 6d | 62 64 61 20 6e 69 6c 20 |4)) (lam|bda nil |
|00001da0| 28 62 79 74 65 2d 63 6f | 64 65 20 22 08 62 87 22 |(byte-co|de ".b."|
|00001db0| 20 5b 73 6f 72 74 2d 72 | 65 67 65 78 70 2d 72 65 | [sort-r|egexp-re|
|00001dc0| 63 6f 72 64 2d 65 6e 64 | 5d 20 31 29 29 20 28 6c |cord-end|] 1)) (l|
|00001dd0| 61 6d 62 64 61 20 6e 69 | 6c 20 28 62 79 74 65 2d |ambda ni|l (byte-|
|00001de0| 63 6f 64 65 20 22 c5 18 | c6 09 21 83 0e 00 09 89 |code "..|..!.....|
|00001df0| 10 82 20 00 c7 09 0a c3 | 23 83 1c 00 c5 89 10 82 |.. .....|#.......|
|00001e00| 20 00 c8 c9 c4 5c 22 88 | c4 ca cb 8f 29 87 22 20 | ....\".|....)." |
|00001e10| 5b 6e 20 6b 65 79 2d 72 | 65 67 65 78 70 20 73 6f |[n key-r|egexp so|
|00001e20| 72 74 2d 72 65 67 65 78 | 70 2d 72 65 63 6f 72 64 |rt-regex|p-record|
|00001e30| 2d 65 6e 64 20 74 20 6e | 69 6c 20 30 20 6e 75 6d |-end t n|il 0 num|
|00001e40| 62 65 72 70 20 72 65 2d | 73 65 61 72 63 68 2d 66 |berp re-|search-f|
|00001e50| 6f 72 77 61 72 64 20 74 | 68 72 6f 77 20 6b 65 79 |orward t|hrow key|
|00001e60| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c1 c2 21 | (byte-c|ode "..!|
|00001e70| 83 10 00 c3 08 21 c4 08 | 21 42 82 18 00 c5 c3 08 |.....!..|!B......|
|00001e80| 21 c4 08 21 5c 22 87 22 | 20 5b 6e 20 66 62 6f 75 |!..!\"."| [n fbou|
|00001e90| 6e 64 70 20 62 75 66 66 | 65 72 2d 73 75 62 73 74 |ndp buff|er-subst|
|00001ea0| 72 69 6e 67 2d 6c 65 73 | 73 70 20 6d 61 74 63 68 |ring-les|sp match|
|00001eb0| 2d 62 65 67 69 6e 6e 69 | 6e 67 20 6d 61 74 63 68 |-beginni|ng match|
|00001ec0| 2d 65 6e 64 20 62 75 66 | 66 65 72 2d 73 75 62 73 |-end buf|fer-subs|
|00001ed0| 74 72 69 6e 67 5d 20 38 | 29 20 28 28 65 72 72 6f |tring] 8|) ((erro|
|00001ee0| 72 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c1 c2 |r (byte-|code "..|
|00001ef0| c0 5c 22 87 22 20 5b 6e | 69 6c 20 74 68 72 6f 77 |.\"." [n|il throw|
|00001f00| 20 6b 65 79 5d 20 33 29 | 29 29 5d 20 36 29 29 5d | key] 3)|))] 6))]|
|00001f10| 20 31 31 29 29 0a 0a 28 | 64 65 66 75 6e 20 73 6f | 11))..(|defun so|
|00001f20| 72 74 2d 63 6f 6c 75 6d | 6e 73 20 28 72 65 76 65 |rt-colum|ns (reve|
|00001f30| 72 73 65 20 26 6f 70 74 | 69 6f 6e 61 6c 20 62 65 |rse &opt|ional be|
|00001f40| 67 20 65 6e 64 29 20 22 | 5c 0a 53 6f 72 74 20 6c |g end) "|\.Sort l|
|00001f50| 69 6e 65 73 20 69 6e 20 | 72 65 67 69 6f 6e 20 61 |ines in |region a|
|00001f60| 6c 70 68 61 62 65 74 69 | 63 61 6c 6c 79 20 62 79 |lphabeti|cally by|
|00001f70| 20 61 20 63 65 72 74 61 | 69 6e 20 72 61 6e 67 65 | a certa|in range|
|00001f80| 20 6f 66 20 63 6f 6c 75 | 6d 6e 73 2e 0a 46 6f 72 | of colu|mns..For|
|00001f90| 20 74 68 65 20 70 75 72 | 70 6f 73 65 20 6f 66 20 | the pur|pose of |
|00001fa0| 74 68 69 73 20 63 6f 6d | 6d 61 6e 64 2c 20 74 68 |this com|mand, th|
|00001fb0| 65 20 72 65 67 69 6f 6e | 20 69 6e 63 6c 75 64 65 |e region| include|
|00001fc0| 73 0a 74 68 65 20 65 6e | 74 69 72 65 20 6c 69 6e |s.the en|tire lin|
|00001fd0| 65 20 74 68 61 74 20 70 | 6f 69 6e 74 20 69 73 20 |e that p|oint is |
|00001fe0| 69 6e 20 61 6e 64 20 74 | 68 65 20 65 6e 74 69 72 |in and t|he entir|
|00001ff0| 65 20 6c 69 6e 65 20 74 | 68 65 20 6d 61 72 6b 20 |e line t|he mark |
|00002000| 69 73 20 69 6e 2e 0a 54 | 68 65 20 63 6f 6c 75 6d |is in..T|he colum|
|00002010| 6e 20 70 6f 73 69 74 69 | 6f 6e 73 20 6f 66 20 70 |n positi|ons of p|
|00002020| 6f 69 6e 74 20 61 6e 64 | 20 6d 61 72 6b 20 62 6f |oint and| mark bo|
|00002030| 75 6e 64 20 74 68 65 20 | 72 61 6e 67 65 20 6f 66 |und the |range of|
|00002040| 20 63 6f 6c 75 6d 6e 73 | 20 74 6f 20 73 6f 72 74 | columns| to sort|
|00002050| 20 6f 6e 2e 0a 41 20 70 | 72 65 66 69 78 20 61 72 | on..A p|refix ar|
|00002060| 67 75 6d 65 6e 74 20 6d | 65 61 6e 73 20 73 6f 72 |gument m|eans sor|
|00002070| 74 20 69 6e 74 6f 20 72 | 65 76 65 72 73 65 20 6f |t into r|everse o|
|00002080| 72 64 65 72 2e 0a 0a 4e | 6f 74 65 20 74 68 61 74 |rder...N|ote that|
|00002090| 20 73 6f 72 74 2d 63 6f | 6c 75 6d 6e 73 20 75 73 | sort-co|lumns us|
|000020a0| 65 73 20 74 68 65 20 73 | 6f 72 74 20 75 74 69 6c |es the s|ort util|
|000020b0| 69 74 79 20 70 72 6f 67 | 72 61 6d 20 61 6e 64 20 |ity prog|ram and |
|000020c0| 74 68 65 72 65 66 6f 72 | 65 0a 63 61 6e 6e 6f 74 |therefor|e.cannot|
|000020d0| 20 77 6f 72 6b 20 6f 6e | 20 74 65 78 74 20 63 6f | work on| text co|
|000020e0| 6e 74 61 69 6e 69 6e 67 | 20 54 41 42 20 63 68 61 |ntaining| TAB cha|
|000020f0| 72 61 63 74 65 72 73 2e | 20 20 55 73 65 20 4d 2d |racters.| Use M-|
|00002100| 78 20 75 6e 74 61 62 69 | 66 79 0a 74 6f 20 63 6f |x untabi|fy.to co|
|00002110| 6e 76 65 72 74 20 74 61 | 62 73 20 74 6f 20 73 70 |nvert ta|bs to sp|
|00002120| 61 63 65 73 20 62 65 66 | 6f 72 65 20 73 6f 72 74 |aces bef|ore sort|
|00002130| 69 6e 67 2e 22 20 28 69 | 6e 74 65 72 61 63 74 69 |ing." (i|nteracti|
|00002140| 76 65 20 22 50 0a 72 22 | 29 20 28 62 79 74 65 2d |ve "P.r"|) (byte-|
|00002150| 63 6f 64 65 20 22 c9 88 | 8a c9 c9 c9 c9 c9 c9 1d |code "..|........|
|00002160| 1c 1b 1a 19 18 0e 06 0e | 07 5e 62 88 69 89 12 88 |........|.^b.i...|
|00002170| cb 20 88 60 89 10 88 0e | 06 0e 07 5d 62 88 69 89 |. .`....|...]b.i.|
|00002180| 13 88 cc 20 88 60 89 11 | 88 0a 0b 5e 89 14 88 0a |... .`..|...^....|
|00002190| 0b 5d 89 15 88 cd ce 08 | c8 23 85 4a 00 cf d0 21 |.]......|.#.J...!|
|000021a0| 88 d1 08 09 d2 c8 c8 c9 | 0e 0a 83 5b 00 d3 82 5c |........|...[...\|
|000021b0| 5c 00 d4 d5 0c 50 d6 0d | 50 26 09 2e 06 29 87 22 |\....P..|P&...)."|
|000021c0| 20 5b 62 65 67 31 20 65 | 6e 64 31 20 63 6f 6c 2d | [beg1 e|nd1 col-|
|000021d0| 62 65 67 31 20 63 6f 6c | 2d 65 6e 64 31 20 63 6f |beg1 col|-end1 co|
|000021e0| 6c 2d 73 74 61 72 74 20 | 63 6f 6c 2d 65 6e 64 20 |l-start |col-end |
|000021f0| 62 65 67 20 65 6e 64 20 | 74 20 6e 69 6c 20 72 65 |beg end |t nil re|
|00002200| 76 65 72 73 65 20 62 65 | 67 69 6e 6e 69 6e 67 2d |verse be|ginning-|
|00002210| 6f 66 2d 6c 69 6e 65 20 | 66 6f 72 77 61 72 64 2d |of-line |forward-|
|00002220| 6c 69 6e 65 20 73 65 61 | 72 63 68 2d 62 61 63 6b |line sea|rch-back|
|00002230| 77 61 72 64 20 22 09 22 | 20 65 72 72 6f 72 20 22 |ward "."| error "|
|00002240| 73 6f 72 74 2d 63 6f 6c | 75 6d 6e 73 20 64 6f 65 |sort-col|umns doe|
|00002250| 73 20 6e 6f 74 20 77 6f | 72 6b 20 77 69 74 68 20 |s not wo|rk with |
|00002260| 74 61 62 73 2e 20 20 55 | 73 65 20 4d 2d 78 20 75 |tabs. U|se M-x u|
|00002270| 6e 74 61 62 69 66 79 2e | 22 20 63 61 6c 6c 2d 70 |ntabify.|" call-p|
|00002280| 72 6f 63 65 73 73 2d 72 | 65 67 69 6f 6e 20 22 73 |rocess-r|egion "s|
|00002290| 6f 72 74 22 20 22 2d 72 | 74 0a 22 20 22 2d 74 0a |ort" "-r|t." "-t.|
|000022a0| 22 20 22 2b 30 2e 22 20 | 22 2d 30 2e 22 5d 20 31 |" "+0." |"-0."] 1|
|000022b0| 35 29 29 0a | |5)). | |
+--------+-------------------------+-------------------------+--------+--------+