home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / emacs-19.16 / lisp / sc-alist.elc < prev    next >
Emacs Compiled Lisp  |  1993-07-05  |  3.9 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
1% dexvert Combustion 2 Particle Library (other/combustion2ParticleLibrary) ext Unsupported
100% file Emacs/XEmacs v19 byte-compiled Lisp data default
99% file data default
100% TrID Emacs/XEmacs byte-compiled Lisp (generic) default
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 4d 6f | 6e 20 4a 75 6c 20 20 35 |du on Mo|n Jul 5|
|00000040| 20 32 33 3a 35 34 3a 35 | 38 20 31 39 39 33 0a 3b | 23:54:5|8 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 63 2d | 61 6c 69 73 74 2e 65 6c |lisp/sc-|alist.el|
|00000080| 0a 3b 3b 3b 20 65 6d 61 | 63 73 20 76 65 72 73 69 |.;;; ema|cs versi|
|00000090| 6f 6e 20 31 39 2e 31 35 | 2e 31 36 2e 0a 3b 3b 3b |on 19.15|.16..;;;|
|000000a0| 20 62 79 74 65 63 6f 6d | 70 20 76 65 72 73 69 6f | bytecom|p versio|
|000000b0| 6e 20 46 53 46 20 32 2e | 31 30 0a 3b 3b 3b 20 6f |n FSF 2.|10.;;; o|
|000000c0| 70 74 69 6d 69 7a 61 74 | 69 6f 6e 20 69 73 20 6f |ptimizat|ion is o|
|000000d0| 6e 2e 0a 3b 3b 3b 20 74 | 68 69 73 20 66 69 6c 65 |n..;;; t|his file|
|000000e0| 20 75 73 65 73 20 6f 70 | 63 6f 64 65 73 20 77 68 | uses op|codes wh|
|000000f0| 69 63 68 20 64 6f 20 6e | 6f 74 20 65 78 69 73 74 |ich do n|ot exist|
|00000100| 20 69 6e 20 45 6d 61 63 | 73 20 31 38 2e 0a 0a 28 | in Emac|s 18...(|
|00000110| 69 66 20 28 61 6e 64 20 | 28 62 6f 75 6e 64 70 20 |if (and |(boundp |
|00000120| 27 65 6d 61 63 73 2d 76 | 65 72 73 69 6f 6e 29 0a |'emacs-v|ersion).|
|00000130| 09 20 28 6f 72 20 28 61 | 6e 64 20 28 62 6f 75 6e |. (or (a|nd (boun|
|00000140| 64 70 20 27 65 70 6f 63 | 68 3a 3a 76 65 72 73 69 |dp 'epoc|h::versi|
|00000150| 6f 6e 29 20 65 70 6f 63 | 68 3a 3a 76 65 72 73 69 |on) epoc|h::versi|
|00000160| 6f 6e 29 0a 09 20 20 20 | 20 20 28 73 74 72 69 6e |on).. | (strin|
|00000170| 67 2d 6c 65 73 73 70 20 | 65 6d 61 63 73 2d 76 65 |g-lessp |emacs-ve|
|00000180| 72 73 69 6f 6e 20 22 31 | 39 22 29 29 29 0a 20 20 |rsion "1|9"))). |
|00000190| 20 20 28 65 72 72 6f 72 | 20 22 54 68 69 73 20 66 | (error| "This f|
|000001a0| 69 6c 65 20 77 61 73 20 | 63 6f 6d 70 69 6c 65 64 |ile was |compiled|
|000001b0| 20 66 6f 72 20 45 6d 61 | 63 73 20 31 39 22 29 29 | for Ema|cs 19"))|
|000001c0| 0a 0a 28 70 72 6f 76 69 | 64 65 20 28 71 75 6f 74 |..(provi|de (quot|
|000001d0| 65 20 73 63 2d 61 6c 69 | 73 74 29 29 0a 28 64 65 |e sc-ali|st)).(de|
|000001e0| 66 61 6c 69 61 73 20 27 | 61 73 6f 72 74 20 23 5b |falias '|asort #[|
|000001f0| 28 61 6c 69 73 74 2d 73 | 79 6d 62 6f 6c 20 6b 65 |(alist-s|ymbol ke|
|00000200| 79 29 20 22 08 c1 c2 c3 | 08 21 21 c4 5c 22 4c 87 |y) "....|.!!.\"L.|
|00000210| 22 20 5b 61 6c 69 73 74 | 2d 73 79 6d 62 6f 6c 20 |" [alist|-symbol |
|00000220| 73 6f 72 74 20 63 6f 70 | 79 2d 61 6c 69 73 74 20 |sort cop|y-alist |
|00000230| 65 76 61 6c 20 23 5b 28 | 61 20 62 29 20 22 08 40 |eval #[(|a b) ".@|
|00000240| 09 9a 87 22 20 5b 61 20 | 6b 65 79 5d 20 32 5d 5d |..." [a |key] 2]]|
|00000250| 20 35 20 22 5c 0a 4d 6f | 76 65 20 61 20 73 70 65 | 5 "\.Mo|ve a spe|
|00000260| 63 69 66 69 65 64 20 6b | 65 79 2d 76 61 6c 75 65 |cified k|ey-value|
|00000270| 20 70 61 69 72 20 74 6f | 20 74 68 65 20 68 65 61 | pair to| the hea|
|00000280| 64 20 6f 66 20 61 6e 20 | 61 6c 69 73 74 2e 0a 54 |d of an |alist..T|
|00000290| 68 65 20 61 6c 69 73 74 | 20 69 73 20 72 65 66 65 |he alist| is refe|
|000002a0| 72 65 6e 63 65 64 20 62 | 79 20 41 4c 49 53 54 2d |renced b|y ALIST-|
|000002b0| 53 59 4d 42 4f 4c 2e 20 | 4b 65 79 2d 76 61 6c 75 |SYMBOL. |Key-valu|
|000002c0| 65 20 70 61 69 72 20 74 | 6f 20 6d 6f 76 65 20 74 |e pair t|o move t|
|000002d0| 6f 0a 68 65 61 64 20 69 | 73 20 6f 6e 65 20 6d 61 |o.head i|s one ma|
|000002e0| 74 63 68 69 6e 67 20 4b | 45 59 2e 20 20 52 65 74 |tching K|EY. Ret|
|000002f0| 75 72 6e 73 20 74 68 65 | 20 73 6f 72 74 65 64 20 |urns the| sorted |
|00000300| 6c 69 73 74 20 61 6e 64 | 20 64 6f 65 73 6e 27 74 |list and| doesn't|
|00000310| 20 61 66 66 65 63 74 0a | 74 68 65 20 6f 72 64 65 | affect.|the orde|
|00000320| 72 20 6f 66 20 61 6e 79 | 20 6f 74 68 65 72 20 6b |r of any| other k|
|00000330| 65 79 2d 76 61 6c 75 65 | 20 70 61 69 72 2e 20 20 |ey-value| pair. |
|00000340| 53 69 64 65 20 65 66 66 | 65 63 74 20 73 65 74 73 |Side eff|ect sets|
|00000350| 20 61 6c 69 73 74 20 74 | 6f 20 6e 65 77 0a 73 6f | alist t|o new.so|
|00000360| 72 74 65 64 20 6c 69 73 | 74 2e 22 5d 29 0a 28 64 |rted lis|t."]).(d|
|00000370| 65 66 61 6c 69 61 73 20 | 27 61 65 6c 65 6d 65 6e |efalias |'aelemen|
|00000380| 74 20 23 5b 28 6b 65 79 | 20 76 61 6c 75 65 29 20 |t #[(key| value) |
|00000390| 22 08 09 42 43 87 22 20 | 5b 6b 65 79 20 76 61 6c |"..BC." |[key val|
|000003a0| 75 65 5d 20 32 20 22 5c | 0a 4d 61 6b 65 73 20 61 |ue] 2 "\|.Makes a|
|000003b0| 20 6c 69 73 74 20 6f 66 | 20 61 20 63 6f 6e 73 20 | list of| a cons |
|000003c0| 63 65 6c 6c 20 63 6f 6e | 74 61 69 6e 69 6e 67 20 |cell con|taining |
|000003d0| 63 61 72 20 6f 66 20 4b | 45 59 20 61 6e 64 20 63 |car of K|EY and c|
|000003e0| 64 72 20 6f 66 20 56 41 | 4c 55 45 2e 0a 54 68 65 |dr of VA|LUE..The|
|000003f0| 20 72 65 74 75 72 6e 65 | 64 20 6c 69 73 74 20 69 | returne|d list i|
|00000400| 73 20 73 75 69 74 61 62 | 6c 65 20 61 73 20 61 6e |s suitab|le as an|
|00000410| 20 65 6c 65 6d 65 6e 74 | 20 6f 66 20 61 6e 20 61 | element| of an a|
|00000420| 6c 69 73 74 2e 22 5d 29 | 0a 28 64 65 66 61 6c 69 |list."])|.(defali|
|00000430| 61 73 20 27 61 68 65 61 | 64 73 79 6d 20 23 5b 28 |as 'ahea|dsym #[(|
|00000440| 61 6c 69 73 74 29 20 22 | 08 40 40 87 22 20 5b 61 |alist) "|.@@." [a|
|00000450| 6c 69 73 74 5d 20 31 20 | 22 5c 0a 52 65 74 75 72 |list] 1 |"\.Retur|
|00000460| 6e 20 74 68 65 20 6b 65 | 79 20 73 79 6d 62 6f 6c |n the ke|y symbol|
|00000470| 20 61 74 20 74 68 65 20 | 68 65 61 64 20 6f 66 20 | at the |head of |
|00000480| 41 4c 49 53 54 2e 22 5d | 29 0a 28 64 65 66 61 6c |ALIST."]|).(defal|
|00000490| 69 61 73 20 27 61 6e 6f | 74 2d 68 65 61 64 2d 70 |ias 'ano|t-head-p|
|000004a0| 20 23 5b 28 61 6c 69 73 | 74 20 6b 65 79 29 20 22 | #[(alis|t key) "|
|000004b0| c0 09 21 5c 6e 9a 3f 87 | 22 20 5b 61 68 65 61 64 |..!\n.?.|" [ahead|
|000004c0| 73 79 6d 20 61 6c 69 73 | 74 20 6b 65 79 5d 20 32 |sym alis|t key] 2|
|000004d0| 20 22 5c 0a 46 69 6e 64 | 20 6f 75 74 20 69 66 20 | "\.Find| out if |
|000004e0| 61 20 73 70 65 63 69 66 | 69 65 64 20 6b 65 79 2d |a specif|ied key-|
|000004f0| 76 61 6c 75 65 20 70 61 | 69 72 20 69 73 20 6e 6f |value pa|ir is no|
|00000500| 74 20 61 74 20 74 68 65 | 20 68 65 61 64 20 6f 66 |t at the| head of|
|00000510| 20 61 6e 20 61 6c 69 73 | 74 2e 0a 54 68 65 20 61 | an alis|t..The a|
|00000520| 6c 69 73 74 20 74 6f 20 | 63 68 65 63 6b 20 69 73 |list to |check is|
|00000530| 20 73 70 65 63 69 66 69 | 65 64 20 62 79 20 41 4c | specifi|ed by AL|
|00000540| 49 53 54 20 61 6e 64 20 | 74 68 65 20 6b 65 79 2d |IST and |the key-|
|00000550| 76 61 6c 75 65 20 70 61 | 69 72 20 69 73 20 74 68 |value pa|ir is th|
|00000560| 65 0a 6f 6e 65 20 6d 61 | 74 63 68 69 6e 67 20 74 |e.one ma|tching t|
|00000570| 68 65 20 73 75 70 70 6c | 69 65 64 20 4b 45 59 2e |he suppl|ied KEY.|
|00000580| 20 20 52 65 74 75 72 6e | 73 20 6e 69 6c 20 69 66 | Return|s nil if|
|00000590| 20 41 4c 49 53 54 20 69 | 73 20 6e 69 6c 2c 20 6f | ALIST i|s nil, o|
|000005a0| 72 20 69 66 0a 6b 65 79 | 2d 76 61 6c 75 65 20 70 |r if.key|-value p|
|000005b0| 61 69 72 20 69 73 20 61 | 74 20 74 68 65 20 68 65 |air is a|t the he|
|000005c0| 61 64 20 6f 66 20 74 68 | 65 20 61 6c 69 73 74 2e |ad of th|e alist.|
|000005d0| 20 20 52 65 74 75 72 6e | 73 20 74 20 69 66 20 6b | Return|s t if k|
|000005e0| 65 79 2d 76 61 6c 75 65 | 0a 70 61 69 72 20 69 73 |ey-value|.pair is|
|000005f0| 20 6e 6f 74 20 61 74 20 | 74 68 65 20 68 65 61 64 | not at |the head|
|00000600| 20 6f 66 20 61 6c 69 73 | 74 2e 20 20 41 4c 49 53 | of alis|t. ALIS|
|00000610| 54 20 69 73 20 6e 6f 74 | 20 61 6c 74 65 72 65 64 |T is not| altered|
|00000620| 2e 22 5d 29 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |."]).(de|falias '|
|00000630| 61 70 75 74 20 23 5b 28 | 61 6c 69 73 74 2d 73 79 |aput #[(|alist-sy|
|00000640| 6d 62 6f 6c 20 6b 65 79 | 20 26 6f 70 74 69 6f 6e |mbol key| &option|
|00000650| 61 6c 20 76 61 6c 75 65 | 29 20 22 c0 09 5c 6e 5c |al value|) "..\n\|
|00000660| 22 c3 1c 1d c6 0e 07 09 | 5c 22 88 c8 0e 07 21 89 |".......|\"....!.|
|00000670| 14 84 1d 00 0e 07 0d 4c | 82 39 00 c9 0c 09 5c 22 |.......L|.9....\"|
|00000680| 83 2d 00 0e 07 0d 0c a4 | 4c 82 39 00 5c 6e 83 38 |.-......|L.9.\n.8|
|00000690| 00 0c 0d 40 a0 82 39 00 | 0c 2a 87 22 20 5b 61 65 |...@..9.|.*." [ae|
|000006a0| 6c 65 6d 65 6e 74 20 6b | 65 79 20 76 61 6c 75 65 |lement k|ey value|
|000006b0| 20 6e 69 6c 20 61 6c 69 | 73 74 20 65 6c 65 6d 20 | nil ali|st elem |
|000006c0| 61 73 6f 72 74 20 61 6c | 69 73 74 2d 73 79 6d 62 |asort al|ist-symb|
|000006d0| 6f 6c 20 65 76 61 6c 20 | 61 6e 6f 74 2d 68 65 61 |ol eval |anot-hea|
|000006e0| 64 2d 70 5d 20 34 20 22 | 5c 0a 49 6e 73 65 72 74 |d-p] 4 "|\.Insert|
|000006f0| 73 20 61 20 6b 65 79 2d | 76 61 6c 75 65 20 70 61 |s a key-|value pa|
|00000700| 69 72 20 69 6e 74 6f 20 | 61 6e 20 61 6c 69 73 74 |ir into |an alist|
|00000710| 2e 0a 54 68 65 20 61 6c | 69 73 74 20 69 73 20 72 |..The al|ist is r|
|00000720| 65 66 65 72 65 6e 63 65 | 64 20 62 79 20 41 4c 49 |eference|d by ALI|
|00000730| 53 54 2d 53 59 4d 42 4f | 4c 2e 20 54 68 65 20 6b |ST-SYMBO|L. The k|
|00000740| 65 79 2d 76 61 6c 75 65 | 20 70 61 69 72 20 69 73 |ey-value| pair is|
|00000750| 20 6d 61 64 65 0a 66 72 | 6f 6d 20 4b 45 59 20 61 | made.fr|om KEY a|
|00000760| 6e 64 20 6f 70 74 69 6f | 6e 61 6c 6c 79 2c 20 56 |nd optio|nally, V|
|00000770| 41 4c 55 45 2e 20 52 65 | 74 75 72 6e 73 20 74 68 |ALUE. Re|turns th|
|00000780| 65 20 61 6c 74 65 72 65 | 64 20 61 6c 69 73 74 20 |e altere|d alist |
|00000790| 6f 72 20 6e 69 6c 20 69 | 66 0a 41 4c 49 53 54 20 |or nil i|f.ALIST |
|000007a0| 69 73 20 6e 69 6c 2e 0a | 0a 49 66 20 74 68 65 20 |is nil..|.If the |
|000007b0| 6b 65 79 2d 76 61 6c 75 | 65 20 70 61 69 72 20 72 |key-valu|e pair r|
|000007c0| 65 66 65 72 65 6e 63 65 | 64 20 62 79 20 4b 45 59 |eference|d by KEY|
|000007d0| 20 63 61 6e 20 62 65 20 | 66 6f 75 6e 64 20 69 6e | can be |found in|
|000007e0| 20 74 68 65 20 61 6c 69 | 73 74 2c 20 61 6e 64 0a | the ali|st, and.|
|000007f0| 56 41 4c 55 45 20 69 73 | 20 73 75 70 70 6c 69 65 |VALUE is| supplie|
|00000800| 64 20 6e 6f 6e 2d 6e 69 | 6c 2c 20 74 68 65 6e 20 |d non-ni|l, then |
|00000810| 74 68 65 20 76 61 6c 75 | 65 20 6f 66 20 4b 45 59 |the valu|e of KEY|
|00000820| 20 77 69 6c 6c 20 62 65 | 20 73 65 74 20 74 6f 20 | will be| set to |
|00000830| 56 41 4c 55 45 2e 0a 49 | 66 20 56 41 4c 55 45 20 |VALUE..I|f VALUE |
|00000840| 69 73 20 6e 6f 74 20 73 | 75 70 70 6c 69 65 64 2c |is not s|upplied,|
|00000850| 20 6f 72 20 69 73 20 6e | 69 6c 2c 20 74 68 65 20 | or is n|il, the |
|00000860| 6b 65 79 2d 76 61 6c 75 | 65 20 70 61 69 72 20 77 |key-valu|e pair w|
|00000870| 69 6c 6c 20 6e 6f 74 20 | 62 65 0a 6d 6f 64 69 66 |ill not |be.modif|
|00000880| 69 65 64 2c 20 62 75 74 | 20 77 69 6c 6c 20 62 65 |ied, but| will be|
|00000890| 20 6d 6f 76 65 64 20 74 | 6f 20 74 68 65 20 68 65 | moved t|o the he|
|000008a0| 61 64 20 6f 66 20 74 68 | 65 20 61 6c 69 73 74 2e |ad of th|e alist.|
|000008b0| 20 49 66 20 74 68 65 20 | 6b 65 79 2d 76 61 6c 75 | If the |key-valu|
|000008c0| 65 0a 70 61 69 72 20 63 | 61 6e 6e 6f 74 20 62 65 |e.pair c|annot be|
|000008d0| 20 66 6f 75 6e 64 20 69 | 6e 20 74 68 65 20 61 6c | found i|n the al|
|000008e0| 69 73 74 2c 20 69 74 20 | 77 69 6c 6c 20 62 65 20 |ist, it |will be |
|000008f0| 69 6e 73 65 72 74 65 64 | 20 69 6e 74 6f 20 74 68 |inserted| into th|
|00000900| 65 20 68 65 61 64 0a 6f | 66 20 74 68 65 20 61 6c |e head.o|f the al|
|00000910| 69 73 74 20 28 77 69 74 | 68 20 76 61 6c 75 65 20 |ist (wit|h value |
|00000920| 6e 69 6c 20 69 66 20 56 | 41 4c 55 45 20 69 73 20 |nil if V|ALUE is |
|00000930| 6e 69 6c 20 6f 72 20 6e | 6f 74 20 73 75 70 70 6c |nil or n|ot suppl|
|00000940| 69 65 64 29 2e 22 5d 29 | 0a 28 64 65 66 61 6c 69 |ied)."])|.(defali|
|00000950| 61 73 20 27 61 64 65 6c | 65 74 65 20 23 5b 28 61 |as 'adel|ete #[(a|
|00000960| 6c 69 73 74 2d 73 79 6d | 62 6f 6c 20 6b 65 79 29 |list-sym|bol key)|
|00000970| 20 22 c0 09 5c 6e 5c 22 | 88 c3 09 21 89 1c 84 11 | "..\n\"|...!....|
|00000980| 00 c5 82 20 00 c6 0c 5c | 6e 5c 22 83 1c 00 0c 82 |... ...\|n\".....|
|00000990| 20 00 09 0c 41 4c 29 87 | 22 20 5b 61 73 6f 72 74 | ...AL).|" [asort|
|000009a0| 20 61 6c 69 73 74 2d 73 | 79 6d 62 6f 6c 20 6b 65 | alist-s|ymbol ke|
|000009b0| 79 20 65 76 61 6c 20 61 | 6c 69 73 74 20 6e 69 6c |y eval a|list nil|
|000009c0| 20 61 6e 6f 74 2d 68 65 | 61 64 2d 70 5d 20 34 20 | anot-he|ad-p] 4 |
|000009d0| 22 5c 0a 44 65 6c 65 74 | 65 20 61 20 6b 65 79 2d |"\.Delet|e a key-|
|000009e0| 76 61 6c 75 65 20 70 61 | 69 72 20 66 72 6f 6d 20 |value pa|ir from |
|000009f0| 74 68 65 20 61 6c 69 73 | 74 2e 0a 41 6c 69 73 74 |the alis|t..Alist|
|00000a00| 20 69 73 20 72 65 66 65 | 72 65 6e 63 65 64 20 62 | is refe|renced b|
|00000a10| 79 20 41 4c 49 53 54 2d | 53 59 4d 42 4f 4c 20 61 |y ALIST-|SYMBOL a|
|00000a20| 6e 64 20 74 68 65 20 6b | 65 79 2d 76 61 6c 75 65 |nd the k|ey-value|
|00000a30| 20 70 61 69 72 20 74 6f | 20 72 65 6d 6f 76 65 0a | pair to| remove.|
|00000a40| 69 73 20 70 61 69 72 20 | 6d 61 74 63 68 69 6e 67 |is pair |matching|
|00000a50| 20 4b 45 59 2e 20 20 52 | 65 74 75 72 6e 73 20 74 | KEY. R|eturns t|
|00000a60| 68 65 20 61 6c 74 65 72 | 65 64 20 61 6c 69 73 74 |he alter|ed alist|
|00000a70| 2e 22 5d 29 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |."]).(de|falias '|
|00000a80| 61 67 65 74 20 23 5b 28 | 61 6c 69 73 74 20 6b 65 |aget #[(|alist ke|
|00000a90| 79 20 26 6f 70 74 69 6f | 6e 61 6c 20 6b 65 79 6e |y &optio|nal keyn|
|00000aa0| 69 6c 2d 70 29 20 22 c0 | 09 21 1a 09 84 0c 00 c3 |il-p) ".|.!......|
|00000ab0| 82 32 00 c4 c2 0d 5c 22 | 88 c6 5c 6e 0d 5c 22 83 |.2....\"|..\n.\".|
|00000ac0| 1c 00 c3 82 32 00 5c 6e | 40 41 86 32 00 0e 07 83 |....2.\n|@A.2....|
|00000ad0| 2b 00 c3 82 32 00 5c 6e | 40 40 86 32 00 c3 29 87 |+...2.\n|@@.2..).|
|00000ae0| 22 20 5b 63 6f 70 79 2d | 61 6c 69 73 74 20 61 6c |" [copy-|alist al|
|00000af0| 69 73 74 20 63 6f 70 79 | 20 6e 69 6c 20 61 73 6f |ist copy| nil aso|
|00000b00| 72 74 20 6b 65 79 20 61 | 6e 6f 74 2d 68 65 61 64 |rt key a|not-head|
|00000b10| 2d 70 20 6b 65 79 6e 69 | 6c 2d 70 5d 20 33 20 22 |-p keyni|l-p] 3 "|
|00000b20| 5c 0a 52 65 74 75 72 6e | 73 20 74 68 65 20 76 61 |\.Return|s the va|
|00000b30| 6c 75 65 20 69 6e 20 41 | 4c 49 53 54 20 74 68 61 |lue in A|LIST tha|
|00000b40| 74 20 69 73 20 61 73 73 | 6f 63 69 61 74 65 64 20 |t is ass|ociated |
|00000b50| 77 69 74 68 20 4b 45 59 | 2e 0a 4f 70 74 69 6f 6e |with KEY|..Option|
|00000b60| 61 6c 20 4b 45 59 4e 49 | 4c 2d 50 20 64 65 73 63 |al KEYNI|L-P desc|
|00000b70| 72 69 62 65 73 20 77 68 | 61 74 20 74 6f 20 64 6f |ribes wh|at to do|
|00000b80| 20 69 66 20 74 68 65 20 | 76 61 6c 75 65 20 61 73 | if the |value as|
|00000b90| 73 6f 63 69 61 74 65 64 | 20 77 69 74 68 0a 4b 45 |sociated| with.KE|
|00000ba0| 59 20 69 73 20 6e 69 6c | 2e 20 20 49 66 20 4b 45 |Y is nil|. If KE|
|00000bb0| 59 4e 49 4c 2d 50 20 69 | 73 20 6e 6f 74 20 73 75 |YNIL-P i|s not su|
|00000bc0| 70 70 6c 69 65 64 20 6f | 72 20 69 73 20 6e 69 6c |pplied o|r is nil|
|00000bd0| 2c 20 61 6e 64 20 74 68 | 65 20 76 61 6c 75 65 20 |, and th|e value |
|00000be0| 69 73 0a 6e 69 6c 2c 20 | 74 68 65 6e 20 4b 45 59 |is.nil, |then KEY|
|00000bf0| 20 69 73 20 72 65 74 75 | 72 6e 65 64 2e 20 20 49 | is retu|rned. I|
|00000c00| 66 20 4b 45 59 4e 49 4c | 2d 50 20 69 73 20 6e 6f |f KEYNIL|-P is no|
|00000c10| 6e 2d 6e 69 6c 2c 20 74 | 68 65 6e 20 6e 69 6c 20 |n-nil, t|hen nil |
|00000c20| 77 6f 75 6c 64 20 62 65 | 0a 72 65 74 75 72 6e 65 |would be|.returne|
|00000c30| 64 2e 0a 0a 49 66 20 6e | 6f 20 6b 65 79 2d 76 61 |d...If n|o key-va|
|00000c40| 6c 75 65 20 70 61 69 72 | 20 6d 61 74 63 68 69 6e |lue pair| matchin|
|00000c50| 67 20 4b 45 59 20 63 6f | 75 6c 64 20 62 65 20 66 |g KEY co|uld be f|
|00000c60| 6f 75 6e 64 20 69 6e 20 | 41 4c 49 53 54 2c 20 6f |ound in |ALIST, o|
|00000c70| 72 20 41 4c 49 53 54 20 | 69 73 0a 6e 69 6c 20 74 |r ALIST |is.nil t|
|00000c80| 68 65 6e 20 6e 69 6c 20 | 69 73 20 72 65 74 75 72 |hen nil |is retur|
|00000c90| 6e 65 64 2e 20 41 4c 49 | 53 54 20 69 73 20 6e 6f |ned. ALI|ST is no|
|00000ca0| 74 20 61 6c 74 65 72 65 | 64 2e 22 5d 29 0a 28 64 |t altere|d."]).(d|
|00000cb0| 65 66 61 6c 69 61 73 20 | 27 61 6d 61 6b 65 20 23 |efalias |'amake #|
|00000cc0| 5b 28 61 6c 69 73 74 2d | 73 79 6d 62 6f 6c 20 6b |[(alist-|symbol k|
|00000cd0| 65 79 6c 69 73 74 20 26 | 6f 70 74 69 6f 6e 61 6c |eylist &|optional|
|00000ce0| 20 76 61 6c 75 65 6c 69 | 73 74 29 20 22 08 40 08 | valueli|st) ".@.|
|00000cf0| 41 09 40 09 41 1a 1b 1c | 1d 0c 84 1a 00 c6 0e 07 |A.@.A...|........|
|00000d00| 0d 0b 23 88 82 28 00 c8 | 0e 07 0c 5c 6e 23 88 c6 |..#..(..|...\n#..|
|00000d10| 0e 07 0d 0b 23 88 2c c9 | 0e 07 21 87 22 20 5b 6b |....#.,.|..!." [k|
|00000d20| 65 79 6c 69 73 74 20 76 | 61 6c 75 65 6c 69 73 74 |eylist v|aluelist|
|00000d30| 20 76 61 6c 63 64 72 20 | 76 61 6c 63 61 72 20 6b | valcdr |valcar k|
|00000d40| 65 79 63 64 72 20 6b 65 | 79 63 61 72 20 61 70 75 |eycdr ke|ycar apu|
|00000d50| 74 20 61 6c 69 73 74 2d | 73 79 6d 62 6f 6c 20 61 |t alist-|symbol a|
|00000d60| 6d 61 6b 65 20 65 76 61 | 6c 5d 20 34 20 22 5c 0a |make eva|l] 4 "\.|
|00000d70| 4d 61 6b 65 20 61 6e 20 | 61 73 73 6f 63 69 61 74 |Make an |associat|
|00000d80| 69 6f 6e 20 6c 69 73 74 | 2e 0a 54 68 65 20 61 73 |ion list|..The as|
|00000d90| 73 6f 63 69 61 74 69 6f | 6e 20 6c 69 73 74 20 69 |sociatio|n list i|
|00000da0| 73 20 61 74 74 61 63 68 | 65 64 20 74 6f 20 74 68 |s attach|ed to th|
|00000db0| 65 20 61 6c 69 73 74 20 | 72 65 66 65 72 65 6e 63 |e alist |referenc|
|00000dc0| 65 64 20 62 79 0a 41 4c | 49 53 54 2d 53 59 4d 42 |ed by.AL|IST-SYMB|
|00000dd0| 4f 4c 2e 20 45 61 63 68 | 20 65 6c 65 6d 65 6e 74 |OL. Each| element|
|00000de0| 20 69 6e 20 74 68 65 20 | 4b 45 59 4c 49 53 54 20 | in the |KEYLIST |
|00000df0| 62 65 63 6f 6d 65 73 20 | 61 20 6b 65 79 20 61 6e |becomes |a key an|
|00000e00| 64 20 69 73 0a 61 73 73 | 6f 63 69 61 74 65 64 20 |d is.ass|ociated |
|00000e10| 77 69 74 68 20 74 68 65 | 20 76 61 6c 75 65 20 69 |with the| value i|
|00000e20| 6e 20 56 41 4c 55 45 4c | 49 53 54 20 77 69 74 68 |n VALUEL|IST with|
|00000e30| 20 74 68 65 20 73 61 6d | 65 20 69 6e 64 65 78 2e | the sam|e index.|
|00000e40| 20 49 66 0a 56 41 4c 55 | 45 4c 49 53 54 20 69 73 | If.VALU|ELIST is|
|00000e50| 20 6e 6f 74 20 73 75 70 | 70 6c 69 65 64 20 6f 72 | not sup|plied or|
|00000e60| 20 69 73 20 6e 69 6c 2c | 20 74 68 65 6e 20 65 61 | is nil,| then ea|
|00000e70| 63 68 20 6b 65 79 20 69 | 6e 20 4b 45 59 4c 49 53 |ch key i|n KEYLIS|
|00000e80| 54 20 69 73 0a 61 73 73 | 6f 63 69 61 74 65 64 20 |T is.ass|ociated |
|00000e90| 77 69 74 68 20 6e 69 6c | 2e 0a 0a 4b 45 59 4c 49 |with nil|...KEYLI|
|00000ea0| 53 54 20 61 6e 64 20 56 | 41 4c 55 45 4c 49 53 54 |ST and V|ALUELIST|
|00000eb0| 20 73 68 6f 75 6c 64 20 | 68 61 76 65 20 74 68 65 | should |have the|
|00000ec0| 20 73 61 6d 65 20 6e 75 | 6d 62 65 72 20 6f 66 20 | same nu|mber of |
|00000ed0| 65 6c 65 6d 65 6e 74 73 | 2c 20 62 75 74 0a 74 68 |elements|, but.th|
|00000ee0| 69 73 20 69 73 6e 27 74 | 20 65 6e 66 6f 72 63 65 |is isn't| enforce|
|00000ef0| 64 2e 20 20 49 66 20 56 | 41 4c 55 45 4c 49 53 54 |d. If V|ALUELIST|
|00000f00| 20 69 73 20 73 6d 61 6c | 6c 65 72 20 74 68 61 6e | is smal|ler than|
|00000f10| 20 4b 45 59 4c 49 53 54 | 2c 20 72 65 6d 61 69 6e | KEYLIST|, remain|
|00000f20| 69 6e 67 0a 6b 65 79 73 | 20 61 72 65 20 61 73 73 |ing.keys| are ass|
|00000f30| 6f 63 69 61 74 65 64 20 | 77 69 74 68 20 6e 69 6c |ociated |with nil|
|00000f40| 2e 20 20 49 66 20 56 41 | 4c 55 45 4c 49 53 54 20 |. If VA|LUELIST |
|00000f50| 69 73 20 6c 61 72 67 65 | 72 20 74 68 61 6e 20 4b |is large|r than K|
|00000f60| 45 59 4c 49 53 54 2c 0a | 65 78 74 72 61 20 76 61 |EYLIST,.|extra va|
|00000f70| 6c 75 65 73 20 61 72 65 | 20 69 67 6e 6f 72 65 64 |lues are| ignored|
|00000f80| 2e 20 20 52 65 74 75 72 | 6e 73 20 74 68 65 20 63 |. Retur|ns the c|
|00000f90| 72 65 61 74 65 64 20 61 | 6c 69 73 74 2e 22 5d 29 |reated a|list."])|
|00000fa0| 0a | |. | |
+--------+-------------------------+-------------------------+--------+--------+