home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / source / a2.0bemacs-src.lha / Emacs-19.25 / lisp / assoc.elc < prev    next >
Emacs Compiled Lisp  |  1993-07-16  |  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
100% file Emacs/XEmacs v19 byte-compiled Lisp data default
99% file data default
100% TrID Emacs/XEmacs byte-compiled Lisp (generic) default



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 72 6f 6c 61 6e 64 40 |piled by| roland@|
|00000020| 63 68 75 72 63 68 79 2e | 67 6e 75 2e 61 69 2e 6d |churchy.|gnu.ai.m|
|00000030| 69 74 2e 65 64 75 20 6f | 6e 20 46 72 69 20 4a 75 |it.edu o|n Fri Ju|
|00000040| 6c 20 31 36 20 31 34 3a | 31 36 3a 34 35 20 31 39 |l 16 14:|16:45 19|
|00000050| 39 33 0a 3b 3b 3b 20 66 | 72 6f 6d 20 66 69 6c 65 |93.;;; f|rom file|
|00000060| 20 2f 67 64 2f 67 6e 75 | 2f 65 6d 61 63 73 2f 31 | /gd/gnu|/emacs/1|
|00000070| 39 2e 30 2f 6c 69 73 70 | 2f 61 73 73 6f 63 2e 65 |9.0/lisp|/assoc.e|
|00000080| 6c 0a 3b 3b 3b 20 65 6d | 61 63 73 20 76 65 72 73 |l.;;; em|acs vers|
|00000090| 69 6f 6e 20 31 39 2e 31 | 36 2e 31 30 2e 0a 3b 3b |ion 19.1|6.10..;;|
|000000a0| 3b 20 62 79 74 65 63 6f | 6d 70 20 76 65 72 73 69 |; byteco|mp versi|
|000000b0| 6f 6e 20 46 53 46 20 32 | 2e 31 30 0a 3b 3b 3b 20 |on FSF 2|.10.;;; |
|000000c0| 6f 70 74 69 6d 69 7a 61 | 74 69 6f 6e 20 69 73 20 |optimiza|tion is |
|000000d0| 6f 6e 2e 0a 3b 3b 3b 20 | 74 68 69 73 20 66 69 6c |on..;;; |this fil|
|000000e0| 65 20 75 73 65 73 20 6f | 70 63 6f 64 65 73 20 77 |e uses o|pcodes w|
|000000f0| 68 69 63 68 20 64 6f 20 | 6e 6f 74 20 65 78 69 73 |hich do |not exis|
|00000100| 74 20 69 6e 20 45 6d 61 | 63 73 20 31 38 2e 0a 0a |t in Ema|cs 18...|
|00000110| 28 69 66 20 28 61 6e 64 | 20 28 62 6f 75 6e 64 70 |(if (and| (boundp|
|00000120| 20 27 65 6d 61 63 73 2d | 76 65 72 73 69 6f 6e 29 | 'emacs-|version)|
|00000130| 0a 09 20 28 6f 72 20 28 | 61 6e 64 20 28 62 6f 75 |.. (or (|and (bou|
|00000140| 6e 64 70 20 27 65 70 6f | 63 68 3a 3a 76 65 72 73 |ndp 'epo|ch::vers|
|00000150| 69 6f 6e 29 20 65 70 6f | 63 68 3a 3a 76 65 72 73 |ion) epo|ch::vers|
|00000160| 69 6f 6e 29 0a 09 20 20 | 20 20 20 28 73 74 72 69 |ion).. | (stri|
|00000170| 6e 67 2d 6c 65 73 73 70 | 20 65 6d 61 63 73 2d 76 |ng-lessp| emacs-v|
|00000180| 65 72 73 69 6f 6e 20 22 | 31 39 22 29 29 29 0a 20 |ersion "|19"))). |
|00000190| 20 20 20 28 65 72 72 6f | 72 20 22 54 68 69 73 20 | (erro|r "This |
|000001a0| 66 69 6c 65 20 77 61 73 | 20 63 6f 6d 70 69 6c 65 |file was| compile|
|000001b0| 64 20 66 6f 72 20 45 6d | 61 63 73 20 31 39 22 29 |d for Em|acs 19")|
|000001c0| 29 0a 0a 28 64 65 66 61 | 6c 69 61 73 20 27 61 73 |)..(defa|lias 'as|
|000001d0| 6f 72 74 20 23 5b 28 61 | 6c 69 73 74 2d 73 79 6d |ort #[(a|list-sym|
|000001e0| 62 6f 6c 20 6b 65 79 29 | 20 22 08 c1 c2 c3 08 21 |bol key)| ".....!|
|000001f0| 21 c4 5c 22 4c 87 22 20 | 5b 61 6c 69 73 74 2d 73 |!.\"L." |[alist-s|
|00000200| 79 6d 62 6f 6c 20 73 6f | 72 74 20 63 6f 70 79 2d |ymbol so|rt copy-|
|00000210| 61 6c 69 73 74 20 65 76 | 61 6c 20 23 5b 28 61 20 |alist ev|al #[(a |
|00000220| 62 29 20 22 08 40 09 9a | 87 22 20 5b 61 20 6b 65 |b) ".@..|." [a ke|
|00000230| 79 5d 20 32 5d 5d 20 35 | 20 22 5c 0a 4d 6f 76 65 |y] 2]] 5| "\.Move|
|00000240| 20 61 20 73 70 65 63 69 | 66 69 65 64 20 6b 65 79 | a speci|fied key|
|00000250| 2d 76 61 6c 75 65 20 70 | 61 69 72 20 74 6f 20 74 |-value p|air to t|
|00000260| 68 65 20 68 65 61 64 20 | 6f 66 20 61 6e 20 61 6c |he head |of an al|
|00000270| 69 73 74 2e 0a 54 68 65 | 20 61 6c 69 73 74 20 69 |ist..The| alist i|
|00000280| 73 20 72 65 66 65 72 65 | 6e 63 65 64 20 62 79 20 |s refere|nced by |
|00000290| 41 4c 49 53 54 2d 53 59 | 4d 42 4f 4c 2e 20 4b 65 |ALIST-SY|MBOL. Ke|
|000002a0| 79 2d 76 61 6c 75 65 20 | 70 61 69 72 20 74 6f 20 |y-value |pair to |
|000002b0| 6d 6f 76 65 20 74 6f 0a | 68 65 61 64 20 69 73 20 |move to.|head is |
|000002c0| 6f 6e 65 20 6d 61 74 63 | 68 69 6e 67 20 4b 45 59 |one matc|hing KEY|
|000002d0| 2e 20 20 52 65 74 75 72 | 6e 73 20 74 68 65 20 73 |. Retur|ns the s|
|000002e0| 6f 72 74 65 64 20 6c 69 | 73 74 20 61 6e 64 20 64 |orted li|st and d|
|000002f0| 6f 65 73 6e 27 74 20 61 | 66 66 65 63 74 0a 74 68 |oesn't a|ffect.th|
|00000300| 65 20 6f 72 64 65 72 20 | 6f 66 20 61 6e 79 20 6f |e order |of any o|
|00000310| 74 68 65 72 20 6b 65 79 | 2d 76 61 6c 75 65 20 70 |ther key|-value p|
|00000320| 61 69 72 2e 20 20 53 69 | 64 65 20 65 66 66 65 63 |air. Si|de effec|
|00000330| 74 20 73 65 74 73 20 61 | 6c 69 73 74 20 74 6f 20 |t sets a|list to |
|00000340| 6e 65 77 0a 73 6f 72 74 | 65 64 20 6c 69 73 74 2e |new.sort|ed list.|
|00000350| 22 5d 29 0a 28 64 65 66 | 61 6c 69 61 73 20 27 61 |"]).(def|alias 'a|
|00000360| 65 6c 65 6d 65 6e 74 20 | 23 5b 28 6b 65 79 20 76 |element |#[(key v|
|00000370| 61 6c 75 65 29 20 22 08 | 09 42 43 87 22 20 5b 6b |alue) ".|.BC." [k|
|00000380| 65 79 20 76 61 6c 75 65 | 5d 20 32 20 22 5c 0a 4d |ey value|] 2 "\.M|
|00000390| 61 6b 65 73 20 61 20 6c | 69 73 74 20 6f 66 20 61 |akes a l|ist of a|
|000003a0| 20 63 6f 6e 73 20 63 65 | 6c 6c 20 63 6f 6e 74 61 | cons ce|ll conta|
|000003b0| 69 6e 69 6e 67 20 63 61 | 72 20 6f 66 20 4b 45 59 |ining ca|r of KEY|
|000003c0| 20 61 6e 64 20 63 64 72 | 20 6f 66 20 56 41 4c 55 | and cdr| of VALU|
|000003d0| 45 2e 0a 54 68 65 20 72 | 65 74 75 72 6e 65 64 20 |E..The r|eturned |
|000003e0| 6c 69 73 74 20 69 73 20 | 73 75 69 74 61 62 6c 65 |list is |suitable|
|000003f0| 20 61 73 20 61 6e 20 65 | 6c 65 6d 65 6e 74 20 6f | as an e|lement o|
|00000400| 66 20 61 6e 20 61 6c 69 | 73 74 2e 22 5d 29 0a 28 |f an ali|st."]).(|
|00000410| 64 65 66 61 6c 69 61 73 | 20 27 61 68 65 61 64 73 |defalias| 'aheads|
|00000420| 79 6d 20 23 5b 28 61 6c | 69 73 74 29 20 22 08 40 |ym #[(al|ist) ".@|
|00000430| 40 87 22 20 5b 61 6c 69 | 73 74 5d 20 31 20 22 5c |@." [ali|st] 1 "\|
|00000440| 0a 52 65 74 75 72 6e 20 | 74 68 65 20 6b 65 79 20 |.Return |the key |
|00000450| 73 79 6d 62 6f 6c 20 61 | 74 20 74 68 65 20 68 65 |symbol a|t the he|
|00000460| 61 64 20 6f 66 20 41 4c | 49 53 54 2e 22 5d 29 0a |ad of AL|IST."]).|
|00000470| 28 64 65 66 61 6c 69 61 | 73 20 27 61 6e 6f 74 2d |(defalia|s 'anot-|
|00000480| 68 65 61 64 2d 70 20 23 | 5b 28 61 6c 69 73 74 20 |head-p #|[(alist |
|00000490| 6b 65 79 29 20 22 c0 09 | 21 5c 6e 9a 3f 87 22 20 |key) "..|!\n.?." |
|000004a0| 5b 61 68 65 61 64 73 79 | 6d 20 61 6c 69 73 74 20 |[aheadsy|m alist |
|000004b0| 6b 65 79 5d 20 32 20 22 | 5c 0a 46 69 6e 64 20 6f |key] 2 "|\.Find o|
|000004c0| 75 74 20 69 66 20 61 20 | 73 70 65 63 69 66 69 65 |ut if a |specifie|
|000004d0| 64 20 6b 65 79 2d 76 61 | 6c 75 65 20 70 61 69 72 |d key-va|lue pair|
|000004e0| 20 69 73 20 6e 6f 74 20 | 61 74 20 74 68 65 20 68 | is not |at the h|
|000004f0| 65 61 64 20 6f 66 20 61 | 6e 20 61 6c 69 73 74 2e |ead of a|n alist.|
|00000500| 0a 54 68 65 20 61 6c 69 | 73 74 20 74 6f 20 63 68 |.The ali|st to ch|
|00000510| 65 63 6b 20 69 73 20 73 | 70 65 63 69 66 69 65 64 |eck is s|pecified|
|00000520| 20 62 79 20 41 4c 49 53 | 54 20 61 6e 64 20 74 68 | by ALIS|T and th|
|00000530| 65 20 6b 65 79 2d 76 61 | 6c 75 65 20 70 61 69 72 |e key-va|lue pair|
|00000540| 20 69 73 20 74 68 65 0a | 6f 6e 65 20 6d 61 74 63 | is the.|one matc|
|00000550| 68 69 6e 67 20 74 68 65 | 20 73 75 70 70 6c 69 65 |hing the| supplie|
|00000560| 64 20 4b 45 59 2e 20 20 | 52 65 74 75 72 6e 73 20 |d KEY. |Returns |
|00000570| 6e 69 6c 20 69 66 20 41 | 4c 49 53 54 20 69 73 20 |nil if A|LIST is |
|00000580| 6e 69 6c 2c 20 6f 72 20 | 69 66 0a 6b 65 79 2d 76 |nil, or |if.key-v|
|00000590| 61 6c 75 65 20 70 61 69 | 72 20 69 73 20 61 74 20 |alue pai|r is at |
|000005a0| 74 68 65 20 68 65 61 64 | 20 6f 66 20 74 68 65 20 |the head| of the |
|000005b0| 61 6c 69 73 74 2e 20 20 | 52 65 74 75 72 6e 73 20 |alist. |Returns |
|000005c0| 74 20 69 66 20 6b 65 79 | 2d 76 61 6c 75 65 0a 70 |t if key|-value.p|
|000005d0| 61 69 72 20 69 73 20 6e | 6f 74 20 61 74 20 74 68 |air is n|ot at th|
|000005e0| 65 20 68 65 61 64 20 6f | 66 20 61 6c 69 73 74 2e |e head o|f alist.|
|000005f0| 20 20 41 4c 49 53 54 20 | 69 73 20 6e 6f 74 20 61 | ALIST |is not a|
|00000600| 6c 74 65 72 65 64 2e 22 | 5d 29 0a 28 64 65 66 61 |ltered."|]).(defa|
|00000610| 6c 69 61 73 20 27 61 70 | 75 74 20 23 5b 28 61 6c |lias 'ap|ut #[(al|
|00000620| 69 73 74 2d 73 79 6d 62 | 6f 6c 20 6b 65 79 20 26 |ist-symb|ol key &|
|00000630| 6f 70 74 69 6f 6e 61 6c | 20 76 61 6c 75 65 29 20 |optional| value) |
|00000640| 22 c0 09 5c 6e 5c 22 c3 | 1c 1d c6 0e 07 09 5c 22 |"..\n\".|......\"|
|00000650| 88 c8 0e 07 21 89 14 84 | 1d 00 0e 07 0d 4c 82 39 |....!...|.....L.9|
|00000660| 00 c9 0c 09 5c 22 83 2d | 00 0e 07 0d 0c a4 4c 82 |....\".-|......L.|
|00000670| 39 00 5c 6e 83 38 00 0c | 0d 40 a0 82 39 00 0c 2a |9.\n.8..|.@..9..*|
|00000680| 87 22 20 5b 61 65 6c 65 | 6d 65 6e 74 20 6b 65 79 |." [aele|ment key|
|00000690| 20 76 61 6c 75 65 20 6e | 69 6c 20 61 6c 69 73 74 | value n|il alist|
|000006a0| 20 65 6c 65 6d 20 61 73 | 6f 72 74 20 61 6c 69 73 | elem as|ort alis|
|000006b0| 74 2d 73 79 6d 62 6f 6c | 20 65 76 61 6c 20 61 6e |t-symbol| eval an|
|000006c0| 6f 74 2d 68 65 61 64 2d | 70 5d 20 34 20 22 5c 0a |ot-head-|p] 4 "\.|
|000006d0| 49 6e 73 65 72 74 73 20 | 61 20 6b 65 79 2d 76 61 |Inserts |a key-va|
|000006e0| 6c 75 65 20 70 61 69 72 | 20 69 6e 74 6f 20 61 6e |lue pair| into an|
|000006f0| 20 61 6c 69 73 74 2e 0a | 54 68 65 20 61 6c 69 73 | alist..|The alis|
|00000700| 74 20 69 73 20 72 65 66 | 65 72 65 6e 63 65 64 20 |t is ref|erenced |
|00000710| 62 79 20 41 4c 49 53 54 | 2d 53 59 4d 42 4f 4c 2e |by ALIST|-SYMBOL.|
|00000720| 20 54 68 65 20 6b 65 79 | 2d 76 61 6c 75 65 20 70 | The key|-value p|
|00000730| 61 69 72 20 69 73 20 6d | 61 64 65 0a 66 72 6f 6d |air is m|ade.from|
|00000740| 20 4b 45 59 20 61 6e 64 | 20 6f 70 74 69 6f 6e 61 | KEY and| optiona|
|00000750| 6c 6c 79 2c 20 56 41 4c | 55 45 2e 20 52 65 74 75 |lly, VAL|UE. Retu|
|00000760| 72 6e 73 20 74 68 65 20 | 61 6c 74 65 72 65 64 20 |rns the |altered |
|00000770| 61 6c 69 73 74 20 6f 72 | 20 6e 69 6c 20 69 66 0a |alist or| nil if.|
|00000780| 41 4c 49 53 54 20 69 73 | 20 6e 69 6c 2e 0a 0a 49 |ALIST is| nil...I|
|00000790| 66 20 74 68 65 20 6b 65 | 79 2d 76 61 6c 75 65 20 |f the ke|y-value |
|000007a0| 70 61 69 72 20 72 65 66 | 65 72 65 6e 63 65 64 20 |pair ref|erenced |
|000007b0| 62 79 20 4b 45 59 20 63 | 61 6e 20 62 65 20 66 6f |by KEY c|an be fo|
|000007c0| 75 6e 64 20 69 6e 20 74 | 68 65 20 61 6c 69 73 74 |und in t|he alist|
|000007d0| 2c 20 61 6e 64 0a 56 41 | 4c 55 45 20 69 73 20 73 |, and.VA|LUE is s|
|000007e0| 75 70 70 6c 69 65 64 20 | 6e 6f 6e 2d 6e 69 6c 2c |upplied |non-nil,|
|000007f0| 20 74 68 65 6e 20 74 68 | 65 20 76 61 6c 75 65 20 | then th|e value |
|00000800| 6f 66 20 4b 45 59 20 77 | 69 6c 6c 20 62 65 20 73 |of KEY w|ill be s|
|00000810| 65 74 20 74 6f 20 56 41 | 4c 55 45 2e 0a 49 66 20 |et to VA|LUE..If |
|00000820| 56 41 4c 55 45 20 69 73 | 20 6e 6f 74 20 73 75 70 |VALUE is| not sup|
|00000830| 70 6c 69 65 64 2c 20 6f | 72 20 69 73 20 6e 69 6c |plied, o|r is nil|
|00000840| 2c 20 74 68 65 20 6b 65 | 79 2d 76 61 6c 75 65 20 |, the ke|y-value |
|00000850| 70 61 69 72 20 77 69 6c | 6c 20 6e 6f 74 20 62 65 |pair wil|l not be|
|00000860| 0a 6d 6f 64 69 66 69 65 | 64 2c 20 62 75 74 20 77 |.modifie|d, but w|
|00000870| 69 6c 6c 20 62 65 20 6d | 6f 76 65 64 20 74 6f 20 |ill be m|oved to |
|00000880| 74 68 65 20 68 65 61 64 | 20 6f 66 20 74 68 65 20 |the head| of the |
|00000890| 61 6c 69 73 74 2e 20 49 | 66 20 74 68 65 20 6b 65 |alist. I|f the ke|
|000008a0| 79 2d 76 61 6c 75 65 0a | 70 61 69 72 20 63 61 6e |y-value.|pair can|
|000008b0| 6e 6f 74 20 62 65 20 66 | 6f 75 6e 64 20 69 6e 20 |not be f|ound in |
|000008c0| 74 68 65 20 61 6c 69 73 | 74 2c 20 69 74 20 77 69 |the alis|t, it wi|
|000008d0| 6c 6c 20 62 65 20 69 6e | 73 65 72 74 65 64 20 69 |ll be in|serted i|
|000008e0| 6e 74 6f 20 74 68 65 20 | 68 65 61 64 0a 6f 66 20 |nto the |head.of |
|000008f0| 74 68 65 20 61 6c 69 73 | 74 20 28 77 69 74 68 20 |the alis|t (with |
|00000900| 76 61 6c 75 65 20 6e 69 | 6c 20 69 66 20 56 41 4c |value ni|l if VAL|
|00000910| 55 45 20 69 73 20 6e 69 | 6c 20 6f 72 20 6e 6f 74 |UE is ni|l or not|
|00000920| 20 73 75 70 70 6c 69 65 | 64 29 2e 22 5d 29 0a 28 | supplie|d)."]).(|
|00000930| 64 65 66 61 6c 69 61 73 | 20 27 61 64 65 6c 65 74 |defalias| 'adelet|
|00000940| 65 20 23 5b 28 61 6c 69 | 73 74 2d 73 79 6d 62 6f |e #[(ali|st-symbo|
|00000950| 6c 20 6b 65 79 29 20 22 | c0 09 5c 6e 5c 22 88 c3 |l key) "|..\n\"..|
|00000960| 09 21 89 1c 84 11 00 c5 | 82 20 00 c6 0c 5c 6e 5c |.!......|. ...\n\|
|00000970| 22 83 1c 00 0c 82 20 00 | 09 0c 41 4c 29 87 22 20 |"..... .|..AL)." |
|00000980| 5b 61 73 6f 72 74 20 61 | 6c 69 73 74 2d 73 79 6d |[asort a|list-sym|
|00000990| 62 6f 6c 20 6b 65 79 20 | 65 76 61 6c 20 61 6c 69 |bol key |eval ali|
|000009a0| 73 74 20 6e 69 6c 20 61 | 6e 6f 74 2d 68 65 61 64 |st nil a|not-head|
|000009b0| 2d 70 5d 20 34 20 22 5c | 0a 44 65 6c 65 74 65 20 |-p] 4 "\|.Delete |
|000009c0| 61 20 6b 65 79 2d 76 61 | 6c 75 65 20 70 61 69 72 |a key-va|lue pair|
|000009d0| 20 66 72 6f 6d 20 74 68 | 65 20 61 6c 69 73 74 2e | from th|e alist.|
|000009e0| 0a 41 6c 69 73 74 20 69 | 73 20 72 65 66 65 72 65 |.Alist i|s refere|
|000009f0| 6e 63 65 64 20 62 79 20 | 41 4c 49 53 54 2d 53 59 |nced by |ALIST-SY|
|00000a00| 4d 42 4f 4c 20 61 6e 64 | 20 74 68 65 20 6b 65 79 |MBOL and| the key|
|00000a10| 2d 76 61 6c 75 65 20 70 | 61 69 72 20 74 6f 20 72 |-value p|air to r|
|00000a20| 65 6d 6f 76 65 0a 69 73 | 20 70 61 69 72 20 6d 61 |emove.is| pair ma|
|00000a30| 74 63 68 69 6e 67 20 4b | 45 59 2e 20 20 52 65 74 |tching K|EY. Ret|
|00000a40| 75 72 6e 73 20 74 68 65 | 20 61 6c 74 65 72 65 64 |urns the| altered|
|00000a50| 20 61 6c 69 73 74 2e 22 | 5d 29 0a 28 64 65 66 61 | alist."|]).(defa|
|00000a60| 6c 69 61 73 20 27 61 67 | 65 74 20 23 5b 28 61 6c |lias 'ag|et #[(al|
|00000a70| 69 73 74 20 6b 65 79 20 | 26 6f 70 74 69 6f 6e 61 |ist key |&optiona|
|00000a80| 6c 20 6b 65 79 6e 69 6c | 2d 70 29 20 22 c0 09 21 |l keynil|-p) "..!|
|00000a90| 1a 09 84 0c 00 c3 82 32 | 00 c4 c2 0d 5c 22 88 c6 |.......2|....\"..|
|00000aa0| 5c 6e 0d 5c 22 83 1c 00 | c3 82 32 00 5c 6e 40 41 |\n.\"...|..2.\n@A|
|00000ab0| 86 32 00 0e 07 83 2b 00 | c3 82 32 00 5c 6e 40 40 |.2....+.|..2.\n@@|
|00000ac0| 86 32 00 c3 29 87 22 20 | 5b 63 6f 70 79 2d 61 6c |.2..)." |[copy-al|
|00000ad0| 69 73 74 20 61 6c 69 73 | 74 20 63 6f 70 79 20 6e |ist alis|t copy n|
|00000ae0| 69 6c 20 61 73 6f 72 74 | 20 6b 65 79 20 61 6e 6f |il asort| key ano|
|00000af0| 74 2d 68 65 61 64 2d 70 | 20 6b 65 79 6e 69 6c 2d |t-head-p| keynil-|
|00000b00| 70 5d 20 33 20 22 5c 0a | 52 65 74 75 72 6e 73 20 |p] 3 "\.|Returns |
|00000b10| 74 68 65 20 76 61 6c 75 | 65 20 69 6e 20 41 4c 49 |the valu|e in ALI|
|00000b20| 53 54 20 74 68 61 74 20 | 69 73 20 61 73 73 6f 63 |ST that |is assoc|
|00000b30| 69 61 74 65 64 20 77 69 | 74 68 20 4b 45 59 2e 0a |iated wi|th KEY..|
|00000b40| 4f 70 74 69 6f 6e 61 6c | 20 4b 45 59 4e 49 4c 2d |Optional| KEYNIL-|
|00000b50| 50 20 64 65 73 63 72 69 | 62 65 73 20 77 68 61 74 |P descri|bes what|
|00000b60| 20 74 6f 20 64 6f 20 69 | 66 20 74 68 65 20 76 61 | to do i|f the va|
|00000b70| 6c 75 65 20 61 73 73 6f | 63 69 61 74 65 64 20 77 |lue asso|ciated w|
|00000b80| 69 74 68 0a 4b 45 59 20 | 69 73 20 6e 69 6c 2e 20 |ith.KEY |is nil. |
|00000b90| 20 49 66 20 4b 45 59 4e | 49 4c 2d 50 20 69 73 20 | If KEYN|IL-P is |
|00000ba0| 6e 6f 74 20 73 75 70 70 | 6c 69 65 64 20 6f 72 20 |not supp|lied or |
|00000bb0| 69 73 20 6e 69 6c 2c 20 | 61 6e 64 20 74 68 65 20 |is nil, |and the |
|00000bc0| 76 61 6c 75 65 20 69 73 | 0a 6e 69 6c 2c 20 74 68 |value is|.nil, th|
|00000bd0| 65 6e 20 4b 45 59 20 69 | 73 20 72 65 74 75 72 6e |en KEY i|s return|
|00000be0| 65 64 2e 20 20 49 66 20 | 4b 45 59 4e 49 4c 2d 50 |ed. If |KEYNIL-P|
|00000bf0| 20 69 73 20 6e 6f 6e 2d | 6e 69 6c 2c 20 74 68 65 | is non-|nil, the|
|00000c00| 6e 20 6e 69 6c 20 77 6f | 75 6c 64 20 62 65 0a 72 |n nil wo|uld be.r|
|00000c10| 65 74 75 72 6e 65 64 2e | 0a 0a 49 66 20 6e 6f 20 |eturned.|..If no |
|00000c20| 6b 65 79 2d 76 61 6c 75 | 65 20 70 61 69 72 20 6d |key-valu|e pair m|
|00000c30| 61 74 63 68 69 6e 67 20 | 4b 45 59 20 63 6f 75 6c |atching |KEY coul|
|00000c40| 64 20 62 65 20 66 6f 75 | 6e 64 20 69 6e 20 41 4c |d be fou|nd in AL|
|00000c50| 49 53 54 2c 20 6f 72 20 | 41 4c 49 53 54 20 69 73 |IST, or |ALIST is|
|00000c60| 0a 6e 69 6c 20 74 68 65 | 6e 20 6e 69 6c 20 69 73 |.nil the|n nil is|
|00000c70| 20 72 65 74 75 72 6e 65 | 64 2e 20 41 4c 49 53 54 | returne|d. ALIST|
|00000c80| 20 69 73 20 6e 6f 74 20 | 61 6c 74 65 72 65 64 2e | is not |altered.|
|00000c90| 22 5d 29 0a 28 64 65 66 | 61 6c 69 61 73 20 27 61 |"]).(def|alias 'a|
|00000ca0| 6d 61 6b 65 20 23 5b 28 | 61 6c 69 73 74 2d 73 79 |make #[(|alist-sy|
|00000cb0| 6d 62 6f 6c 20 6b 65 79 | 6c 69 73 74 20 26 6f 70 |mbol key|list &op|
|00000cc0| 74 69 6f 6e 61 6c 20 76 | 61 6c 75 65 6c 69 73 74 |tional v|aluelist|
|00000cd0| 29 20 22 08 40 08 41 09 | 40 09 41 1a 1b 1c 1d 0c |) ".@.A.|@.A.....|
|00000ce0| 84 1a 00 c6 0e 07 0d 0b | 23 88 82 28 00 c8 0e 07 |........|#..(....|
|00000cf0| 0c 5c 6e 23 88 c6 0e 07 | 0d 0b 23 88 2c c9 0e 07 |.\n#....|..#.,...|
|00000d00| 21 87 22 20 5b 6b 65 79 | 6c 69 73 74 20 76 61 6c |!." [key|list val|
|00000d10| 75 65 6c 69 73 74 20 76 | 61 6c 63 64 72 20 76 61 |uelist v|alcdr va|
|00000d20| 6c 63 61 72 20 6b 65 79 | 63 64 72 20 6b 65 79 63 |lcar key|cdr keyc|
|00000d30| 61 72 20 61 70 75 74 20 | 61 6c 69 73 74 2d 73 79 |ar aput |alist-sy|
|00000d40| 6d 62 6f 6c 20 61 6d 61 | 6b 65 20 65 76 61 6c 5d |mbol ama|ke eval]|
|00000d50| 20 34 20 22 5c 0a 4d 61 | 6b 65 20 61 6e 20 61 73 | 4 "\.Ma|ke an as|
|00000d60| 73 6f 63 69 61 74 69 6f | 6e 20 6c 69 73 74 2e 0a |sociatio|n list..|
|00000d70| 54 68 65 20 61 73 73 6f | 63 69 61 74 69 6f 6e 20 |The asso|ciation |
|00000d80| 6c 69 73 74 20 69 73 20 | 61 74 74 61 63 68 65 64 |list is |attached|
|00000d90| 20 74 6f 20 74 68 65 20 | 61 6c 69 73 74 20 72 65 | to the |alist re|
|00000da0| 66 65 72 65 6e 63 65 64 | 20 62 79 0a 41 4c 49 53 |ferenced| by.ALIS|
|00000db0| 54 2d 53 59 4d 42 4f 4c | 2e 20 45 61 63 68 20 65 |T-SYMBOL|. Each e|
|00000dc0| 6c 65 6d 65 6e 74 20 69 | 6e 20 74 68 65 20 4b 45 |lement i|n the KE|
|00000dd0| 59 4c 49 53 54 20 62 65 | 63 6f 6d 65 73 20 61 20 |YLIST be|comes a |
|00000de0| 6b 65 79 20 61 6e 64 20 | 69 73 0a 61 73 73 6f 63 |key and |is.assoc|
|00000df0| 69 61 74 65 64 20 77 69 | 74 68 20 74 68 65 20 76 |iated wi|th the v|
|00000e00| 61 6c 75 65 20 69 6e 20 | 56 41 4c 55 45 4c 49 53 |alue in |VALUELIS|
|00000e10| 54 20 77 69 74 68 20 74 | 68 65 20 73 61 6d 65 20 |T with t|he same |
|00000e20| 69 6e 64 65 78 2e 20 49 | 66 0a 56 41 4c 55 45 4c |index. I|f.VALUEL|
|00000e30| 49 53 54 20 69 73 20 6e | 6f 74 20 73 75 70 70 6c |IST is n|ot suppl|
|00000e40| 69 65 64 20 6f 72 20 69 | 73 20 6e 69 6c 2c 20 74 |ied or i|s nil, t|
|00000e50| 68 65 6e 20 65 61 63 68 | 20 6b 65 79 20 69 6e 20 |hen each| key in |
|00000e60| 4b 45 59 4c 49 53 54 20 | 69 73 0a 61 73 73 6f 63 |KEYLIST |is.assoc|
|00000e70| 69 61 74 65 64 20 77 69 | 74 68 20 6e 69 6c 2e 0a |iated wi|th nil..|
|00000e80| 0a 4b 45 59 4c 49 53 54 | 20 61 6e 64 20 56 41 4c |.KEYLIST| and VAL|
|00000e90| 55 45 4c 49 53 54 20 73 | 68 6f 75 6c 64 20 68 61 |UELIST s|hould ha|
|00000ea0| 76 65 20 74 68 65 20 73 | 61 6d 65 20 6e 75 6d 62 |ve the s|ame numb|
|00000eb0| 65 72 20 6f 66 20 65 6c | 65 6d 65 6e 74 73 2c 20 |er of el|ements, |
|00000ec0| 62 75 74 0a 74 68 69 73 | 20 69 73 6e 27 74 20 65 |but.this| isn't e|
|00000ed0| 6e 66 6f 72 63 65 64 2e | 20 20 49 66 20 56 41 4c |nforced.| If VAL|
|00000ee0| 55 45 4c 49 53 54 20 69 | 73 20 73 6d 61 6c 6c 65 |UELIST i|s smalle|
|00000ef0| 72 20 74 68 61 6e 20 4b | 45 59 4c 49 53 54 2c 20 |r than K|EYLIST, |
|00000f00| 72 65 6d 61 69 6e 69 6e | 67 0a 6b 65 79 73 20 61 |remainin|g.keys a|
|00000f10| 72 65 20 61 73 73 6f 63 | 69 61 74 65 64 20 77 69 |re assoc|iated wi|
|00000f20| 74 68 20 6e 69 6c 2e 20 | 20 49 66 20 56 41 4c 55 |th nil. | If VALU|
|00000f30| 45 4c 49 53 54 20 69 73 | 20 6c 61 72 67 65 72 20 |ELIST is| larger |
|00000f40| 74 68 61 6e 20 4b 45 59 | 4c 49 53 54 2c 0a 65 78 |than KEY|LIST,.ex|
|00000f50| 74 72 61 20 76 61 6c 75 | 65 73 20 61 72 65 20 69 |tra valu|es are i|
|00000f60| 67 6e 6f 72 65 64 2e 20 | 20 52 65 74 75 72 6e 73 |gnored. | Returns|
|00000f70| 20 74 68 65 20 63 72 65 | 61 74 65 64 20 61 6c 69 | the cre|ated ali|
|00000f80| 73 74 2e 22 5d 29 0a 28 | 70 72 6f 76 69 64 65 20 |st."]).(|provide |
|00000f90| 28 71 75 6f 74 65 20 61 | 73 73 6f 63 29 29 0a |(quote a|ssoc)). |
+--------+-------------------------+-------------------------+--------+--------+