home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / lisp / utils / assoc.elc < prev    next >
Emacs Compiled Lisp  |  1995-08-29  |  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 63 74 68 6f 6d 70 40 |piled by| cthomp@|
|00000020| 77 69 6c 6c 6f 77 2e 63 | 73 2e 75 69 75 63 2e 65 |willow.c|s.uiuc.e|
|00000030| 64 75 20 6f 6e 20 54 75 | 65 20 41 75 67 20 32 39 |du on Tu|e Aug 29|
|00000040| 20 31 34 3a 32 34 3a 32 | 37 20 31 39 39 35 0a 3b | 14:24:2|7 1995.;|
|00000050| 3b 3b 20 66 72 6f 6d 20 | 66 69 6c 65 20 2f 78 65 |;; from |file /xe|
|00000060| 6d 61 63 73 2f 78 65 6d | 61 63 73 2d 31 39 2e 31 |macs/xem|acs-19.1|
|00000070| 33 2d 72 65 6c 65 61 73 | 65 2f 65 64 69 74 6f 72 |3-releas|e/editor|
|00000080| 2f 6c 69 73 70 2f 75 74 | 69 6c 73 2f 61 73 73 6f |/lisp/ut|ils/asso|
|00000090| 63 2e 65 6c 0a 3b 3b 3b | 20 65 6d 61 63 73 20 76 |c.el.;;;| emacs v|
|000000a0| 65 72 73 69 6f 6e 20 31 | 39 2e 31 33 20 58 45 6d |ersion 1|9.13 XEm|
|000000b0| 61 63 73 20 4c 75 63 69 | 64 2e 0a 3b 3b 3b 20 62 |acs Luci|d..;;; b|
|000000c0| 79 74 65 63 6f 6d 70 20 | 76 65 72 73 69 6f 6e 20 |ytecomp |version |
|000000d0| 32 2e 32 35 3b 20 31 2d | 53 65 70 2d 39 34 2e 0a |2.25; 1-|Sep-94..|
|000000e0| 3b 3b 3b 20 6f 70 74 69 | 6d 69 7a 61 74 69 6f 6e |;;; opti|mization|
|000000f0| 20 69 73 20 6f 6e 2e 0a | 3b 3b 3b 20 74 68 69 73 | is on..|;;; this|
|00000100| 20 66 69 6c 65 20 75 73 | 65 73 20 6f 70 63 6f 64 | file us|es opcod|
|00000110| 65 73 20 77 68 69 63 68 | 20 64 6f 20 6e 6f 74 20 |es which| do not |
|00000120| 65 78 69 73 74 20 69 6e | 20 45 6d 61 63 73 20 31 |exist in| Emacs 1|
|00000130| 38 2e 0a 0a 28 69 66 20 | 28 61 6e 64 20 28 62 6f |8...(if |(and (bo|
|00000140| 75 6e 64 70 20 27 65 6d | 61 63 73 2d 76 65 72 73 |undp 'em|acs-vers|
|00000150| 69 6f 6e 29 0a 09 20 28 | 6f 72 20 28 61 6e 64 20 |ion).. (|or (and |
|00000160| 28 62 6f 75 6e 64 70 20 | 27 65 70 6f 63 68 3a 3a |(boundp |'epoch::|
|00000170| 76 65 72 73 69 6f 6e 29 | 20 65 70 6f 63 68 3a 3a |version)| epoch::|
|00000180| 76 65 72 73 69 6f 6e 29 | 0a 09 20 20 20 20 20 28 |version)|.. (|
|00000190| 73 74 72 69 6e 67 2d 6c | 65 73 73 70 20 65 6d 61 |string-l|essp ema|
|000001a0| 63 73 2d 76 65 72 73 69 | 6f 6e 20 22 31 39 22 29 |cs-versi|on "19")|
|000001b0| 29 29 0a 20 20 20 20 28 | 65 72 72 6f 72 20 22 54 |)). (|error "T|
|000001c0| 68 69 73 20 66 69 6c 65 | 20 77 61 73 20 63 6f 6d |his file| was com|
|000001d0| 70 69 6c 65 64 20 66 6f | 72 20 45 6d 61 63 73 20 |piled fo|r Emacs |
|000001e0| 31 39 2e 22 29 29 0a 0a | 28 66 73 65 74 20 27 61 |19."))..|(fset 'a|
|000001f0| 73 6f 72 74 20 23 5b 28 | 61 6c 69 73 74 2d 73 79 |sort #[(|alist-sy|
|00000200| 6d 62 6f 6c 20 6b 65 79 | 29 20 22 08 c1 c2 c3 08 |mbol key|) ".....|
|00000210| 21 21 c4 5c 22 4c 87 22 | 20 5b 61 6c 69 73 74 2d |!!.\"L."| [alist-|
|00000220| 73 79 6d 62 6f 6c 20 73 | 6f 72 74 20 63 6f 70 79 |symbol s|ort copy|
|00000230| 2d 61 6c 69 73 74 20 65 | 76 61 6c 20 23 5b 28 61 |-alist e|val #[(a|
|00000240| 20 62 29 20 22 08 40 09 | 9a 87 22 20 5b 61 20 6b | b) ".@.|.." [a k|
|00000250| 65 79 5d 20 32 5d 5d 20 | 35 20 22 5c 0a 4d 6f 76 |ey] 2]] |5 "\.Mov|
|00000260| 65 20 61 20 73 70 65 63 | 69 66 69 65 64 20 6b 65 |e a spec|ified ke|
|00000270| 79 2d 76 61 6c 75 65 20 | 70 61 69 72 20 74 6f 20 |y-value |pair to |
|00000280| 74 68 65 20 68 65 61 64 | 20 6f 66 20 61 6e 20 61 |the head| of an a|
|00000290| 6c 69 73 74 2e 0a 54 68 | 65 20 61 6c 69 73 74 20 |list..Th|e alist |
|000002a0| 69 73 20 72 65 66 65 72 | 65 6e 63 65 64 20 62 79 |is refer|enced by|
|000002b0| 20 41 4c 49 53 54 2d 53 | 59 4d 42 4f 4c 2e 20 4b | ALIST-S|YMBOL. K|
|000002c0| 65 79 2d 76 61 6c 75 65 | 20 70 61 69 72 20 74 6f |ey-value| pair to|
|000002d0| 20 6d 6f 76 65 20 74 6f | 0a 68 65 61 64 20 69 73 | move to|.head is|
|000002e0| 20 6f 6e 65 20 6d 61 74 | 63 68 69 6e 67 20 4b 45 | one mat|ching KE|
|000002f0| 59 2e 20 20 52 65 74 75 | 72 6e 73 20 74 68 65 20 |Y. Retu|rns the |
|00000300| 73 6f 72 74 65 64 20 6c | 69 73 74 20 61 6e 64 20 |sorted l|ist and |
|00000310| 64 6f 65 73 6e 27 74 20 | 61 66 66 65 63 74 0a 74 |doesn't |affect.t|
|00000320| 68 65 20 6f 72 64 65 72 | 20 6f 66 20 61 6e 79 20 |he order| of any |
|00000330| 6f 74 68 65 72 20 6b 65 | 79 2d 76 61 6c 75 65 20 |other ke|y-value |
|00000340| 70 61 69 72 2e 20 20 53 | 69 64 65 20 65 66 66 65 |pair. S|ide effe|
|00000350| 63 74 20 73 65 74 73 20 | 61 6c 69 73 74 20 74 6f |ct sets |alist to|
|00000360| 20 6e 65 77 0a 73 6f 72 | 74 65 64 20 6c 69 73 74 | new.sor|ted list|
|00000370| 2e 22 5d 29 0a 28 66 73 | 65 74 20 27 61 65 6c 65 |."]).(fs|et 'aele|
|00000380| 6d 65 6e 74 20 23 5b 28 | 6b 65 79 20 76 61 6c 75 |ment #[(|key valu|
|00000390| 65 29 20 22 08 09 42 43 | 87 22 20 5b 6b 65 79 20 |e) "..BC|." [key |
|000003a0| 76 61 6c 75 65 5d 20 32 | 20 22 5c 0a 4d 61 6b 65 |value] 2| "\.Make|
|000003b0| 73 20 61 20 6c 69 73 74 | 20 6f 66 20 61 20 63 6f |s a list| of a co|
|000003c0| 6e 73 20 63 65 6c 6c 20 | 63 6f 6e 74 61 69 6e 69 |ns cell |containi|
|000003d0| 6e 67 20 63 61 72 20 6f | 66 20 4b 45 59 20 61 6e |ng car o|f KEY an|
|000003e0| 64 20 63 64 72 20 6f 66 | 20 56 41 4c 55 45 2e 0a |d cdr of| VALUE..|
|000003f0| 54 68 65 20 72 65 74 75 | 72 6e 65 64 20 6c 69 73 |The retu|rned lis|
|00000400| 74 20 69 73 20 73 75 69 | 74 61 62 6c 65 20 61 73 |t is sui|table as|
|00000410| 20 61 6e 20 65 6c 65 6d | 65 6e 74 20 6f 66 20 61 | an elem|ent of a|
|00000420| 6e 20 61 6c 69 73 74 2e | 22 5d 29 0a 28 66 73 65 |n alist.|"]).(fse|
|00000430| 74 20 27 61 68 65 61 64 | 73 79 6d 20 23 5b 28 61 |t 'ahead|sym #[(a|
|00000440| 6c 69 73 74 29 20 22 08 | 40 40 87 22 20 5b 61 6c |list) ".|@@." [al|
|00000450| 69 73 74 5d 20 31 20 22 | 5c 0a 52 65 74 75 72 6e |ist] 1 "|\.Return|
|00000460| 20 74 68 65 20 6b 65 79 | 20 73 79 6d 62 6f 6c 20 | the key| symbol |
|00000470| 61 74 20 74 68 65 20 68 | 65 61 64 20 6f 66 20 41 |at the h|ead of A|
|00000480| 4c 49 53 54 2e 22 5d 29 | 0a 28 66 73 65 74 20 27 |LIST."])|.(fset '|
|00000490| 61 6e 6f 74 2d 68 65 61 | 64 2d 70 20 23 5b 28 61 |anot-hea|d-p #[(a|
|000004a0| 6c 69 73 74 20 6b 65 79 | 29 20 22 c0 09 21 5c 6e |list key|) "..!\n|
|000004b0| 9a 3f 87 22 20 5b 61 68 | 65 61 64 73 79 6d 20 61 |.?." [ah|eadsym a|
|000004c0| 6c 69 73 74 20 6b 65 79 | 5d 20 32 20 22 5c 0a 46 |list key|] 2 "\.F|
|000004d0| 69 6e 64 20 6f 75 74 20 | 69 66 20 61 20 73 70 65 |ind out |if a spe|
|000004e0| 63 69 66 69 65 64 20 6b | 65 79 2d 76 61 6c 75 65 |cified k|ey-value|
|000004f0| 20 70 61 69 72 20 69 73 | 20 6e 6f 74 20 61 74 20 | pair is| not at |
|00000500| 74 68 65 20 68 65 61 64 | 20 6f 66 20 61 6e 20 61 |the head| of an a|
|00000510| 6c 69 73 74 2e 0a 54 68 | 65 20 61 6c 69 73 74 20 |list..Th|e alist |
|00000520| 74 6f 20 63 68 65 63 6b | 20 69 73 20 73 70 65 63 |to check| is spec|
|00000530| 69 66 69 65 64 20 62 79 | 20 41 4c 49 53 54 20 61 |ified by| ALIST a|
|00000540| 6e 64 20 74 68 65 20 6b | 65 79 2d 76 61 6c 75 65 |nd the k|ey-value|
|00000550| 20 70 61 69 72 20 69 73 | 20 74 68 65 0a 6f 6e 65 | pair is| the.one|
|00000560| 20 6d 61 74 63 68 69 6e | 67 20 74 68 65 20 73 75 | matchin|g the su|
|00000570| 70 70 6c 69 65 64 20 4b | 45 59 2e 20 20 52 65 74 |pplied K|EY. Ret|
|00000580| 75 72 6e 73 20 6e 69 6c | 20 69 66 20 41 4c 49 53 |urns nil| if ALIS|
|00000590| 54 20 69 73 20 6e 69 6c | 2c 20 6f 72 20 69 66 0a |T is nil|, or if.|
|000005a0| 6b 65 79 2d 76 61 6c 75 | 65 20 70 61 69 72 20 69 |key-valu|e pair i|
|000005b0| 73 20 61 74 20 74 68 65 | 20 68 65 61 64 20 6f 66 |s at the| head of|
|000005c0| 20 74 68 65 20 61 6c 69 | 73 74 2e 20 20 52 65 74 | the ali|st. Ret|
|000005d0| 75 72 6e 73 20 74 20 69 | 66 20 6b 65 79 2d 76 61 |urns t i|f key-va|
|000005e0| 6c 75 65 0a 70 61 69 72 | 20 69 73 20 6e 6f 74 20 |lue.pair| is not |
|000005f0| 61 74 20 74 68 65 20 68 | 65 61 64 20 6f 66 20 61 |at the h|ead of a|
|00000600| 6c 69 73 74 2e 20 20 41 | 4c 49 53 54 20 69 73 20 |list. A|LIST is |
|00000610| 6e 6f 74 20 61 6c 74 65 | 72 65 64 2e 22 5d 29 0a |not alte|red."]).|
|00000620| 28 66 73 65 74 20 27 61 | 70 75 74 20 23 5b 28 61 |(fset 'a|put #[(a|
|00000630| 6c 69 73 74 2d 73 79 6d | 62 6f 6c 20 6b 65 79 20 |list-sym|bol key |
|00000640| 26 6f 70 74 69 6f 6e 61 | 6c 20 76 61 6c 75 65 29 |&optiona|l value)|
|00000650| 20 22 c0 09 5c 6e 5c 22 | c3 1c 1d c6 0e 07 09 5c | "..\n\"|.......\|
|00000660| 22 88 c8 0e 07 21 89 14 | ac 86 0e 07 0d 4c aa 98 |"....!..|.....L..|
|00000670| c9 0c 09 5c 22 ab 88 0e | 07 0d 0c a4 4c aa 8a 5c |...\"...|....L..\|
|00000680| 6e ab 86 0c 0d 40 a0 aa | 81 0c 2a 87 22 20 5b 61 |n....@..|..*." [a|
|00000690| 65 6c 65 6d 65 6e 74 20 | 6b 65 79 20 76 61 6c 75 |element |key valu|
|000006a0| 65 20 6e 69 6c 20 61 6c | 69 73 74 20 65 6c 65 6d |e nil al|ist elem|
|000006b0| 20 61 73 6f 72 74 20 61 | 6c 69 73 74 2d 73 79 6d | asort a|list-sym|
|000006c0| 62 6f 6c 20 65 76 61 6c | 20 61 6e 6f 74 2d 68 65 |bol eval| anot-he|
|000006d0| 61 64 2d 70 5d 20 34 20 | 22 5c 0a 49 6e 73 65 72 |ad-p] 4 |"\.Inser|
|000006e0| 74 73 20 61 20 6b 65 79 | 2d 76 61 6c 75 65 20 70 |ts a key|-value p|
|000006f0| 61 69 72 20 69 6e 74 6f | 20 61 6e 20 61 6c 69 73 |air into| an alis|
|00000700| 74 2e 0a 54 68 65 20 61 | 6c 69 73 74 20 69 73 20 |t..The a|list is |
|00000710| 72 65 66 65 72 65 6e 63 | 65 64 20 62 79 20 41 4c |referenc|ed by AL|
|00000720| 49 53 54 2d 53 59 4d 42 | 4f 4c 2e 20 54 68 65 20 |IST-SYMB|OL. The |
|00000730| 6b 65 79 2d 76 61 6c 75 | 65 20 70 61 69 72 20 69 |key-valu|e pair i|
|00000740| 73 20 6d 61 64 65 0a 66 | 72 6f 6d 20 4b 45 59 20 |s made.f|rom KEY |
|00000750| 61 6e 64 20 6f 70 74 69 | 6f 6e 61 6c 6c 79 2c 20 |and opti|onally, |
|00000760| 56 41 4c 55 45 2e 20 52 | 65 74 75 72 6e 73 20 74 |VALUE. R|eturns t|
|00000770| 68 65 20 61 6c 74 65 72 | 65 64 20 61 6c 69 73 74 |he alter|ed alist|
|00000780| 20 6f 72 20 6e 69 6c 20 | 69 66 0a 41 4c 49 53 54 | or nil |if.ALIST|
|00000790| 20 69 73 20 6e 69 6c 2e | 0a 0a 49 66 20 74 68 65 | is nil.|..If the|
|000007a0| 20 6b 65 79 2d 76 61 6c | 75 65 20 70 61 69 72 20 | key-val|ue pair |
|000007b0| 72 65 66 65 72 65 6e 63 | 65 64 20 62 79 20 4b 45 |referenc|ed by KE|
|000007c0| 59 20 63 61 6e 20 62 65 | 20 66 6f 75 6e 64 20 69 |Y can be| found i|
|000007d0| 6e 20 74 68 65 20 61 6c | 69 73 74 2c 20 61 6e 64 |n the al|ist, and|
|000007e0| 0a 56 41 4c 55 45 20 69 | 73 20 73 75 70 70 6c 69 |.VALUE i|s suppli|
|000007f0| 65 64 20 6e 6f 6e 2d 6e | 69 6c 2c 20 74 68 65 6e |ed non-n|il, then|
|00000800| 20 74 68 65 20 76 61 6c | 75 65 20 6f 66 20 4b 45 | the val|ue of KE|
|00000810| 59 20 77 69 6c 6c 20 62 | 65 20 73 65 74 20 74 6f |Y will b|e set to|
|00000820| 20 56 41 4c 55 45 2e 0a | 49 66 20 56 41 4c 55 45 | VALUE..|If VALUE|
|00000830| 20 69 73 20 6e 6f 74 20 | 73 75 70 70 6c 69 65 64 | is not |supplied|
|00000840| 2c 20 6f 72 20 69 73 20 | 6e 69 6c 2c 20 74 68 65 |, or is |nil, the|
|00000850| 20 6b 65 79 2d 76 61 6c | 75 65 20 70 61 69 72 20 | key-val|ue pair |
|00000860| 77 69 6c 6c 20 6e 6f 74 | 20 62 65 0a 6d 6f 64 69 |will not| be.modi|
|00000870| 66 69 65 64 2c 20 62 75 | 74 20 77 69 6c 6c 20 62 |fied, bu|t will b|
|00000880| 65 20 6d 6f 76 65 64 20 | 74 6f 20 74 68 65 20 68 |e moved |to the h|
|00000890| 65 61 64 20 6f 66 20 74 | 68 65 20 61 6c 69 73 74 |ead of t|he alist|
|000008a0| 2e 20 49 66 20 74 68 65 | 20 6b 65 79 2d 76 61 6c |. If the| key-val|
|000008b0| 75 65 0a 70 61 69 72 20 | 63 61 6e 6e 6f 74 20 62 |ue.pair |cannot b|
|000008c0| 65 20 66 6f 75 6e 64 20 | 69 6e 20 74 68 65 20 61 |e found |in the a|
|000008d0| 6c 69 73 74 2c 20 69 74 | 20 77 69 6c 6c 20 62 65 |list, it| will be|
|000008e0| 20 69 6e 73 65 72 74 65 | 64 20 69 6e 74 6f 20 74 | inserte|d into t|
|000008f0| 68 65 20 68 65 61 64 0a | 6f 66 20 74 68 65 20 61 |he head.|of the a|
|00000900| 6c 69 73 74 20 28 77 69 | 74 68 20 76 61 6c 75 65 |list (wi|th value|
|00000910| 20 6e 69 6c 20 69 66 20 | 56 41 4c 55 45 20 69 73 | nil if |VALUE is|
|00000920| 20 6e 69 6c 20 6f 72 20 | 6e 6f 74 20 73 75 70 70 | nil or |not supp|
|00000930| 6c 69 65 64 29 2e 22 5d | 29 0a 28 66 73 65 74 20 |lied)."]|).(fset |
|00000940| 27 61 64 65 6c 65 74 65 | 20 23 5b 28 61 6c 69 73 |'adelete| #[(alis|
|00000950| 74 2d 73 79 6d 62 6f 6c | 20 6b 65 79 29 20 22 c0 |t-symbol| key) ".|
|00000960| 09 5c 6e 5c 22 88 c3 09 | 21 89 1c ac 83 c5 aa 8d |.\n\"...|!.......|
|00000970| c6 0c 5c 6e 5c 22 ab 83 | 0c aa 84 09 0c 41 4c 29 |..\n\"..|.....AL)|
|00000980| 87 22 20 5b 61 73 6f 72 | 74 20 61 6c 69 73 74 2d |." [asor|t alist-|
|00000990| 73 79 6d 62 6f 6c 20 6b | 65 79 20 65 76 61 6c 20 |symbol k|ey eval |
|000009a0| 61 6c 69 73 74 20 6e 69 | 6c 20 61 6e 6f 74 2d 68 |alist ni|l anot-h|
|000009b0| 65 61 64 2d 70 5d 20 34 | 20 22 5c 0a 44 65 6c 65 |ead-p] 4| "\.Dele|
|000009c0| 74 65 20 61 20 6b 65 79 | 2d 76 61 6c 75 65 20 70 |te a key|-value p|
|000009d0| 61 69 72 20 66 72 6f 6d | 20 74 68 65 20 61 6c 69 |air from| the ali|
|000009e0| 73 74 2e 0a 41 6c 69 73 | 74 20 69 73 20 72 65 66 |st..Alis|t is ref|
|000009f0| 65 72 65 6e 63 65 64 20 | 62 79 20 41 4c 49 53 54 |erenced |by ALIST|
|00000a00| 2d 53 59 4d 42 4f 4c 20 | 61 6e 64 20 74 68 65 20 |-SYMBOL |and the |
|00000a10| 6b 65 79 2d 76 61 6c 75 | 65 20 70 61 69 72 20 74 |key-valu|e pair t|
|00000a20| 6f 20 72 65 6d 6f 76 65 | 0a 69 73 20 70 61 69 72 |o remove|.is pair|
|00000a30| 20 6d 61 74 63 68 69 6e | 67 20 4b 45 59 2e 20 20 | matchin|g KEY. |
|00000a40| 52 65 74 75 72 6e 73 20 | 74 68 65 20 61 6c 74 65 |Returns |the alte|
|00000a50| 72 65 64 20 61 6c 69 73 | 74 2e 22 5d 29 0a 28 66 |red alis|t."]).(f|
|00000a60| 73 65 74 20 27 61 67 65 | 74 20 23 5b 28 61 6c 69 |set 'age|t #[(ali|
|00000a70| 73 74 20 6b 65 79 20 26 | 6f 70 74 69 6f 6e 61 6c |st key &|optional|
|00000a80| 20 6b 65 79 6e 69 6c 2d | 70 29 20 22 c0 09 21 1a | keynil-|p) "..!.|
|00000a90| 09 ac 83 c3 aa a0 c4 c2 | 0d 5c 22 88 c6 5c 6e 0d |........|.\"..\n.|
|00000aa0| 5c 22 ab 83 c3 aa 92 5c | 6e 40 41 ae 8d 0e 07 ab |\".....\|n@A.....|
|00000ab0| 83 c3 aa 86 5c 6e 40 40 | ae 81 c3 29 87 22 20 5b |....\n@@|...)." [|
|00000ac0| 63 6f 70 79 2d 61 6c 69 | 73 74 20 61 6c 69 73 74 |copy-ali|st alist|
|00000ad0| 20 63 6f 70 79 20 6e 69 | 6c 20 61 73 6f 72 74 20 | copy ni|l asort |
|00000ae0| 6b 65 79 20 61 6e 6f 74 | 2d 68 65 61 64 2d 70 20 |key anot|-head-p |
|00000af0| 6b 65 79 6e 69 6c 2d 70 | 5d 20 33 20 22 5c 0a 52 |keynil-p|] 3 "\.R|
|00000b00| 65 74 75 72 6e 73 20 74 | 68 65 20 76 61 6c 75 65 |eturns t|he value|
|00000b10| 20 69 6e 20 41 4c 49 53 | 54 20 74 68 61 74 20 69 | in ALIS|T that i|
|00000b20| 73 20 61 73 73 6f 63 69 | 61 74 65 64 20 77 69 74 |s associ|ated wit|
|00000b30| 68 20 4b 45 59 2e 0a 4f | 70 74 69 6f 6e 61 6c 20 |h KEY..O|ptional |
|00000b40| 4b 45 59 4e 49 4c 2d 50 | 20 64 65 73 63 72 69 62 |KEYNIL-P| describ|
|00000b50| 65 73 20 77 68 61 74 20 | 74 6f 20 64 6f 20 69 66 |es what |to do if|
|00000b60| 20 74 68 65 20 76 61 6c | 75 65 20 61 73 73 6f 63 | the val|ue assoc|
|00000b70| 69 61 74 65 64 20 77 69 | 74 68 0a 4b 45 59 20 69 |iated wi|th.KEY i|
|00000b80| 73 20 6e 69 6c 2e 20 20 | 49 66 20 4b 45 59 4e 49 |s nil. |If KEYNI|
|00000b90| 4c 2d 50 20 69 73 20 6e | 6f 74 20 73 75 70 70 6c |L-P is n|ot suppl|
|00000ba0| 69 65 64 20 6f 72 20 69 | 73 20 6e 69 6c 2c 20 61 |ied or i|s nil, a|
|00000bb0| 6e 64 20 74 68 65 20 76 | 61 6c 75 65 20 69 73 0a |nd the v|alue is.|
|00000bc0| 6e 69 6c 2c 20 74 68 65 | 6e 20 4b 45 59 20 69 73 |nil, the|n KEY is|
|00000bd0| 20 72 65 74 75 72 6e 65 | 64 2e 20 20 49 66 20 4b | returne|d. If K|
|00000be0| 45 59 4e 49 4c 2d 50 20 | 69 73 20 6e 6f 6e 2d 6e |EYNIL-P |is non-n|
|00000bf0| 69 6c 2c 20 74 68 65 6e | 20 6e 69 6c 20 77 6f 75 |il, then| nil wou|
|00000c00| 6c 64 20 62 65 0a 72 65 | 74 75 72 6e 65 64 2e 0a |ld be.re|turned..|
|00000c10| 0a 49 66 20 6e 6f 20 6b | 65 79 2d 76 61 6c 75 65 |.If no k|ey-value|
|00000c20| 20 70 61 69 72 20 6d 61 | 74 63 68 69 6e 67 20 4b | pair ma|tching K|
|00000c30| 45 59 20 63 6f 75 6c 64 | 20 62 65 20 66 6f 75 6e |EY could| be foun|
|00000c40| 64 20 69 6e 20 41 4c 49 | 53 54 2c 20 6f 72 20 41 |d in ALI|ST, or A|
|00000c50| 4c 49 53 54 20 69 73 0a | 6e 69 6c 20 74 68 65 6e |LIST is.|nil then|
|00000c60| 20 6e 69 6c 20 69 73 20 | 72 65 74 75 72 6e 65 64 | nil is |returned|
|00000c70| 2e 20 41 4c 49 53 54 20 | 69 73 20 6e 6f 74 20 61 |. ALIST |is not a|
|00000c80| 6c 74 65 72 65 64 2e 22 | 5d 29 0a 28 66 73 65 74 |ltered."|]).(fset|
|00000c90| 20 27 61 6d 61 6b 65 20 | 23 5b 28 61 6c 69 73 74 | 'amake |#[(alist|
|00000ca0| 2d 73 79 6d 62 6f 6c 20 | 6b 65 79 6c 69 73 74 20 |-symbol |keylist |
|00000cb0| 26 6f 70 74 69 6f 6e 61 | 6c 20 76 61 6c 75 65 6c |&optiona|l valuel|
|00000cc0| 69 73 74 29 20 22 08 40 | 08 41 09 40 09 41 1a 1b |ist) ".@|.A.@.A..|
|00000cd0| 1c 1d 0c ac 89 c6 0e 07 | 0d 0b 23 88 aa 8e c8 0e |........|..#.....|
|00000ce0| 07 0c 5c 6e 23 88 c6 0e | 07 0d 0b 23 88 2c c9 0e |..\n#...|...#.,..|
|00000cf0| 07 21 87 22 20 5b 6b 65 | 79 6c 69 73 74 20 76 61 |.!." [ke|ylist va|
|00000d00| 6c 75 65 6c 69 73 74 20 | 76 61 6c 63 64 72 20 76 |luelist |valcdr v|
|00000d10| 61 6c 63 61 72 20 6b 65 | 79 63 64 72 20 6b 65 79 |alcar ke|ycdr key|
|00000d20| 63 61 72 20 61 70 75 74 | 20 61 6c 69 73 74 2d 73 |car aput| alist-s|
|00000d30| 79 6d 62 6f 6c 20 61 6d | 61 6b 65 20 65 76 61 6c |ymbol am|ake eval|
|00000d40| 5d 20 34 20 22 5c 0a 4d | 61 6b 65 20 61 6e 20 61 |] 4 "\.M|ake an a|
|00000d50| 73 73 6f 63 69 61 74 69 | 6f 6e 20 6c 69 73 74 2e |ssociati|on list.|
|00000d60| 0a 54 68 65 20 61 73 73 | 6f 63 69 61 74 69 6f 6e |.The ass|ociation|
|00000d70| 20 6c 69 73 74 20 69 73 | 20 61 74 74 61 63 68 65 | list is| attache|
|00000d80| 64 20 74 6f 20 74 68 65 | 20 61 6c 69 73 74 20 72 |d to the| alist r|
|00000d90| 65 66 65 72 65 6e 63 65 | 64 20 62 79 0a 41 4c 49 |eference|d by.ALI|
|00000da0| 53 54 2d 53 59 4d 42 4f | 4c 2e 20 45 61 63 68 20 |ST-SYMBO|L. Each |
|00000db0| 65 6c 65 6d 65 6e 74 20 | 69 6e 20 74 68 65 20 4b |element |in the K|
|00000dc0| 45 59 4c 49 53 54 20 62 | 65 63 6f 6d 65 73 20 61 |EYLIST b|ecomes a|
|00000dd0| 20 6b 65 79 20 61 6e 64 | 20 69 73 0a 61 73 73 6f | key and| is.asso|
|00000de0| 63 69 61 74 65 64 20 77 | 69 74 68 20 74 68 65 20 |ciated w|ith the |
|00000df0| 76 61 6c 75 65 20 69 6e | 20 56 41 4c 55 45 4c 49 |value in| VALUELI|
|00000e00| 53 54 20 77 69 74 68 20 | 74 68 65 20 73 61 6d 65 |ST with |the same|
|00000e10| 20 69 6e 64 65 78 2e 20 | 49 66 0a 56 41 4c 55 45 | index. |If.VALUE|
|00000e20| 4c 49 53 54 20 69 73 20 | 6e 6f 74 20 73 75 70 70 |LIST is |not supp|
|00000e30| 6c 69 65 64 20 6f 72 20 | 69 73 20 6e 69 6c 2c 20 |lied or |is nil, |
|00000e40| 74 68 65 6e 20 65 61 63 | 68 20 6b 65 79 20 69 6e |then eac|h key in|
|00000e50| 20 4b 45 59 4c 49 53 54 | 20 69 73 0a 61 73 73 6f | KEYLIST| is.asso|
|00000e60| 63 69 61 74 65 64 20 77 | 69 74 68 20 6e 69 6c 2e |ciated w|ith nil.|
|00000e70| 0a 0a 4b 45 59 4c 49 53 | 54 20 61 6e 64 20 56 41 |..KEYLIS|T and VA|
|00000e80| 4c 55 45 4c 49 53 54 20 | 73 68 6f 75 6c 64 20 68 |LUELIST |should h|
|00000e90| 61 76 65 20 74 68 65 20 | 73 61 6d 65 20 6e 75 6d |ave the |same num|
|00000ea0| 62 65 72 20 6f 66 20 65 | 6c 65 6d 65 6e 74 73 2c |ber of e|lements,|
|00000eb0| 20 62 75 74 0a 74 68 69 | 73 20 69 73 6e 27 74 20 | but.thi|s isn't |
|00000ec0| 65 6e 66 6f 72 63 65 64 | 2e 20 20 49 66 20 56 41 |enforced|. If VA|
|00000ed0| 4c 55 45 4c 49 53 54 20 | 69 73 20 73 6d 61 6c 6c |LUELIST |is small|
|00000ee0| 65 72 20 74 68 61 6e 20 | 4b 45 59 4c 49 53 54 2c |er than |KEYLIST,|
|00000ef0| 20 72 65 6d 61 69 6e 69 | 6e 67 0a 6b 65 79 73 20 | remaini|ng.keys |
|00000f00| 61 72 65 20 61 73 73 6f | 63 69 61 74 65 64 20 77 |are asso|ciated w|
|00000f10| 69 74 68 20 6e 69 6c 2e | 20 20 49 66 20 56 41 4c |ith nil.| If VAL|
|00000f20| 55 45 4c 49 53 54 20 69 | 73 20 6c 61 72 67 65 72 |UELIST i|s larger|
|00000f30| 20 74 68 61 6e 20 4b 45 | 59 4c 49 53 54 2c 0a 65 | than KE|YLIST,.e|
|00000f40| 78 74 72 61 20 76 61 6c | 75 65 73 20 61 72 65 20 |xtra val|ues are |
|00000f50| 69 67 6e 6f 72 65 64 2e | 20 20 52 65 74 75 72 6e |ignored.| Return|
|00000f60| 73 20 74 68 65 20 63 72 | 65 61 74 65 64 20 61 6c |s the cr|eated al|
|00000f70| 69 73 74 2e 22 5d 29 0a | 28 70 72 6f 76 69 64 65 |ist."]).|(provide|
|00000f80| 20 27 61 73 73 6f 63 29 | 0a | 'assoc)|. |
+--------+-------------------------+-------------------------+--------+--------+