home *** CD-ROM | disk | FTP | other *** search
Emacs Compiled Lisp | 1993-07-05 | 9.8 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.
Confidence | Program | Detection | Match Type | Support
|
---|
1%
| dexvert
| Emacs Compiled Lisp (other/emacsCompiledLisp)
| magic
| Unsupported |
1%
| dexvert
| Combustion 2 Particle Library (other/combustion2ParticleLibrary)
| ext
| Unsupported |
100%
| file
| Emacs/XEmacs v19 byte-compiled Lisp data
| default
| |
99%
| file
| data
| default
| |
55%
| TrID
| Emacs/XEmacs byte-compiled Lisp (generic)
| default
| |
44%
| TrID
| Summation Document Image Information Load File
| default (weak)
| |
100%
| xdgMime
| text/x-emacs-lisp
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 45 4c 43 13 00 00 00 | 0a 3b 3b 3b 20 63 6f 6d |;ELC....|.;;; com|
|00000010| 70 69 6c 65 64 20 62 79 | 20 6a 69 6d 62 40 67 65 |piled by| jimb@ge|
|00000020| 65 63 68 2e 67 6e 75 2e | 61 69 2e 6d 69 74 2e 65 |ech.gnu.|ai.mit.e|
|00000030| 64 75 20 6f 6e 20 54 75 | 65 20 4a 75 6c 20 20 36 |du on Tu|e Jul 6|
|00000040| 20 30 30 3a 30 34 3a 32 | 34 20 31 39 39 33 0a 3b | 00:04:2|4 1993.;|
|00000050| 3b 3b 20 66 72 6f 6d 20 | 66 69 6c 65 20 2f 67 64 |;; from |file /gd|
|00000060| 2f 67 6e 75 2f 65 6d 61 | 63 73 2f 31 39 2e 30 2f |/gnu/ema|cs/19.0/|
|00000070| 6c 69 73 70 2f 73 6f 72 | 74 2e 65 6c 0a 3b 3b 3b |lisp/sor|t.el.;;;|
|00000080| 20 65 6d 61 63 73 20 76 | 65 72 73 69 6f 6e 20 31 | emacs v|ersion 1|
|00000090| 39 2e 31 35 2e 31 36 2e | 0a 3b 3b 3b 20 62 79 74 |9.15.16.|.;;; byt|
|000000a0| 65 63 6f 6d 70 20 76 65 | 72 73 69 6f 6e 20 46 53 |ecomp ve|rsion FS|
|000000b0| 46 20 32 2e 31 30 0a 3b | 3b 3b 20 6f 70 74 69 6d |F 2.10.;|;; optim|
|000000c0| 69 7a 61 74 69 6f 6e 20 | 69 73 20 6f 6e 2e 0a 3b |ization |is on..;|
|000000d0| 3b 3b 20 74 68 69 73 20 | 66 69 6c 65 20 75 73 65 |;; this |file use|
|000000e0| 73 20 6f 70 63 6f 64 65 | 73 20 77 68 69 63 68 20 |s opcode|s which |
|000000f0| 64 6f 20 6e 6f 74 20 65 | 78 69 73 74 20 69 6e 20 |do not e|xist in |
|00000100| 45 6d 61 63 73 20 31 38 | 2e 0a 0a 28 69 66 20 28 |Emacs 18|...(if (|
|00000110| 61 6e 64 20 28 62 6f 75 | 6e 64 70 20 27 65 6d 61 |and (bou|ndp 'ema|
|00000120| 63 73 2d 76 65 72 73 69 | 6f 6e 29 0a 09 20 28 6f |cs-versi|on).. (o|
|00000130| 72 20 28 61 6e 64 20 28 | 62 6f 75 6e 64 70 20 27 |r (and (|boundp '|
|00000140| 65 70 6f 63 68 3a 3a 76 | 65 72 73 69 6f 6e 29 20 |epoch::v|ersion) |
|00000150| 65 70 6f 63 68 3a 3a 76 | 65 72 73 69 6f 6e 29 0a |epoch::v|ersion).|
|00000160| 09 20 20 20 20 20 28 73 | 74 72 69 6e 67 2d 6c 65 |. (s|tring-le|
|00000170| 73 73 70 20 65 6d 61 63 | 73 2d 76 65 72 73 69 6f |ssp emac|s-versio|
|00000180| 6e 20 22 31 39 22 29 29 | 29 0a 20 20 20 20 28 65 |n "19"))|). (e|
|00000190| 72 72 6f 72 20 22 54 68 | 69 73 20 66 69 6c 65 20 |rror "Th|is file |
|000001a0| 77 61 73 20 63 6f 6d 70 | 69 6c 65 64 20 66 6f 72 |was comp|iled for|
|000001b0| 20 45 6d 61 63 73 20 31 | 39 22 29 29 0a 0a 28 64 | Emacs 1|9"))..(d|
|000001c0| 65 66 76 61 72 20 73 6f | 72 74 2d 66 6f 6c 64 2d |efvar so|rt-fold-|
|000001d0| 63 61 73 65 20 6e 69 6c | 20 22 5c 0a 2a 4e 6f 6e |case nil| "\.*Non|
|000001e0| 2d 6e 69 6c 20 69 66 20 | 74 68 65 20 62 75 66 66 |-nil if |the buff|
|000001f0| 65 72 20 73 6f 72 74 20 | 66 75 6e 63 74 69 6f 6e |er sort |function|
|00000200| 73 20 73 68 6f 75 6c 64 | 20 69 67 6e 6f 72 65 20 |s should| ignore |
|00000210| 63 61 73 65 2e 22 29 0a | 28 64 65 66 61 6c 69 61 |case.").|(defalia|
|00000220| 73 20 27 73 6f 72 74 2d | 73 75 62 72 20 23 5b 28 |s 'sort-|subr #[(|
|00000230| 72 65 76 65 72 73 65 20 | 6e 65 78 74 72 65 63 66 |reverse |nextrecf|
|00000240| 75 6e 20 65 6e 64 72 65 | 63 66 75 6e 20 26 6f 70 |un endre|cfun &op|
|00000250| 74 69 6f 6e 61 6c 20 73 | 74 61 72 74 6b 65 79 66 |tional s|tartkeyf|
|00000260| 75 6e 20 65 6e 64 6b 65 | 79 66 75 6e 29 20 22 64 |un endke|yfun) "d|
|00000270| 65 5a c0 56 19 8a 09 83 | 0f 00 c2 c3 21 88 c4 0d |eZ.V....|....!...|
|00000280| 0e 06 0e 07 0e 08 24 1e | 09 ca 0e 09 21 1e 0b 0e |......$.|....!...|
|00000290| 0c 1e 0d 0e 09 83 97 00 | 0e 5c 6e 84 33 00 0e 09 |........|.\n.3...|
|000002a0| 9f 16 09 09 83 3b 00 c2 | ce 21 88 cf d0 21 83 60 |.....;..|.!...!.`|
|000002b0| 00 d0 0e 09 89 40 40 a7 | 83 4f 00 d1 82 5c 5c 00 |.....@@.|.O...\\.|
|000002c0| 0e 09 40 40 3a 83 5b 00 | d2 82 5c 5c 00 d3 5c 22 |..@@:.[.|..\\..\"|
|000002d0| 82 7c 00 d4 0e 09 89 40 | 40 a7 83 6e 00 d5 82 7b |.|.....@|@..n...{|
|000002e0| 00 0e 09 40 40 3a 83 7a | 00 d6 82 7b 00 d7 5c 22 |...@@:.z|...{..\"|
|000002f0| 16 09 0e 5c 6e 83 88 00 | 0e 09 9f 16 09 09 83 90 |...\n...|........|
|00000300| 00 c2 d8 21 88 d9 0e 09 | 0e 0b 5c 22 88 2b 09 83 |...!....|..\".+..|
|00000310| a0 00 c2 da 21 88 2a db | 87 22 20 5b 35 30 30 30 |....!.*.|." [5000|
|00000320| 30 20 6d 65 73 73 61 67 | 65 73 20 6d 65 73 73 61 |0 messag|es messa|
|00000330| 67 65 20 22 46 69 6e 64 | 69 6e 67 20 73 6f 72 74 |ge "Find|ing sort|
|00000340| 20 6b 65 79 73 2e 2e 2e | 22 20 73 6f 72 74 2d 62 | keys...|" sort-b|
|00000350| 75 69 6c 64 2d 6c 69 73 | 74 73 20 6e 65 78 74 72 |uild-lis|ts nextr|
|00000360| 65 63 66 75 6e 20 65 6e | 64 72 65 63 66 75 6e 20 |ecfun en|drecfun |
|00000370| 73 74 61 72 74 6b 65 79 | 66 75 6e 20 65 6e 64 6b |startkey|fun endk|
|00000380| 65 79 66 75 6e 20 73 6f | 72 74 2d 6c 69 73 74 73 |eyfun so|rt-lists|
|00000390| 20 72 65 76 65 72 73 65 | 20 6f 6c 64 20 73 6f 72 | reverse| old sor|
|000003a0| 74 2d 66 6f 6c 64 2d 63 | 61 73 65 20 63 61 73 65 |t-fold-c|ase case|
|000003b0| 2d 66 6f 6c 64 2d 73 65 | 61 72 63 68 20 22 53 6f |-fold-se|arch "So|
|000003c0| 72 74 69 6e 67 20 72 65 | 63 6f 72 64 73 2e 2e 2e |rting re|cords...|
|000003d0| 22 20 66 62 6f 75 6e 64 | 70 20 73 6f 72 74 63 61 |" fbound|p sortca|
|000003e0| 72 20 3c 20 23 5b 28 61 | 20 62 29 20 22 c0 c1 c2 |r < #[(a| b) "...|
|000003f0| 0b 40 0b 41 c2 0c 40 0c | 41 26 06 56 87 22 20 5b |.@.A..@.|A&.V." [|
|00000400| 30 20 63 6f 6d 70 61 72 | 65 2d 62 75 66 66 65 72 |0 compar|e-buffer|
|00000410| 2d 73 75 62 73 74 72 69 | 6e 67 73 20 6e 69 6c 20 |-substri|ngs nil |
|00000420| 61 20 62 5d 20 38 5d 20 | 73 74 72 69 6e 67 3c 20 |a b] 8] |string< |
|00000430| 73 6f 72 74 20 23 5b 28 | 61 20 62 29 20 22 08 40 |sort #[(|a b) ".@|
|00000440| 09 40 57 87 22 20 5b 61 | 20 62 5d 20 32 5d 20 23 |.@W." [a| b] 2] #|
|00000450| 5b 28 61 20 62 29 20 22 | c0 c1 c2 0b 40 40 0b 40 |[(a b) "|....@@.@|
|00000460| 41 c2 0c 40 40 0c 40 41 | 26 06 56 87 22 20 5b 30 |A..@@.@A|&.V." [0|
|00000470| 20 63 6f 6d 70 61 72 65 | 2d 62 75 66 66 65 72 2d | compare|-buffer-|
|00000480| 73 75 62 73 74 72 69 6e | 67 73 20 6e 69 6c 20 61 |substrin|gs nil a|
|00000490| 20 62 5d 20 38 5d 20 23 | 5b 28 61 20 62 29 20 22 | b] 8] #|[(a b) "|
|000004a0| 08 40 09 40 99 87 22 20 | 5b 61 20 62 5d 20 32 5d |.@.@.." |[a b] 2]|
|000004b0| 20 22 52 65 6f 72 64 65 | 72 69 6e 67 20 62 75 66 | "Reorde|ring buf|
|000004c0| 66 65 72 2e 2e 2e 22 20 | 73 6f 72 74 2d 72 65 6f |fer..." |sort-reo|
|000004d0| 72 64 65 72 2d 62 75 66 | 66 65 72 20 22 52 65 6f |rder-buf|fer "Reo|
|000004e0| 72 64 65 72 69 6e 67 20 | 62 75 66 66 65 72 2e 2e |rdering |buffer..|
|000004f0| 2e 20 44 6f 6e 65 22 20 | 6e 69 6c 5d 20 35 20 22 |. Done" |nil] 5 "|
|00000500| 5c 0a 47 65 6e 65 72 61 | 6c 20 74 65 78 74 20 73 |\.Genera|l text s|
|00000510| 6f 72 74 69 6e 67 20 72 | 6f 75 74 69 6e 65 20 74 |orting r|outine t|
|00000520| 6f 20 64 69 76 69 64 65 | 20 62 75 66 66 65 72 20 |o divide| buffer |
|00000530| 69 6e 74 6f 20 72 65 63 | 6f 72 64 73 20 61 6e 64 |into rec|ords and|
|00000540| 20 73 6f 72 74 20 74 68 | 65 6d 2e 0a 41 72 67 75 | sort th|em..Argu|
|00000550| 6d 65 6e 74 73 20 61 72 | 65 20 52 45 56 45 52 53 |ments ar|e REVERS|
|00000560| 45 20 4e 45 58 54 52 45 | 43 46 55 4e 20 45 4e 44 |E NEXTRE|CFUN END|
|00000570| 52 45 43 46 55 4e 20 26 | 6f 70 74 69 6f 6e 61 6c |RECFUN &|optional|
|00000580| 20 53 54 41 52 54 4b 45 | 59 46 55 4e 20 45 4e 44 | STARTKE|YFUN END|
|00000590| 4b 45 59 46 55 4e 2e 0a | 0a 57 65 20 64 69 76 69 |KEYFUN..|.We divi|
|000005a0| 64 65 20 74 68 65 20 61 | 63 63 65 73 73 69 62 6c |de the a|ccessibl|
|000005b0| 65 20 70 6f 72 74 69 6f | 6e 20 6f 66 20 74 68 65 |e portio|n of the|
|000005c0| 20 62 75 66 66 65 72 20 | 69 6e 74 6f 20 64 69 73 | buffer |into dis|
|000005d0| 6a 6f 69 6e 74 20 70 69 | 65 63 65 73 0a 63 61 6c |joint pi|eces.cal|
|000005e0| 6c 65 64 20 73 6f 72 74 | 20 72 65 63 6f 72 64 73 |led sort| records|
|000005f0| 2e 20 20 41 20 70 6f 72 | 74 69 6f 6e 20 6f 66 20 |. A por|tion of |
|00000600| 65 61 63 68 20 73 6f 72 | 74 20 72 65 63 6f 72 64 |each sor|t record|
|00000610| 20 28 70 65 72 68 61 70 | 73 20 61 6c 6c 20 6f 66 | (perhap|s all of|
|00000620| 0a 69 74 29 20 69 73 20 | 64 65 73 69 67 6e 61 74 |.it) is |designat|
|00000630| 65 64 20 61 73 20 74 68 | 65 20 73 6f 72 74 20 6b |ed as th|e sort k|
|00000640| 65 79 2e 20 20 54 68 65 | 20 72 65 63 6f 72 64 73 |ey. The| records|
|00000650| 20 61 72 65 20 72 65 61 | 72 72 61 6e 67 65 64 20 | are rea|rranged |
|00000660| 69 6e 20 74 68 65 0a 62 | 75 66 66 65 72 20 69 6e |in the.b|uffer in|
|00000670| 20 6f 72 64 65 72 20 62 | 79 20 74 68 65 69 72 20 | order b|y their |
|00000680| 73 6f 72 74 20 6b 65 79 | 73 2e 20 20 54 68 65 20 |sort key|s. The |
|00000690| 72 65 63 6f 72 64 73 20 | 6d 61 79 20 6f 72 20 6d |records |may or m|
|000006a0| 61 79 20 6e 6f 74 20 62 | 65 0a 63 6f 6e 74 69 67 |ay not b|e.contig|
|000006b0| 75 6f 75 73 2e 0a 0a 55 | 73 75 61 6c 6c 79 20 74 |uous...U|sually t|
|000006c0| 68 65 20 72 65 63 6f 72 | 64 73 20 61 72 65 20 72 |he recor|ds are r|
|000006d0| 65 61 72 72 61 6e 67 65 | 64 20 69 6e 20 6f 72 64 |earrange|d in ord|
|000006e0| 65 72 20 6f 66 20 61 73 | 63 65 6e 64 69 6e 67 20 |er of as|cending |
|000006f0| 73 6f 72 74 20 6b 65 79 | 2e 0a 49 66 20 52 45 56 |sort key|..If REV|
|00000700| 45 52 53 45 20 69 73 20 | 6e 6f 6e 2d 6e 69 6c 2c |ERSE is |non-nil,|
|00000710| 20 74 68 65 79 20 61 72 | 65 20 72 65 61 72 72 61 | they ar|e rearra|
|00000720| 6e 67 65 64 20 69 6e 20 | 6f 72 64 65 72 20 6f 66 |nged in |order of|
|00000730| 20 64 65 73 63 65 6e 64 | 69 6e 67 20 73 6f 72 74 | descend|ing sort|
|00000740| 20 6b 65 79 2e 0a 0a 54 | 68 65 20 6e 65 78 74 20 | key...T|he next |
|00000750| 66 6f 75 72 20 61 72 67 | 75 6d 65 6e 74 73 20 61 |four arg|uments a|
|00000760| 72 65 20 66 75 6e 63 74 | 69 6f 6e 73 20 74 6f 20 |re funct|ions to |
|00000770| 62 65 20 63 61 6c 6c 65 | 64 20 74 6f 20 6d 6f 76 |be calle|d to mov|
|00000780| 65 20 70 6f 69 6e 74 0a | 61 63 72 6f 73 73 20 61 |e point.|across a|
|00000790| 20 73 6f 72 74 20 72 65 | 63 6f 72 64 2e 20 20 54 | sort re|cord. T|
|000007a0| 68 65 79 20 77 69 6c 6c | 20 62 65 20 63 61 6c 6c |hey will| be call|
|000007b0| 65 64 20 6d 61 6e 79 20 | 74 69 6d 65 73 20 66 72 |ed many |times fr|
|000007c0| 6f 6d 20 77 69 74 68 69 | 6e 20 73 6f 72 74 2d 73 |om withi|n sort-s|
|000007d0| 75 62 72 2e 0a 0a 4e 45 | 58 54 52 45 43 46 55 4e |ubr...NE|XTRECFUN|
|000007e0| 20 69 73 20 63 61 6c 6c | 65 64 20 77 69 74 68 20 | is call|ed with |
|000007f0| 70 6f 69 6e 74 20 61 74 | 20 74 68 65 20 65 6e 64 |point at| the end|
|00000800| 20 6f 66 20 74 68 65 20 | 70 72 65 76 69 6f 75 73 | of the |previous|
|00000810| 20 72 65 63 6f 72 64 2e | 0a 49 74 20 6d 6f 76 65 | record.|.It move|
|00000820| 73 20 70 6f 69 6e 74 20 | 74 6f 20 74 68 65 20 73 |s point |to the s|
|00000830| 74 61 72 74 20 6f 66 20 | 74 68 65 20 6e 65 78 74 |tart of |the next|
|00000840| 20 72 65 63 6f 72 64 2e | 0a 49 74 20 73 68 6f 75 | record.|.It shou|
|00000850| 6c 64 20 6d 6f 76 65 20 | 70 6f 69 6e 74 20 74 6f |ld move |point to|
|00000860| 20 74 68 65 20 65 6e 64 | 20 6f 66 20 74 68 65 20 | the end| of the |
|00000870| 62 75 66 66 65 72 20 69 | 66 20 74 68 65 72 65 20 |buffer i|f there |
|00000880| 61 72 65 20 6e 6f 20 6d | 6f 72 65 20 72 65 63 6f |are no m|ore reco|
|00000890| 72 64 73 2e 0a 54 68 65 | 20 66 69 72 73 74 20 72 |rds..The| first r|
|000008a0| 65 63 6f 72 64 20 69 73 | 20 61 73 73 75 6d 65 64 |ecord is| assumed|
|000008b0| 20 74 6f 20 73 74 61 72 | 74 20 61 74 20 74 68 65 | to star|t at the|
|000008c0| 20 70 6f 73 69 74 69 6f | 6e 20 6f 66 20 70 6f 69 | positio|n of poi|
|000008d0| 6e 74 20 77 68 65 6e 20 | 73 6f 72 74 2d 73 75 62 |nt when |sort-sub|
|000008e0| 72 0a 69 73 20 63 61 6c | 6c 65 64 2e 0a 0a 45 4e |r.is cal|led...EN|
|000008f0| 44 52 45 43 46 55 4e 20 | 69 73 20 63 61 6c 6c 65 |DRECFUN |is calle|
|00000900| 64 20 77 69 74 68 20 70 | 6f 69 6e 74 20 77 69 74 |d with p|oint wit|
|00000910| 68 69 6e 20 74 68 65 20 | 72 65 63 6f 72 64 2e 0a |hin the |record..|
|00000920| 49 74 20 73 68 6f 75 6c | 64 20 6d 6f 76 65 20 70 |It shoul|d move p|
|00000930| 6f 69 6e 74 20 74 6f 20 | 74 68 65 20 65 6e 64 20 |oint to |the end |
|00000940| 6f 66 20 74 68 65 20 72 | 65 63 6f 72 64 2e 0a 0a |of the r|ecord...|
|00000950| 53 54 41 52 54 4b 45 59 | 46 55 4e 20 6d 6f 76 65 |STARTKEY|FUN move|
|00000960| 73 20 66 72 6f 6d 20 74 | 68 65 20 73 74 61 72 74 |s from t|he start|
|00000970| 20 6f 66 20 74 68 65 20 | 72 65 63 6f 72 64 20 74 | of the |record t|
|00000980| 6f 20 74 68 65 20 73 74 | 61 72 74 20 6f 66 20 74 |o the st|art of t|
|00000990| 68 65 20 6b 65 79 2e 0a | 49 74 20 6d 61 79 20 72 |he key..|It may r|
|000009a0| 65 74 75 72 6e 20 65 69 | 74 68 65 72 20 61 20 6e |eturn ei|ther a n|
|000009b0| 6f 6e 2d 6e 69 6c 20 76 | 61 6c 75 65 20 74 6f 20 |on-nil v|alue to |
|000009c0| 62 65 20 75 73 65 64 20 | 61 73 20 74 68 65 20 6b |be used |as the k|
|000009d0| 65 79 2c 20 6f 72 0a 65 | 6c 73 65 20 74 68 65 20 |ey, or.e|lse the |
|000009e0| 6b 65 79 20 69 73 20 74 | 68 65 20 73 75 62 73 74 |key is t|he subst|
|000009f0| 72 69 6e 67 20 62 65 74 | 77 65 65 6e 20 74 68 65 |ring bet|ween the|
|00000a00| 20 76 61 6c 75 65 73 20 | 6f 66 20 70 6f 69 6e 74 | values |of point|
|00000a10| 20 61 66 74 65 72 0a 53 | 54 41 52 54 4b 45 59 46 | after.S|TARTKEYF|
|00000a20| 55 4e 20 61 6e 64 20 45 | 4e 44 4b 45 59 46 55 4e |UN and E|NDKEYFUN|
|00000a30| 20 61 72 65 20 63 61 6c | 6c 65 64 2e 20 20 49 66 | are cal|led. If|
|00000a40| 20 53 54 41 52 54 4b 45 | 59 46 55 4e 20 69 73 20 | STARTKE|YFUN is |
|00000a50| 6e 69 6c 2c 20 74 68 65 | 20 6b 65 79 0a 73 74 61 |nil, the| key.sta|
|00000a60| 72 74 73 20 61 74 20 74 | 68 65 20 62 65 67 69 6e |rts at t|he begin|
|00000a70| 6e 69 6e 67 20 6f 66 20 | 74 68 65 20 72 65 63 6f |ning of |the reco|
|00000a80| 72 64 2e 0a 0a 45 4e 44 | 4b 45 59 46 55 4e 20 6d |rd...END|KEYFUN m|
|00000a90| 6f 76 65 73 20 66 72 6f | 6d 20 74 68 65 20 73 74 |oves fro|m the st|
|00000aa0| 61 72 74 20 6f 66 20 74 | 68 65 20 73 6f 72 74 20 |art of t|he sort |
|00000ab0| 6b 65 79 20 74 6f 20 74 | 68 65 20 65 6e 64 20 6f |key to t|he end o|
|00000ac0| 66 20 74 68 65 20 73 6f | 72 74 20 6b 65 79 2e 0a |f the so|rt key..|
|00000ad0| 45 4e 44 4b 45 59 46 55 | 4e 20 6d 61 79 20 62 65 |ENDKEYFU|N may be|
|00000ae0| 20 6e 69 6c 20 69 66 20 | 53 54 41 52 54 4b 45 59 | nil if |STARTKEY|
|00000af0| 46 55 4e 20 72 65 74 75 | 72 6e 73 20 61 20 76 61 |FUN retu|rns a va|
|00000b00| 6c 75 65 20 6f 72 20 69 | 66 20 69 74 20 77 6f 75 |lue or i|f it wou|
|00000b10| 6c 64 20 62 65 20 74 68 | 65 0a 73 61 6d 65 20 61 |ld be th|e.same a|
|00000b20| 73 20 45 4e 44 52 45 43 | 46 55 4e 2e 22 5d 29 0a |s ENDREC|FUN."]).|
|00000b30| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c0 c1 c2 5c |(byte-co|de "...\|
|00000b40| 22 88 c0 c3 c4 5c 22 87 | 22 20 5b 64 65 66 61 6c |"....\".|" [defal|
|00000b50| 69 61 73 20 73 6f 72 74 | 2d 62 75 69 6c 64 2d 6c |ias sort|-build-l|
|00000b60| 69 73 74 73 20 23 5b 28 | 6e 65 78 74 72 65 63 66 |ists #[(|nextrecf|
|00000b70| 75 6e 20 65 6e 64 72 65 | 63 66 75 6e 20 73 74 61 |un endre|cfun sta|
|00000b80| 72 74 6b 65 79 66 75 6e | 20 65 6e 64 6b 65 79 66 |rtkeyfun| endkeyf|
|00000b90| 75 6e 29 20 22 c0 89 89 | 89 19 1a 1b 1c 6d 84 66 |un) "...|.....m.f|
|00000ba0| 00 60 13 c0 12 c1 c5 8d | 11 5c 6e c0 12 84 31 00 |.`......|.\n...1.|
|00000bb0| 0e 06 83 26 00 0e 06 20 | 88 82 31 00 0e 07 83 31 |...&... |..1....1|
|00000bc0| 00 0e 07 20 88 c8 12 09 | 83 56 00 09 3a 83 4e 00 |... ....|.V..:.N.|
|00000bd0| 09 40 0b 9a 83 4e 00 09 | 41 60 9a 83 4e 00 09 89 |.@...N..|A`..N...|
|00000be0| 42 82 53 00 09 0b 60 42 | 42 0c 42 14 5c 6e 84 08 |B.S...`B|B.B.\n..|
|00000bf0| 00 0e 07 83 08 00 0e 07 | 20 88 82 08 00 0c 2c 87 |........| .....,.|
|00000c00| 22 20 5b 6e 69 6c 20 6b | 65 79 20 64 6f 6e 65 20 |" [nil k|ey done |
|00000c10| 73 74 61 72 74 2d 72 65 | 63 20 73 6f 72 74 2d 6c |start-re|c sort-l|
|00000c20| 69 73 74 73 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |ists (by|te-code |
|00000c30| 22 08 83 09 00 08 20 86 | 18 00 60 19 5c 6e 86 12 |"..... .|..`.\n..|
|00000c40| 00 0b c4 15 20 88 09 60 | 29 42 87 22 20 5b 73 74 |.... ..`|)B." [st|
|00000c50| 61 72 74 6b 65 79 66 75 | 6e 20 73 74 61 72 74 20 |artkeyfu|n start |
|00000c60| 65 6e 64 6b 65 79 66 75 | 6e 20 65 6e 64 72 65 63 |endkeyfu|n endrec|
|00000c70| 66 75 6e 20 74 20 64 6f | 6e 65 5d 20 32 29 20 65 |fun t do|ne] 2) e|
|00000c80| 6e 64 72 65 63 66 75 6e | 20 6e 65 78 74 72 65 63 |ndrecfun| nextrec|
|00000c90| 66 75 6e 20 74 5d 20 34 | 5d 20 73 6f 72 74 2d 72 |fun t] 4|] sort-r|
|00000ca0| 65 6f 72 64 65 72 2d 62 | 75 66 66 65 72 20 23 5b |eorder-b|uffer #[|
|00000cb0| 28 73 6f 72 74 2d 6c 69 | 73 74 73 20 6f 6c 64 29 |(sort-li|sts old)|
|00000cc0| 20 22 c0 65 65 64 19 1a | 1b 1c 64 62 88 c5 c6 21 | ".eed..|..db...!|
|00000cd0| 88 5c 6e 64 53 7d 88 0e | 07 83 4a 00 64 62 88 c8 |.\ndS}..|..J.db..|
|00000ce0| 70 0b 0e 09 40 41 40 23 | 88 64 62 88 c8 70 0e 07 |p...@A@#|.db..p..|
|00000cf0| 40 41 40 0e 07 40 41 41 | 23 88 0e 09 40 41 41 13 |@A@..@AA|#...@AA.|
|00000d00| 0e 07 41 16 07 0e 09 41 | 16 09 82 14 00 64 62 88 |..A....A|.....db.|
|00000d10| c8 70 0b 09 23 88 5c 6e | 09 7c 88 64 62 88 5c 6e |.p..#.\n|.|.db.\n|
|00000d20| 60 54 7d 88 60 60 54 7c | 2c 87 22 20 5b 74 20 6d |`T}.``T||,." [t m|
|00000d30| 61 78 20 6d 69 6e 20 6c | 61 73 74 20 69 6e 68 69 |ax min l|ast inhi|
|00000d40| 62 69 74 2d 71 75 69 74 | 20 69 6e 73 65 72 74 2d |bit-quit| insert-|
|00000d50| 62 65 66 6f 72 65 2d 6d | 61 72 6b 65 72 73 20 22 |before-m|arkers "|
|00000d60| 20 22 20 73 6f 72 74 2d | 6c 69 73 74 73 20 69 6e | " sort-|lists in|
|00000d70| 73 65 72 74 2d 62 75 66 | 66 65 72 2d 73 75 62 73 |sert-buf|fer-subs|
|00000d80| 74 72 69 6e 67 20 6f 6c | 64 5d 20 34 5d 5d 20 33 |tring ol|d] 4]] 3|
|00000d90| 29 0a 28 64 65 66 61 6c | 69 61 73 20 27 73 6f 72 |).(defal|ias 'sor|
|00000da0| 74 2d 6c 69 6e 65 73 20 | 23 5b 28 72 65 76 65 72 |t-lines |#[(rever|
|00000db0| 73 65 20 62 65 67 20 65 | 6e 64 29 20 22 8a 8c 08 |se beg e|nd) "...|
|00000dc0| 09 7d 88 65 62 88 c2 0b | c4 c5 23 2a 87 22 20 5b |.}.eb...|..#*." [|
|00000dd0| 62 65 67 20 65 6e 64 20 | 73 6f 72 74 2d 73 75 62 |beg end |sort-sub|
|00000de0| 72 20 72 65 76 65 72 73 | 65 20 66 6f 72 77 61 72 |r revers|e forwar|
|00000df0| 64 2d 6c 69 6e 65 20 65 | 6e 64 2d 6f 66 2d 6c 69 |d-line e|nd-of-li|
|00000e00| 6e 65 5d 20 34 20 22 5c | 0a 53 6f 72 74 20 6c 69 |ne] 4 "\|.Sort li|
|00000e10| 6e 65 73 20 69 6e 20 72 | 65 67 69 6f 6e 20 61 6c |nes in r|egion al|
|00000e20| 70 68 61 62 65 74 69 63 | 61 6c 6c 79 3b 20 61 72 |phabetic|ally; ar|
|00000e30| 67 75 6d 65 6e 74 20 6d | 65 61 6e 73 20 64 65 73 |gument m|eans des|
|00000e40| 63 65 6e 64 69 6e 67 20 | 6f 72 64 65 72 2e 0a 43 |cending |order..C|
|00000e50| 61 6c 6c 65 64 20 66 72 | 6f 6d 20 61 20 70 72 6f |alled fr|om a pro|
|00000e60| 67 72 61 6d 2c 20 74 68 | 65 72 65 20 61 72 65 20 |gram, th|ere are |
|00000e70| 74 68 72 65 65 20 61 72 | 67 75 6d 65 6e 74 73 3a |three ar|guments:|
|00000e80| 0a 52 45 56 45 52 53 45 | 20 28 6e 6f 6e 2d 6e 69 |.REVERSE| (non-ni|
|00000e90| 6c 20 6d 65 61 6e 73 20 | 72 65 76 65 72 73 65 20 |l means |reverse |
|00000ea0| 6f 72 64 65 72 29 2c 20 | 42 45 47 20 61 6e 64 20 |order), |BEG and |
|00000eb0| 45 4e 44 20 28 72 65 67 | 69 6f 6e 20 74 6f 20 73 |END (reg|ion to s|
|00000ec0| 6f 72 74 29 2e 22 20 22 | 50 5c 6e 72 22 5d 29 0a |ort)." "|P\nr"]).|
|00000ed0| 28 64 65 66 61 6c 69 61 | 73 20 27 73 6f 72 74 2d |(defalia|s 'sort-|
|00000ee0| 70 61 72 61 67 72 61 70 | 68 73 20 23 5b 28 72 65 |paragrap|hs #[(re|
|00000ef0| 76 65 72 73 65 20 62 65 | 67 20 65 6e 64 29 20 22 |verse be|g end) "|
|00000f00| 8a 8c 08 09 7d 88 65 62 | 88 c2 0b c4 c5 23 2a 87 |....}.eb|.....#*.|
|00000f10| 22 20 5b 62 65 67 20 65 | 6e 64 20 73 6f 72 74 2d |" [beg e|nd sort-|
|00000f20| 73 75 62 72 20 72 65 76 | 65 72 73 65 20 23 5b 6e |subr rev|erse #[n|
|00000f30| 69 6c 20 22 c0 c1 77 87 | 22 20 5b 22 5c 6e 20 09 |il "..w.|" ["\n .|
|00000f40| 0c 22 20 6e 69 6c 5d 20 | 32 5d 20 66 6f 72 77 61 |." nil] |2] forwa|
|00000f50| 72 64 2d 70 61 72 61 67 | 72 61 70 68 5d 20 34 20 |rd-parag|raph] 4 |
|00000f60| 22 5c 0a 53 6f 72 74 20 | 70 61 72 61 67 72 61 70 |"\.Sort |paragrap|
|00000f70| 68 73 20 69 6e 20 72 65 | 67 69 6f 6e 20 61 6c 70 |hs in re|gion alp|
|00000f80| 68 61 62 65 74 69 63 61 | 6c 6c 79 3b 20 61 72 67 |habetica|lly; arg|
|00000f90| 75 6d 65 6e 74 20 6d 65 | 61 6e 73 20 64 65 73 63 |ument me|ans desc|
|00000fa0| 65 6e 64 69 6e 67 20 6f | 72 64 65 72 2e 0a 43 61 |ending o|rder..Ca|
|00000fb0| 6c 6c 65 64 20 66 72 6f | 6d 20 61 20 70 72 6f 67 |lled fro|m a prog|
|00000fc0| 72 61 6d 2c 20 74 68 65 | 72 65 20 61 72 65 20 74 |ram, the|re are t|
|00000fd0| 68 72 65 65 20 61 72 67 | 75 6d 65 6e 74 73 3a 0a |hree arg|uments:.|
|00000fe0| 52 45 56 45 52 53 45 20 | 28 6e 6f 6e 2d 6e 69 6c |REVERSE |(non-nil|
|00000ff0| 20 6d 65 61 6e 73 20 72 | 65 76 65 72 73 65 20 6f | means r|everse o|
|00001000| 72 64 65 72 29 2c 20 42 | 45 47 20 61 6e 64 20 45 |rder), B|EG and E|
|00001010| 4e 44 20 28 72 65 67 69 | 6f 6e 20 74 6f 20 73 6f |ND (regi|on to so|
|00001020| 72 74 29 2e 22 20 22 50 | 5c 6e 72 22 5d 29 0a 28 |rt)." "P|\nr"]).(|
|00001030| 64 65 66 61 6c 69 61 73 | 20 27 73 6f 72 74 2d 70 |defalias| 'sort-p|
|00001040| 61 67 65 73 20 23 5b 28 | 72 65 76 65 72 73 65 20 |ages #[(|reverse |
|00001050| 62 65 67 20 65 6e 64 29 | 20 22 8a 8c 08 09 7d 88 |beg end)| "....}.|
|00001060| 65 62 88 c2 0b c4 c5 23 | 2a 87 22 20 5b 62 65 67 |eb.....#|*." [beg|
|00001070| 20 65 6e 64 20 73 6f 72 | 74 2d 73 75 62 72 20 72 | end sor|t-subr r|
|00001080| 65 76 65 72 73 65 20 23 | 5b 6e 69 6c 20 22 c0 c1 |everse #|[nil "..|
|00001090| 77 87 22 20 5b 22 5c 6e | 22 20 6e 69 6c 5d 20 32 |w." ["\n|" nil] 2|
|000010a0| 5d 20 66 6f 72 77 61 72 | 64 2d 70 61 67 65 5d 20 |] forwar|d-page] |
|000010b0| 34 20 22 5c 0a 53 6f 72 | 74 20 70 61 67 65 73 20 |4 "\.Sor|t pages |
|000010c0| 69 6e 20 72 65 67 69 6f | 6e 20 61 6c 70 68 61 62 |in regio|n alphab|
|000010d0| 65 74 69 63 61 6c 6c 79 | 3b 20 61 72 67 75 6d 65 |etically|; argume|
|000010e0| 6e 74 20 6d 65 61 6e 73 | 20 64 65 73 63 65 6e 64 |nt means| descend|
|000010f0| 69 6e 67 20 6f 72 64 65 | 72 2e 0a 43 61 6c 6c 65 |ing orde|r..Calle|
|00001100| 64 20 66 72 6f 6d 20 61 | 20 70 72 6f 67 72 61 6d |d from a| program|
|00001110| 2c 20 74 68 65 72 65 20 | 61 72 65 20 74 68 72 65 |, there |are thre|
|00001120| 65 20 61 72 67 75 6d 65 | 6e 74 73 3a 0a 52 45 56 |e argume|nts:.REV|
|00001130| 45 52 53 45 20 28 6e 6f | 6e 2d 6e 69 6c 20 6d 65 |ERSE (no|n-nil me|
|00001140| 61 6e 73 20 72 65 76 65 | 72 73 65 20 6f 72 64 65 |ans reve|rse orde|
|00001150| 72 29 2c 20 42 45 47 20 | 61 6e 64 20 45 4e 44 20 |r), BEG |and END |
|00001160| 28 72 65 67 69 6f 6e 20 | 74 6f 20 73 6f 72 74 29 |(region |to sort)|
|00001170| 2e 22 20 22 50 5c 6e 72 | 22 5d 29 0a 28 62 79 74 |." "P\nr|"]).(byt|
|00001180| 65 2d 63 6f 64 65 20 22 | c0 c1 21 84 08 00 c2 11 |e-code "|..!.....|
|00001190| 09 84 46 00 c3 20 c4 1d | 1e 06 0d c7 57 83 26 00 |..F.. ..|....W.&.|
|000011a0| c8 0d c9 0e 06 23 88 0d | 54 89 15 82 13 00 c8 ca |.....#..|T.......|
|000011b0| cb 0e 06 23 88 c8 cc cb | 0e 06 23 88 c8 cd cb 0e |...#....|..#.....|
|000011c0| 06 23 88 c8 ce cf 0e 06 | 23 88 0e 06 11 2a c2 87 |.#......|#....*..|
|000011d0| 22 20 5b 62 6f 75 6e 64 | 70 20 73 6f 72 74 2d 66 |" [bound|p sort-f|
|000011e0| 69 65 6c 64 73 2d 73 79 | 6e 74 61 78 2d 74 61 62 |ields-sy|ntax-tab|
|000011f0| 6c 65 20 6e 69 6c 20 6d | 61 6b 65 2d 73 79 6e 74 |le nil m|ake-synt|
|00001200| 61 78 2d 74 61 62 6c 65 | 20 30 20 69 20 74 61 62 |ax-table| 0 i tab|
|00001210| 6c 65 20 32 35 36 20 6d | 6f 64 69 66 79 2d 73 79 |le 256 m|odify-sy|
|00001220| 6e 74 61 78 2d 65 6e 74 | 72 79 20 22 77 22 20 33 |ntax-ent|ry "w" 3|
|00001230| 32 20 22 20 22 20 39 20 | 31 30 20 34 36 20 22 5f |2 " " 9 |10 46 "_|
|00001240| 22 5d 20 35 29 0a 28 64 | 65 66 61 6c 69 61 73 20 |"] 5).(d|efalias |
|00001250| 27 73 6f 72 74 2d 6e 75 | 6d 65 72 69 63 2d 66 69 |'sort-nu|meric-fi|
|00001260| 65 6c 64 73 20 23 5b 28 | 66 69 65 6c 64 20 62 65 |elds #[(|field be|
|00001270| 67 20 65 6e 64 29 20 22 | c0 09 5c 6e 0b c4 c5 25 |g end) "|..\n...%|
|00001280| 87 22 20 5b 73 6f 72 74 | 2d 66 69 65 6c 64 73 2d |." [sort|-fields-|
|00001290| 31 20 66 69 65 6c 64 20 | 62 65 67 20 65 6e 64 20 |1 field |beg end |
|000012a0| 23 5b 6e 69 6c 20 22 c0 | 09 53 21 88 c2 60 8a c3 |#[nil ".|.S!..`..|
|000012b0| c4 21 88 60 29 7b 21 87 | 22 20 5b 73 6f 72 74 2d |.!.`){!.|" [sort-|
|000012c0| 73 6b 69 70 2d 66 69 65 | 6c 64 73 20 66 69 65 6c |skip-fie|lds fiel|
|000012d0| 64 20 73 74 72 69 6e 67 | 2d 74 6f 2d 6e 75 6d 62 |d string|-to-numb|
|000012e0| 65 72 20 66 6f 72 77 61 | 72 64 2d 73 65 78 70 20 |er forwa|rd-sexp |
|000012f0| 31 5d 20 34 5d 20 6e 69 | 6c 5d 20 36 20 22 5c 0a |1] 4] ni|l] 6 "\.|
|00001300| 53 6f 72 74 20 6c 69 6e | 65 73 20 69 6e 20 72 65 |Sort lin|es in re|
|00001310| 67 69 6f 6e 20 6e 75 6d | 65 72 69 63 61 6c 6c 79 |gion num|erically|
|00001320| 20 62 79 20 74 68 65 20 | 41 52 47 74 68 20 66 69 | by the |ARGth fi|
|00001330| 65 6c 64 20 6f 66 20 65 | 61 63 68 20 6c 69 6e 65 |eld of e|ach line|
|00001340| 2e 0a 46 69 65 6c 64 73 | 20 61 72 65 20 73 65 70 |..Fields| are sep|
|00001350| 61 72 61 74 65 64 20 62 | 79 20 77 68 69 74 65 73 |arated b|y whites|
|00001360| 70 61 63 65 20 61 6e 64 | 20 6e 75 6d 62 65 72 65 |pace and| numbere|
|00001370| 64 20 66 72 6f 6d 20 31 | 20 75 70 2e 0a 53 70 65 |d from 1| up..Spe|
|00001380| 63 69 66 69 65 64 20 66 | 69 65 6c 64 20 6d 75 73 |cified f|ield mus|
|00001390| 74 20 63 6f 6e 74 61 69 | 6e 20 61 20 6e 75 6d 62 |t contai|n a numb|
|000013a0| 65 72 20 69 6e 20 65 61 | 63 68 20 6c 69 6e 65 20 |er in ea|ch line |
|000013b0| 6f 66 20 74 68 65 20 72 | 65 67 69 6f 6e 2e 0a 57 |of the r|egion..W|
|000013c0| 69 74 68 20 61 20 6e 65 | 67 61 74 69 76 65 20 61 |ith a ne|gative a|
|000013d0| 72 67 2c 20 73 6f 72 74 | 73 20 62 79 20 74 68 65 |rg, sort|s by the|
|000013e0| 20 41 52 47 74 68 20 66 | 69 65 6c 64 20 63 6f 75 | ARGth f|ield cou|
|000013f0| 6e 74 65 64 20 66 72 6f | 6d 20 74 68 65 20 72 69 |nted fro|m the ri|
|00001400| 67 68 74 2e 0a 43 61 6c | 6c 65 64 20 66 72 6f 6d |ght..Cal|led from|
|00001410| 20 61 20 70 72 6f 67 72 | 61 6d 2c 20 74 68 65 72 | a progr|am, ther|
|00001420| 65 20 61 72 65 20 74 68 | 72 65 65 20 61 72 67 75 |e are th|ree argu|
|00001430| 6d 65 6e 74 73 3a 0a 46 | 49 45 4c 44 2c 20 42 45 |ments:.F|IELD, BE|
|00001440| 47 20 61 6e 64 20 45 4e | 44 2e 20 20 42 45 47 20 |G and EN|D. BEG |
|00001450| 61 6e 64 20 45 4e 44 20 | 73 70 65 63 69 66 79 20 |and END |specify |
|00001460| 72 65 67 69 6f 6e 20 74 | 6f 20 73 6f 72 74 2e 0a |region t|o sort..|
|00001470| 49 66 20 79 6f 75 20 77 | 61 6e 74 20 74 6f 20 73 |If you w|ant to s|
|00001480| 6f 72 74 20 66 6c 6f 61 | 74 69 6e 67 2d 70 6f 69 |ort floa|ting-poi|
|00001490| 6e 74 20 6e 75 6d 62 65 | 72 73 2c 20 74 72 79 20 |nt numbe|rs, try |
|000014a0| 60 73 6f 72 74 2d 66 6c | 6f 61 74 2d 66 69 65 6c |`sort-fl|oat-fiel|
|000014b0| 64 73 27 2e 22 20 22 70 | 5c 6e 72 22 5d 29 0a 28 |ds'." "p|\nr"]).(|
|000014c0| 64 65 66 61 6c 69 61 73 | 20 27 73 6f 72 74 2d 66 |defalias| 'sort-f|
|000014d0| 6c 6f 61 74 2d 66 69 65 | 6c 64 73 20 23 5b 28 66 |loat-fie|lds #[(f|
|000014e0| 69 65 6c 64 20 62 65 67 | 20 65 6e 64 29 20 22 c0 |ield beg| end) ".|
|000014f0| 09 5c 6e 0b c4 c5 25 87 | 22 20 5b 73 6f 72 74 2d |.\n...%.|" [sort-|
|00001500| 66 69 65 6c 64 73 2d 31 | 20 66 69 65 6c 64 20 62 |fields-1| field b|
|00001510| 65 67 20 65 6e 64 20 23 | 5b 6e 69 6c 20 22 c0 09 |eg end #|[nil "..|
|00001520| 53 21 88 c2 60 8a c3 c4 | 21 88 60 29 7b 21 87 22 |S!..`...|!.`){!."|
|00001530| 20 5b 73 6f 72 74 2d 73 | 6b 69 70 2d 66 69 65 6c | [sort-s|kip-fiel|
|00001540| 64 73 20 66 69 65 6c 64 | 20 73 74 72 69 6e 67 2d |ds field| string-|
|00001550| 74 6f 2d 6e 75 6d 62 65 | 72 20 72 65 2d 73 65 61 |to-numbe|r re-sea|
|00001560| 72 63 68 2d 66 6f 72 77 | 61 72 64 20 22 5b 2b 2d |rch-forw|ard "[+-|
|00001570| 5d 3f 5b 30 2d 39 5d 2a | 2e 3f 5b 30 2d 39 5d 2a |]?[0-9]*|.?[0-9]*|
|00001580| 5c 5c 28 5b 65 45 5d 5b | 2b 2d 5d 3f 5b 30 2d 39 |\\([eE][|+-]?[0-9|
|00001590| 5d 2b 5c 5c 29 3f 22 5d | 20 34 5d 20 6e 69 6c 5d |]+\\)?"]| 4] nil]|
|000015a0| 20 36 20 22 5c 0a 53 6f | 72 74 20 6c 69 6e 65 73 | 6 "\.So|rt lines|
|000015b0| 20 69 6e 20 72 65 67 69 | 6f 6e 20 6e 75 6d 65 72 | in regi|on numer|
|000015c0| 69 63 61 6c 6c 79 20 62 | 79 20 74 68 65 20 41 52 |ically b|y the AR|
|000015d0| 47 74 68 20 66 69 65 6c | 64 20 6f 66 20 65 61 63 |Gth fiel|d of eac|
|000015e0| 68 20 6c 69 6e 65 2e 0a | 46 69 65 6c 64 73 20 61 |h line..|Fields a|
|000015f0| 72 65 20 73 65 70 61 72 | 61 74 65 64 20 62 79 20 |re separ|ated by |
|00001600| 77 68 69 74 65 73 70 61 | 63 65 20 61 6e 64 20 6e |whitespa|ce and n|
|00001610| 75 6d 62 65 72 65 64 20 | 66 72 6f 6d 20 31 20 75 |umbered |from 1 u|
|00001620| 70 2e 20 20 53 70 65 63 | 69 66 69 65 64 20 66 69 |p. Spec|ified fi|
|00001630| 65 6c 64 0a 6d 75 73 74 | 20 63 6f 6e 74 61 69 6e |eld.must| contain|
|00001640| 20 61 20 66 6c 6f 61 74 | 69 6e 67 20 70 6f 69 6e | a float|ing poin|
|00001650| 74 20 6e 75 6d 62 65 72 | 20 69 6e 20 65 61 63 68 |t number| in each|
|00001660| 20 6c 69 6e 65 20 6f 66 | 20 74 68 65 20 72 65 67 | line of| the reg|
|00001670| 69 6f 6e 2e 20 20 57 69 | 74 68 20 61 0a 6e 65 67 |ion. Wi|th a.neg|
|00001680| 61 74 69 76 65 20 61 72 | 67 2c 20 73 6f 72 74 73 |ative ar|g, sorts|
|00001690| 20 62 79 20 74 68 65 20 | 41 52 47 74 68 20 66 69 | by the |ARGth fi|
|000016a0| 65 6c 64 20 63 6f 75 6e | 74 65 64 20 66 72 6f 6d |eld coun|ted from|
|000016b0| 20 74 68 65 20 72 69 67 | 68 74 2e 20 20 43 61 6c | the rig|ht. Cal|
|000016c0| 6c 65 64 20 66 72 6f 6d | 20 61 0a 70 72 6f 67 72 |led from| a.progr|
|000016d0| 61 6d 2c 20 74 68 65 72 | 65 20 61 72 65 20 74 68 |am, ther|e are th|
|000016e0| 72 65 65 20 61 72 67 75 | 6d 65 6e 74 73 3a 20 46 |ree argu|ments: F|
|000016f0| 49 45 4c 44 2c 20 42 45 | 47 20 61 6e 64 20 45 4e |IELD, BE|G and EN|
|00001700| 44 2e 20 20 42 45 47 20 | 61 6e 64 20 45 4e 44 20 |D. BEG |and END |
|00001710| 73 70 65 63 69 66 79 0a | 72 65 67 69 6f 6e 20 74 |specify.|region t|
|00001720| 6f 20 73 6f 72 74 2e 22 | 20 22 70 5c 6e 72 22 5d |o sort."| "p\nr"]|
|00001730| 29 0a 28 64 65 66 61 6c | 69 61 73 20 27 73 6f 72 |).(defal|ias 'sor|
|00001740| 74 2d 66 69 65 6c 64 73 | 20 23 5b 28 66 69 65 6c |t-fields| #[(fiel|
|00001750| 64 20 62 65 67 20 65 6e | 64 29 20 22 c0 09 5c 6e |d beg en|d) "..\n|
|00001760| 0b c4 c5 25 87 22 20 5b | 73 6f 72 74 2d 66 69 65 |...%." [|sort-fie|
|00001770| 6c 64 73 2d 31 20 66 69 | 65 6c 64 20 62 65 67 20 |lds-1 fi|eld beg |
|00001780| 65 6e 64 20 23 5b 6e 69 | 6c 20 22 c0 09 53 21 88 |end #[ni|l "..S!.|
|00001790| c2 87 22 20 5b 73 6f 72 | 74 2d 73 6b 69 70 2d 66 |.." [sor|t-skip-f|
|000017a0| 69 65 6c 64 73 20 66 69 | 65 6c 64 20 6e 69 6c 5d |ields fi|eld nil]|
|000017b0| 20 32 5d 20 23 5b 6e 69 | 6c 20 22 c0 c1 77 87 22 | 2] #[ni|l "..w."|
|000017c0| 20 5b 22 5e 20 09 5c 6e | 22 20 6e 69 6c 5d 20 32 | ["^ .\n|" nil] 2|
|000017d0| 5d 5d 20 36 20 22 5c 0a | 53 6f 72 74 20 6c 69 6e |]] 6 "\.|Sort lin|
|000017e0| 65 73 20 69 6e 20 72 65 | 67 69 6f 6e 20 6c 65 78 |es in re|gion lex|
|000017f0| 69 63 6f 67 72 61 70 68 | 69 63 61 6c 6c 79 20 62 |icograph|ically b|
|00001800| 79 20 74 68 65 20 41 52 | 47 74 68 20 66 69 65 6c |y the AR|Gth fiel|
|00001810| 64 20 6f 66 20 65 61 63 | 68 20 6c 69 6e 65 2e 0a |d of eac|h line..|
|00001820| 46 69 65 6c 64 73 20 61 | 72 65 20 73 65 70 61 72 |Fields a|re separ|
|00001830| 61 74 65 64 20 62 79 20 | 77 68 69 74 65 73 70 61 |ated by |whitespa|
|00001840| 63 65 20 61 6e 64 20 6e | 75 6d 62 65 72 65 64 20 |ce and n|umbered |
|00001850| 66 72 6f 6d 20 31 20 75 | 70 2e 0a 57 69 74 68 20 |from 1 u|p..With |
|00001860| 61 20 6e 65 67 61 74 69 | 76 65 20 61 72 67 2c 20 |a negati|ve arg, |
|00001870| 73 6f 72 74 73 20 62 79 | 20 74 68 65 20 41 52 47 |sorts by| the ARG|
|00001880| 74 68 20 66 69 65 6c 64 | 20 63 6f 75 6e 74 65 64 |th field| counted|
|00001890| 20 66 72 6f 6d 20 74 68 | 65 20 72 69 67 68 74 2e | from th|e right.|
|000018a0| 0a 43 61 6c 6c 65 64 20 | 66 72 6f 6d 20 61 20 70 |.Called |from a p|
|000018b0| 72 6f 67 72 61 6d 2c 20 | 74 68 65 72 65 20 61 72 |rogram, |there ar|
|000018c0| 65 20 74 68 72 65 65 20 | 61 72 67 75 6d 65 6e 74 |e three |argument|
|000018d0| 73 3a 0a 46 49 45 4c 44 | 2c 20 42 45 47 20 61 6e |s:.FIELD|, BEG an|
|000018e0| 64 20 45 4e 44 2e 20 20 | 42 45 47 20 61 6e 64 20 |d END. |BEG and |
|000018f0| 45 4e 44 20 73 70 65 63 | 69 66 79 20 72 65 67 69 |END spec|ify regi|
|00001900| 6f 6e 20 74 6f 20 73 6f | 72 74 2e 22 20 22 70 5c |on to so|rt." "p\|
|00001910| 6e 72 22 5d 29 0a 28 62 | 79 74 65 2d 63 6f 64 65 |nr"]).(b|yte-code|
|00001920| 20 22 c0 c1 c2 5c 22 88 | c0 c3 c4 5c 22 87 22 20 | "...\".|...\"." |
|00001930| 5b 64 65 66 61 6c 69 61 | 73 20 73 6f 72 74 2d 66 |[defalia|s sort-f|
|00001940| 69 65 6c 64 73 2d 31 20 | 23 5b 28 66 69 65 6c 64 |ields-1 |#[(field|
|00001950| 20 62 65 67 20 65 6e 64 | 20 73 74 61 72 74 6b 65 | beg end| startke|
|00001960| 79 66 75 6e 20 65 6e 64 | 6b 65 79 66 75 6e 29 20 |yfun end|keyfun) |
|00001970| 22 c0 20 19 5c 6e c3 55 | 83 0b 00 c4 12 c5 8e 8a |". .\n.U|........|
|00001980| 8c 0e 06 0e 07 7d 88 65 | 62 88 c8 0e 09 21 88 ca |.....}.e|b....!..|
|00001990| cb cc cd 0e 0e 0e 0f 25 | 2c 87 22 20 5b 73 79 6e |.......%|,." [syn|
|000019a0| 74 61 78 2d 74 61 62 6c | 65 20 74 62 6c 20 66 69 |tax-tabl|e tbl fi|
|000019b0| 65 6c 64 20 30 20 31 20 | 28 28 73 65 74 2d 73 79 |eld 0 1 |((set-sy|
|000019c0| 6e 74 61 78 2d 74 61 62 | 6c 65 20 74 62 6c 29 29 |ntax-tab|le tbl))|
|000019d0| 20 62 65 67 20 65 6e 64 | 20 73 65 74 2d 73 79 6e | beg end| set-syn|
|000019e0| 74 61 78 2d 74 61 62 6c | 65 20 73 6f 72 74 2d 66 |tax-tabl|e sort-f|
|000019f0| 69 65 6c 64 73 2d 73 79 | 6e 74 61 78 2d 74 61 62 |ields-sy|ntax-tab|
|00001a00| 6c 65 20 73 6f 72 74 2d | 73 75 62 72 20 6e 69 6c |le sort-|subr nil|
|00001a10| 20 66 6f 72 77 61 72 64 | 2d 6c 69 6e 65 20 65 6e | forward|-line en|
|00001a20| 64 2d 6f 66 2d 6c 69 6e | 65 20 73 74 61 72 74 6b |d-of-lin|e startk|
|00001a30| 65 79 66 75 6e 20 65 6e | 64 6b 65 79 66 75 6e 5d |eyfun en|dkeyfun]|
|00001a40| 20 36 5d 20 73 6f 72 74 | 2d 73 6b 69 70 2d 66 69 | 6] sort|-skip-fi|
|00001a50| 65 6c 64 73 20 23 5b 28 | 6e 29 20 22 60 8a c0 7f |elds #[(|n) "`...|
|00001a60| 88 60 29 19 1a 0b c4 56 | 83 15 00 0b 76 88 82 1c |.`)....V|....v...|
|00001a70| 00 c5 7f 88 0b 54 76 88 | 60 09 59 83 28 00 0b c4 |.....Tv.|`.Y.(...|
|00001a80| 56 84 34 00 60 5c 6e 57 | 83 3b 00 0b c4 57 83 3b |V.4.`\nW|.;...W.;|
|00001a90| 00 c6 c7 5c 6e 09 7b 5c | 22 88 c8 c5 77 2a 87 22 |...\n.{\|"...w*."|
|00001aa0| 20 5b 31 20 65 6f 6c 20 | 62 6f 6c 20 6e 20 30 20 | [1 eol |bol n 0 |
|00001ab0| 6e 69 6c 20 65 72 72 6f | 72 20 22 4c 69 6e 65 20 |nil erro|r "Line |
|00001ac0| 68 61 73 20 74 6f 6f 20 | 66 65 77 20 66 69 65 6c |has too |few fiel|
|00001ad0| 64 73 3a 20 25 73 22 20 | 22 20 09 22 5d 20 34 5d |ds: %s" |" ."] 4]|
|00001ae0| 5d 20 33 29 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |] 3).(de|falias '|
|00001af0| 73 6f 72 74 2d 72 65 67 | 65 78 70 2d 66 69 65 6c |sort-reg|exp-fiel|
|00001b00| 64 73 20 23 5b 28 72 65 | 76 65 72 73 65 20 72 65 |ds #[(re|verse re|
|00001b10| 63 6f 72 64 2d 72 65 67 | 65 78 70 20 6b 65 79 2d |cord-reg|exp key-|
|00001b20| 72 65 67 65 78 70 20 62 | 65 67 20 65 6e 64 29 20 |regexp b|eg end) |
|00001b30| 22 08 c1 9a 84 0c 00 08 | c2 9a 83 11 00 c3 10 82 |".......|........|
|00001b40| 1e 00 c4 c5 08 5c 22 83 | 1e 00 08 c6 48 c7 5a 10 |.....\".|....H.Z.|
|00001b50| 8a 8c 0e 08 0e 09 7d 88 | 65 62 88 ca 1e 0b cc 0e |......}.|eb......|
|00001b60| 0d 21 88 60 16 0b c3 94 | 62 88 ce 0e 0f d0 d1 d2 |.!.`....|b.......|
|00001b70| 24 2b 87 22 20 5b 6b 65 | 79 2d 72 65 67 65 78 70 |$+." [ke|y-regexp|
|00001b80| 20 22 22 20 22 5c 5c 26 | 22 20 30 20 73 74 72 69 | "" "\\&|" 0 stri|
|00001b90| 6e 67 2d 6d 61 74 63 68 | 20 22 5c 5c 60 5c 5c 5c |ng-match| "\\`\\\|
|00001ba0| 5c 5b 31 2d 39 5d 5c 5c | 27 22 20 31 20 34 38 20 |\[1-9]\\|'" 1 48 |
|00001bb0| 62 65 67 20 65 6e 64 20 | 6e 69 6c 20 73 6f 72 74 |beg end |nil sort|
|00001bc0| 2d 72 65 67 65 78 70 2d | 72 65 63 6f 72 64 2d 65 |-regexp-|record-e|
|00001bd0| 6e 64 20 72 65 2d 73 65 | 61 72 63 68 2d 66 6f 72 |nd re-se|arch-for|
|00001be0| 77 61 72 64 20 72 65 63 | 6f 72 64 2d 72 65 67 65 |ward rec|ord-rege|
|00001bf0| 78 70 20 73 6f 72 74 2d | 73 75 62 72 20 72 65 76 |xp sort-|subr rev|
|00001c00| 65 72 73 65 20 23 5b 6e | 69 6c 20 22 c0 09 c2 c3 |erse #[n|il "....|
|00001c10| 23 85 12 00 c4 95 89 15 | 85 12 00 c4 94 62 87 22 |#.......|.....b."|
|00001c20| 20 5b 72 65 2d 73 65 61 | 72 63 68 2d 66 6f 72 77 | [re-sea|rch-forw|
|00001c30| 61 72 64 20 72 65 63 6f | 72 64 2d 72 65 67 65 78 |ard reco|rd-regex|
|00001c40| 70 20 6e 69 6c 20 6d 6f | 76 65 20 30 20 73 6f 72 |p nil mo|ve 0 sor|
|00001c50| 74 2d 72 65 67 65 78 70 | 2d 72 65 63 6f 72 64 2d |t-regexp|-record-|
|00001c60| 65 6e 64 5d 20 34 5d 20 | 23 5b 6e 69 6c 20 22 08 |end] 4] |#[nil ".|
|00001c70| 62 87 22 20 5b 73 6f 72 | 74 2d 72 65 67 65 78 70 |b." [sor|t-regexp|
|00001c80| 2d 72 65 63 6f 72 64 2d | 65 6e 64 5d 20 31 5d 20 |-record-|end] 1] |
|00001c90| 23 5b 6e 69 6c 20 22 c0 | 19 5c 6e a7 83 0c 00 5c |#[nil ".|.\n....\|
|00001ca0| 6e 11 82 1e 00 c3 5c 6e | 0c c5 23 83 19 00 c0 11 |n.....\n|..#.....|
|00001cb0| 82 1e 00 c6 c7 c8 5c 22 | 88 c8 c9 ca 8f 29 87 22 |......\"|.....)."|
|00001cc0| 20 5b 30 20 6e 20 6b 65 | 79 2d 72 65 67 65 78 70 | [0 n ke|y-regexp|
|00001cd0| 20 72 65 2d 73 65 61 72 | 63 68 2d 66 6f 72 77 61 | re-sear|ch-forwa|
|00001ce0| 72 64 20 73 6f 72 74 2d | 72 65 67 65 78 70 2d 72 |rd sort-|regexp-r|
|00001cf0| 65 63 6f 72 64 2d 65 6e | 64 20 74 20 74 68 72 6f |ecord-en|d t thro|
|00001d00| 77 20 6b 65 79 20 6e 69 | 6c 20 28 62 79 74 65 2d |w key ni|l (byte-|
|00001d10| 63 6f 64 65 20 22 c0 c1 | 21 83 0c 00 5c 6e 94 5c |code "..|!...\n.\|
|00001d20| 6e 95 42 87 5c 6e 94 5c | 6e 95 7b 87 22 20 5b 66 |n.B.\n.\|n.{." [f|
|00001d30| 62 6f 75 6e 64 70 20 62 | 75 66 66 65 72 2d 73 75 |boundp b|uffer-su|
|00001d40| 62 73 74 72 69 6e 67 2d | 6c 65 73 73 70 20 6e 5d |bstring-|lessp n]|
|00001d50| 20 32 29 20 28 28 65 72 | 72 6f 72 20 28 62 79 74 | 2) ((er|ror (byt|
|00001d60| 65 2d 63 6f 64 65 20 22 | c0 c1 c2 5c 22 87 22 20 |e-code "|...\"." |
|00001d70| 5b 74 68 72 6f 77 20 6b | 65 79 20 6e 69 6c 5d 20 |[throw k|ey nil] |
|00001d80| 33 29 29 29 5d 20 34 5d | 5d 20 35 20 22 5c 0a 53 |3)))] 4]|] 5 "\.S|
|00001d90| 6f 72 74 20 74 68 65 20 | 72 65 67 69 6f 6e 20 6c |ort the |region l|
|00001da0| 65 78 69 63 6f 67 72 61 | 70 68 69 63 61 6c 6c 79 |exicogra|phically|
|00001db0| 20 61 73 20 73 70 65 63 | 69 66 69 65 64 20 62 79 | as spec|ified by|
|00001dc0| 20 52 45 43 4f 52 44 2d | 52 45 47 45 58 50 20 61 | RECORD-|REGEXP a|
|00001dd0| 6e 64 20 4b 45 59 2e 0a | 52 45 43 4f 52 44 2d 52 |nd KEY..|RECORD-R|
|00001de0| 45 47 45 58 50 20 73 70 | 65 63 69 66 69 65 73 20 |EGEXP sp|ecifies |
|00001df0| 74 68 65 20 74 65 78 74 | 75 61 6c 20 75 6e 69 74 |the text|ual unit|
|00001e00| 73 20 77 68 69 63 68 20 | 73 68 6f 75 6c 64 20 62 |s which |should b|
|00001e10| 65 20 73 6f 72 74 65 64 | 2e 0a 20 20 46 6f 72 20 |e sorted|.. For |
|00001e20| 65 78 61 6d 70 6c 65 2c | 20 74 6f 20 73 6f 72 74 |example,| to sort|
|00001e30| 20 6c 69 6e 65 73 20 52 | 45 43 4f 52 44 2d 52 45 | lines R|ECORD-RE|
|00001e40| 47 45 58 50 20 77 6f 75 | 6c 64 20 62 65 20 5c 22 |GEXP wou|ld be \"|
|00001e50| 5e 2e 2a 24 5c 22 0a 4b | 45 59 20 73 70 65 63 69 |^.*$\".K|EY speci|
|00001e60| 66 69 65 73 20 74 68 65 | 20 70 61 72 74 20 6f 66 |fies the| part of|
|00001e70| 20 65 61 63 68 20 72 65 | 63 6f 72 64 20 28 69 65 | each re|cord (ie|
|00001e80| 20 65 61 63 68 20 6d 61 | 74 63 68 20 66 6f 72 20 | each ma|tch for |
|00001e90| 52 45 43 4f 52 44 2d 52 | 45 47 45 58 50 29 0a 20 |RECORD-R|EGEXP). |
|00001ea0| 20 69 73 20 74 6f 20 62 | 65 20 75 73 65 64 20 66 | is to b|e used f|
|00001eb0| 6f 72 20 73 6f 72 74 69 | 6e 67 2e 0a 20 20 49 66 |or sorti|ng.. If|
|00001ec0| 20 69 74 20 69 73 20 5c | 22 5c 5c 64 69 67 69 74 | it is \|"\\digit|
|00001ed0| 5c 22 20 74 68 65 6e 20 | 74 68 65 20 64 69 67 69 |\" then |the digi|
|00001ee0| 74 27 74 68 20 5c 22 5c | 5c 28 2e 2e 2e 5c 5c 29 |t'th \"\|\(...\\)|
|00001ef0| 5c 22 20 6d 61 74 63 68 | 20 66 69 65 6c 64 20 66 |\" match| field f|
|00001f00| 72 6f 6d 0a 20 20 52 45 | 43 4f 52 44 2d 52 45 47 |rom. RE|CORD-REG|
|00001f10| 45 58 50 20 69 73 20 75 | 73 65 64 2e 0a 20 20 49 |EXP is u|sed.. I|
|00001f20| 66 20 69 74 20 69 73 20 | 5c 22 5c 5c 26 5c 22 20 |f it is |\"\\&\" |
|00001f30| 74 68 65 6e 20 74 68 65 | 20 77 68 6f 6c 65 20 72 |then the| whole r|
|00001f40| 65 63 6f 72 64 20 69 73 | 20 75 73 65 64 2e 0a 20 |ecord is| used.. |
|00001f50| 20 4f 74 68 65 72 77 69 | 73 65 2c 20 69 74 20 69 | Otherwi|se, it i|
|00001f60| 73 20 61 20 72 65 67 75 | 6c 61 72 2d 65 78 70 72 |s a regu|lar-expr|
|00001f70| 65 73 73 69 6f 6e 20 66 | 6f 72 20 77 68 69 63 68 |ession f|or which|
|00001f80| 20 74 6f 20 73 65 61 72 | 63 68 20 77 69 74 68 69 | to sear|ch withi|
|00001f90| 6e 20 74 68 65 20 72 65 | 63 6f 72 64 2e 0a 49 66 |n the re|cord..If|
|00001fa0| 20 61 20 6d 61 74 63 68 | 20 66 6f 72 20 4b 45 59 | a match| for KEY|
|00001fb0| 20 69 73 20 6e 6f 74 20 | 66 6f 75 6e 64 20 77 69 | is not |found wi|
|00001fc0| 74 68 69 6e 20 61 20 72 | 65 63 6f 72 64 20 74 68 |thin a r|ecord th|
|00001fd0| 65 6e 20 74 68 61 74 20 | 72 65 63 6f 72 64 20 69 |en that |record i|
|00001fe0| 73 20 69 67 6e 6f 72 65 | 64 2e 0a 0a 57 69 74 68 |s ignore|d...With|
|00001ff0| 20 61 20 6e 65 67 61 74 | 69 76 65 20 70 72 65 66 | a negat|ive pref|
|00002000| 69 78 20 61 72 67 20 73 | 6f 72 74 73 20 69 6e 20 |ix arg s|orts in |
|00002010| 72 65 76 65 72 73 65 20 | 6f 72 64 65 72 2e 0a 0a |reverse |order...|
|00002020| 46 6f 72 20 65 78 61 6d | 70 6c 65 3a 20 74 6f 20 |For exam|ple: to |
|00002030| 73 6f 72 74 20 6c 69 6e | 65 73 20 69 6e 20 74 68 |sort lin|es in th|
|00002040| 65 20 72 65 67 69 6f 6e | 20 62 79 20 74 68 65 20 |e region| by the |
|00002050| 66 69 72 73 74 20 77 6f | 72 64 20 6f 6e 20 65 61 |first wo|rd on ea|
|00002060| 63 68 20 6c 69 6e 65 0a | 20 73 74 61 72 74 69 6e |ch line.| startin|
|00002070| 67 20 77 69 74 68 20 74 | 68 65 20 6c 65 74 74 65 |g with t|he lette|
|00002080| 72 20 5c 22 66 5c 22 2c | 0a 20 52 45 43 4f 52 44 |r \"f\",|. RECORD|
|00002090| 2d 52 45 47 45 58 50 20 | 77 6f 75 6c 64 20 62 65 |-REGEXP |would be|
|000020a0| 20 5c 22 5e 2e 2a 24 5c | 22 20 61 6e 64 20 4b 45 | \"^.*$\|" and KE|
|000020b0| 59 20 77 6f 75 6c 64 20 | 62 65 20 5c 22 5c 5c 3d |Y would |be \"\\=|
|000020c0| 5c 5c 3c 66 5c 5c 77 2a | 5c 5c 3e 5c 22 22 20 22 |\\<f\\w*|\\>\"" "|
|000020d0| 50 5c 6e 73 52 65 67 65 | 78 70 20 73 70 65 63 69 |P\nsRege|xp speci|
|000020e0| 66 79 69 6e 67 20 72 65 | 63 6f 72 64 73 20 74 6f |fying re|cords to|
|000020f0| 20 73 6f 72 74 3a 20 5c | 6e 73 52 65 67 65 78 70 | sort: \|nsRegexp|
|00002100| 20 73 70 65 63 69 66 79 | 69 6e 67 20 6b 65 79 20 | specify|ing key |
|00002110| 77 69 74 68 69 6e 20 72 | 65 63 6f 72 64 3a 20 5c |within r|ecord: \|
|00002120| 6e 72 22 5d 29 0a 28 62 | 79 74 65 2d 63 6f 64 65 |nr"]).(b|yte-code|
|00002130| 20 22 c0 c1 21 84 08 00 | c2 11 c0 87 22 20 5b 62 | "..!...|...." [b|
|00002140| 6f 75 6e 64 70 20 73 6f | 72 74 2d 63 6f 6c 75 6d |oundp so|rt-colum|
|00002150| 6e 73 2d 73 75 62 70 72 | 6f 63 65 73 73 20 74 5d |ns-subpr|ocess t]|
|00002160| 20 32 29 0a 28 64 65 66 | 61 6c 69 61 73 20 27 73 | 2).(def|alias 's|
|00002170| 6f 72 74 2d 63 6f 6c 75 | 6d 6e 73 20 23 5b 28 72 |ort-colu|mns #[(r|
|00002180| 65 76 65 72 73 65 20 26 | 6f 70 74 69 6f 6e 61 6c |everse &|optional|
|00002190| 20 62 65 67 20 65 6e 64 | 29 20 22 8a c0 89 89 89 | beg end|) ".....|
|000021a0| 89 89 19 1a 1b 1c 1d 1e | 06 0e 07 0e 08 5e 62 88 |........|.....^b.|
|000021b0| 69 14 c9 79 88 60 16 06 | 0e 07 0e 08 5d 62 88 69 |i..y.`..|....]b.i|
|000021c0| 13 c0 79 88 60 15 0c 0b | 5e 12 0c 0b 5d 11 ca cb |..y.`...|^...]...|
|000021d0| 0e 06 cc 23 83 40 00 cd | ce 21 88 0e 0f d0 3d 84 |...#.@..|.!....=.|
|000021e0| 64 00 d1 0e 06 0d d2 cc | 89 c0 0e 13 83 58 00 d4 |d.......|.....X..|
|000021f0| 82 59 00 d5 d6 5c 6e 50 | d7 09 50 26 09 82 78 00 |.Y...\nP|..P&..x.|
|00002200| 8a 8c 0e 06 0d 7d 88 0e | 06 62 88 d8 0e 13 d9 da |.....}..|.b......|
|00002210| db dc 25 2a 2e 07 87 22 | 20 5b 6e 69 6c 20 63 6f |..%*..."| [nil co|
|00002220| 6c 2d 65 6e 64 20 63 6f | 6c 2d 73 74 61 72 74 20 |l-end co|l-start |
|00002230| 63 6f 6c 2d 65 6e 64 31 | 20 63 6f 6c 2d 62 65 67 |col-end1| col-beg|
|00002240| 31 20 65 6e 64 31 20 62 | 65 67 31 20 62 65 67 20 |1 end1 b|eg1 beg |
|00002250| 65 6e 64 20 30 20 73 65 | 61 72 63 68 2d 62 61 63 |end 0 se|arch-bac|
|00002260| 6b 77 61 72 64 20 22 09 | 22 20 74 20 65 72 72 6f |kward ".|" t erro|
|00002270| 72 20 22 73 6f 72 74 2d | 63 6f 6c 75 6d 6e 73 20 |r "sort-|columns |
|00002280| 64 6f 65 73 20 6e 6f 74 | 20 77 6f 72 6b 20 77 69 |does not| work wi|
|00002290| 74 68 20 74 61 62 73 2e | 20 20 55 73 65 20 4d 2d |th tabs.| Use M-|
|000022a0| 78 20 75 6e 74 61 62 69 | 66 79 2e 22 20 73 79 73 |x untabi|fy." sys|
|000022b0| 74 65 6d 2d 74 79 70 65 | 20 76 61 78 2d 76 6d 73 |tem-type| vax-vms|
|000022c0| 20 63 61 6c 6c 2d 70 72 | 6f 63 65 73 73 2d 72 65 | call-pr|ocess-re|
|000022d0| 67 69 6f 6e 20 22 73 6f | 72 74 22 20 72 65 76 65 |gion "so|rt" reve|
|000022e0| 72 73 65 20 22 2d 72 74 | 5c 6e 22 20 22 2d 74 5c |rse "-rt|\n" "-t\|
|000022f0| 6e 22 20 22 2b 30 2e 22 | 20 22 2d 30 2e 22 20 73 |n" "+0."| "-0." s|
|00002300| 6f 72 74 2d 73 75 62 72 | 20 66 6f 72 77 61 72 64 |ort-subr| forward|
|00002310| 2d 6c 69 6e 65 20 65 6e | 64 2d 6f 66 2d 6c 69 6e |-line en|d-of-lin|
|00002320| 65 20 23 5b 6e 69 6c 20 | 22 c0 09 21 88 c2 87 22 |e #[nil |"..!..."|
|00002330| 20 5b 6d 6f 76 65 2d 74 | 6f 2d 63 6f 6c 75 6d 6e | [move-t|o-column|
|00002340| 20 63 6f 6c 2d 73 74 61 | 72 74 20 6e 69 6c 5d 20 | col-sta|rt nil] |
|00002350| 32 5d 20 23 5b 6e 69 6c | 20 22 c0 09 21 88 c2 87 |2] #[nil| "..!...|
|00002360| 22 20 5b 6d 6f 76 65 2d | 74 6f 2d 63 6f 6c 75 6d |" [move-|to-colum|
|00002370| 6e 20 63 6f 6c 2d 65 6e | 64 20 6e 69 6c 5d 20 32 |n col-en|d nil] 2|
|00002380| 5d 5d 20 31 31 20 22 5c | 0a 53 6f 72 74 20 6c 69 |]] 11 "\|.Sort li|
|00002390| 6e 65 73 20 69 6e 20 72 | 65 67 69 6f 6e 20 61 6c |nes in r|egion al|
|000023a0| 70 68 61 62 65 74 69 63 | 61 6c 6c 79 20 62 79 20 |phabetic|ally by |
|000023b0| 61 20 63 65 72 74 61 69 | 6e 20 72 61 6e 67 65 20 |a certai|n range |
|000023c0| 6f 66 20 63 6f 6c 75 6d | 6e 73 2e 0a 46 6f 72 20 |of colum|ns..For |
|000023d0| 74 68 65 20 70 75 72 70 | 6f 73 65 20 6f 66 20 74 |the purp|ose of t|
|000023e0| 68 69 73 20 63 6f 6d 6d | 61 6e 64 2c 20 74 68 65 |his comm|and, the|
|000023f0| 20 72 65 67 69 6f 6e 20 | 69 6e 63 6c 75 64 65 73 | region |includes|
|00002400| 0a 74 68 65 20 65 6e 74 | 69 72 65 20 6c 69 6e 65 |.the ent|ire line|
|00002410| 20 74 68 61 74 20 70 6f | 69 6e 74 20 69 73 20 69 | that po|int is i|
|00002420| 6e 20 61 6e 64 20 74 68 | 65 20 65 6e 74 69 72 65 |n and th|e entire|
|00002430| 20 6c 69 6e 65 20 74 68 | 65 20 6d 61 72 6b 20 69 | line th|e mark i|
|00002440| 73 20 69 6e 2e 0a 54 68 | 65 20 63 6f 6c 75 6d 6e |s in..Th|e column|
|00002450| 20 70 6f 73 69 74 69 6f | 6e 73 20 6f 66 20 70 6f | positio|ns of po|
|00002460| 69 6e 74 20 61 6e 64 20 | 6d 61 72 6b 20 62 6f 75 |int and |mark bou|
|00002470| 6e 64 20 74 68 65 20 72 | 61 6e 67 65 20 6f 66 20 |nd the r|ange of |
|00002480| 63 6f 6c 75 6d 6e 73 20 | 74 6f 20 73 6f 72 74 20 |columns |to sort |
|00002490| 6f 6e 2e 0a 41 20 70 72 | 65 66 69 78 20 61 72 67 |on..A pr|efix arg|
|000024a0| 75 6d 65 6e 74 20 6d 65 | 61 6e 73 20 73 6f 72 74 |ument me|ans sort|
|000024b0| 20 69 6e 74 6f 20 72 65 | 76 65 72 73 65 20 6f 72 | into re|verse or|
|000024c0| 64 65 72 2e 0a 0a 4e 6f | 74 65 20 74 68 61 74 20 |der...No|te that |
|000024d0| 60 73 6f 72 74 2d 63 6f | 6c 75 6d 6e 73 27 20 72 |`sort-co|lumns' r|
|000024e0| 65 6a 65 63 74 73 20 74 | 65 78 74 20 74 68 61 74 |ejects t|ext that|
|000024f0| 20 63 6f 6e 74 61 69 6e | 73 20 74 61 62 73 2c 0a | contain|s tabs,.|
|00002500| 62 65 63 61 75 73 65 20 | 74 61 62 73 20 63 6f 75 |because |tabs cou|
|00002510| 6c 64 20 62 65 20 73 70 | 6c 69 74 20 61 63 72 6f |ld be sp|lit acro|
|00002520| 73 73 20 74 68 65 20 73 | 70 65 63 69 66 69 65 64 |ss the s|pecified|
|00002530| 20 63 6f 6c 75 6d 6e 73 | 0a 61 6e 64 20 69 74 20 | columns|.and it |
|00002540| 64 6f 65 73 6e 27 74 20 | 6b 6e 6f 77 20 68 6f 77 |doesn't |know how|
|00002550| 20 74 6f 20 68 61 6e 64 | 6c 65 20 74 68 61 74 2e | to hand|le that.|
|00002560| 20 20 41 6c 73 6f 2c 20 | 77 68 65 6e 20 70 6f 73 | Also, |when pos|
|00002570| 73 69 62 6c 65 2c 0a 69 | 74 20 75 73 65 73 20 74 |sible,.i|t uses t|
|00002580| 68 65 20 60 73 6f 72 74 | 27 20 75 74 69 6c 69 74 |he `sort|' utilit|
|00002590| 79 20 70 72 6f 67 72 61 | 6d 2c 20 77 68 69 63 68 |y progra|m, which|
|000025a0| 20 64 6f 65 73 6e 27 74 | 20 75 6e 64 65 72 73 74 | doesn't| underst|
|000025b0| 61 6e 64 20 74 61 62 73 | 2e 0a 55 73 65 20 5c 5c |and tabs|..Use \\|
|000025c0| 5b 75 6e 74 61 62 69 66 | 79 5d 20 74 6f 20 63 6f |[untabif|y] to co|
|000025d0| 6e 76 65 72 74 20 74 61 | 62 73 20 74 6f 20 73 70 |nvert ta|bs to sp|
|000025e0| 61 63 65 73 20 62 65 66 | 6f 72 65 20 73 6f 72 74 |aces bef|ore sort|
|000025f0| 69 6e 67 2e 22 20 22 50 | 5c 6e 72 22 5d 29 0a 28 |ing." "P|\nr"]).(|
|00002600| 64 65 66 61 6c 69 61 73 | 20 27 72 65 76 65 72 73 |defalias| 'revers|
|00002610| 65 2d 72 65 67 69 6f 6e | 20 23 5b 28 62 65 67 20 |e-region| #[(beg |
|00002620| 65 6e 64 29 20 22 08 09 | 56 83 0f 00 c2 1b 09 13 |end) "..|V.......|
|00002630| 08 11 0b 10 29 8a 08 62 | 88 6e 84 1a 00 c4 79 88 |....)..b|.n....y.|
|00002640| 60 10 09 62 88 6c 83 27 | 00 6e 83 2d 00 c5 79 88 |`..b.l.'|.n.-..y.|
|00002650| c2 7f 88 c6 20 11 c2 c7 | 1e 08 1e 09 0e 08 83 60 |.... ...|.......`|
|00002660| 00 08 62 88 60 c2 7f 88 | 60 7b 0e 09 42 16 09 60 |..b.`...|`{..B..`|
|00002670| 09 55 3f 16 08 08 0e 08 | 83 5a 00 60 54 82 5b 00 |.U?.....|.Z.`T.[.|
|00002680| 60 7c 88 82 36 00 0e 09 | 41 83 76 00 0e 09 40 ca |`|..6...|A.v...@.|
|00002690| b1 02 88 0e 09 41 89 16 | 09 82 62 00 0e 09 40 63 |.....A..|..b...@c|
|000026a0| 2b 87 22 20 5b 62 65 67 | 20 65 6e 64 20 6e 69 6c |+." [beg| end nil|
|000026b0| 20 6d 69 64 20 31 20 2d | 31 20 70 6f 69 6e 74 2d | mid 1 -|1 point-|
|000026c0| 6d 61 72 6b 65 72 20 74 | 20 64 6f 20 6c 6c 20 22 |marker t| do ll "|
|000026d0| 5c 6e 22 5d 20 33 20 22 | 5c 0a 52 65 76 65 72 73 |\n"] 3 "|\.Revers|
|000026e0| 65 20 74 68 65 20 6f 72 | 64 65 72 20 6f 66 20 6c |e the or|der of l|
|000026f0| 69 6e 65 73 20 69 6e 20 | 61 20 72 65 67 69 6f 6e |ines in |a region|
|00002700| 2e 0a 46 72 6f 6d 20 61 | 20 70 72 6f 67 72 61 6d |..From a| program|
|00002710| 20 74 61 6b 65 73 20 74 | 77 6f 20 70 6f 69 6e 74 | takes t|wo point|
|00002720| 20 6f 72 20 6d 61 72 6b | 65 72 20 61 72 67 75 6d | or mark|er argum|
|00002730| 65 6e 74 73 2c 20 42 45 | 47 20 61 6e 64 20 45 4e |ents, BE|G and EN|
|00002740| 44 2e 22 20 22 72 22 5d | 29 0a 28 70 72 6f 76 69 |D." "r"]|).(provi|
|00002750| 64 65 20 28 71 75 6f 74 | 65 20 73 6f 72 74 29 29 |de (quot|e sort))|
|00002760| 0a | |. | |
+--------+-------------------------+-------------------------+--------+--------+