home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / emacs-19.16 / lisp / assoc.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 32 3a 31 36 3a 32 | 32 20 31 39 39 33 0a 3b | 22:16:2|2 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 61 73 73 | 6f 63 2e 65 6c 0a 3b 3b |lisp/ass|oc.el.;;|
|00000080| 3b 20 65 6d 61 63 73 20 | 76 65 72 73 69 6f 6e 20 |; emacs |version |
|00000090| 31 39 2e 31 35 2e 31 36 | 2e 0a 3b 3b 3b 20 62 79 |19.15.16|..;;; by|
|000000a0| 74 65 63 6f 6d 70 20 76 | 65 72 73 69 6f 6e 20 46 |tecomp v|ersion F|
|000000b0| 53 46 20 32 2e 31 30 0a | 3b 3b 3b 20 6f 70 74 69 |SF 2.10.|;;; opti|
|000000c0| 6d 69 7a 61 74 69 6f 6e | 20 69 73 20 6f 6e 2e 0a |mization| is on..|
|000000d0| 3b 3b 3b 20 74 68 69 73 | 20 66 69 6c 65 20 75 73 |;;; this| file us|
|000000e0| 65 73 20 6f 70 63 6f 64 | 65 73 20 77 68 69 63 68 |es opcod|es which|
|000000f0| 20 64 6f 20 6e 6f 74 20 | 65 78 69 73 74 20 69 6e | do not |exist in|
|00000100| 20 45 6d 61 63 73 20 31 | 38 2e 0a 0a 28 69 66 20 | Emacs 1|8...(if |
|00000110| 28 61 6e 64 20 28 62 6f | 75 6e 64 70 20 27 65 6d |(and (bo|undp 'em|
|00000120| 61 63 73 2d 76 65 72 73 | 69 6f 6e 29 0a 09 20 28 |acs-vers|ion).. (|
|00000130| 6f 72 20 28 61 6e 64 20 | 28 62 6f 75 6e 64 70 20 |or (and |(boundp |
|00000140| 27 65 70 6f 63 68 3a 3a | 76 65 72 73 69 6f 6e 29 |'epoch::|version)|
|00000150| 20 65 70 6f 63 68 3a 3a | 76 65 72 73 69 6f 6e 29 | epoch::|version)|
|00000160| 0a 09 20 20 20 20 20 28 | 73 74 72 69 6e 67 2d 6c |.. (|string-l|
|00000170| 65 73 73 70 20 65 6d 61 | 63 73 2d 76 65 72 73 69 |essp ema|cs-versi|
|00000180| 6f 6e 20 22 31 39 22 29 | 29 29 0a 20 20 20 20 28 |on "19")|)). (|
|00000190| 65 72 72 6f 72 20 22 54 | 68 69 73 20 66 69 6c 65 |error "T|his file|
|000001a0| 20 77 61 73 20 63 6f 6d | 70 69 6c 65 64 20 66 6f | was com|piled fo|
|000001b0| 72 20 45 6d 61 63 73 20 | 31 39 22 29 29 0a 0a 28 |r Emacs |19"))..(|
|000001c0| 64 65 66 61 6c 69 61 73 | 20 27 61 73 6f 72 74 20 |defalias| 'asort |
|000001d0| 23 5b 28 61 73 73 6f 63 | 2d 73 79 6d 62 6f 6c 20 |#[(assoc|-symbol |
|000001e0| 6b 65 79 29 20 22 08 c1 | c2 c3 08 21 21 c4 5c 22 |key) "..|...!!.\"|
|000001f0| 4c 87 22 20 5b 61 6c 69 | 73 74 2d 73 79 6d 62 6f |L." [ali|st-symbo|
|00000200| 6c 20 73 6f 72 74 20 63 | 6f 70 79 2d 61 6c 69 73 |l sort c|opy-alis|
|00000210| 74 20 65 76 61 6c 20 23 | 5b 28 61 20 62 29 20 22 |t eval #|[(a b) "|
|00000220| 08 40 09 9a 87 22 20 5b | 61 20 6b 65 79 5d 20 32 |.@..." [|a key] 2|
|00000230| 5d 5d 20 35 20 22 5c 0a | 4d 6f 76 65 20 61 20 73 |]] 5 "\.|Move a s|
|00000240| 70 65 63 69 66 69 65 64 | 20 6b 65 79 2d 76 61 6c |pecified| key-val|
|00000250| 75 65 20 70 61 69 72 20 | 74 6f 20 74 68 65 20 68 |ue pair |to the h|
|00000260| 65 61 64 20 6f 66 20 61 | 6e 20 61 6c 69 73 74 2e |ead of a|n alist.|
|00000270| 0a 54 68 65 20 61 6c 69 | 73 74 20 69 73 20 72 65 |.The ali|st is re|
|00000280| 66 65 72 65 6e 63 65 64 | 20 62 79 20 41 4c 49 53 |ferenced| by ALIS|
|00000290| 54 2d 53 59 4d 42 4f 4c | 2e 20 4b 65 79 2d 76 61 |T-SYMBOL|. Key-va|
|000002a0| 6c 75 65 20 70 61 69 72 | 20 74 6f 20 6d 6f 76 65 |lue pair| to move|
|000002b0| 20 74 6f 0a 68 65 61 64 | 20 69 73 20 6f 6e 65 20 | to.head| is one |
|000002c0| 6d 61 74 63 68 69 6e 67 | 20 4b 45 59 2e 20 20 52 |matching| KEY. R|
|000002d0| 65 74 75 72 6e 73 20 74 | 68 65 20 73 6f 72 74 65 |eturns t|he sorte|
|000002e0| 64 20 6c 69 73 74 20 61 | 6e 64 20 64 6f 65 73 6e |d list a|nd doesn|
|000002f0| 27 74 20 61 66 66 65 63 | 74 0a 74 68 65 20 6f 72 |'t affec|t.the or|
|00000300| 64 65 72 20 6f 66 20 61 | 6e 79 20 6f 74 68 65 72 |der of a|ny other|
|00000310| 20 6b 65 79 2d 76 61 6c | 75 65 20 70 61 69 72 2e | key-val|ue pair.|
|00000320| 20 20 53 69 64 65 20 65 | 66 66 65 63 74 20 73 65 | Side e|ffect se|
|00000330| 74 73 20 61 6c 69 73 74 | 20 74 6f 20 6e 65 77 0a |ts alist| to new.|
|00000340| 73 6f 72 74 65 64 20 6c | 69 73 74 2e 22 5d 29 0a |sorted l|ist."]).|
|00000350| 28 64 65 66 61 6c 69 61 | 73 20 27 61 65 6c 65 6d |(defalia|s 'aelem|
|00000360| 65 6e 74 20 23 5b 28 6b | 65 79 20 76 61 6c 75 65 |ent #[(k|ey value|
|00000370| 29 20 22 08 09 42 43 87 | 22 20 5b 6b 65 79 20 76 |) "..BC.|" [key v|
|00000380| 61 6c 75 65 5d 20 32 20 | 22 5c 0a 4d 61 6b 65 73 |alue] 2 |"\.Makes|
|00000390| 20 61 20 6c 69 73 74 20 | 6f 66 20 61 20 63 6f 6e | a list |of a con|
|000003a0| 73 20 63 65 6c 6c 20 63 | 6f 6e 74 61 69 6e 69 6e |s cell c|ontainin|
|000003b0| 67 20 63 61 72 20 6f 66 | 20 4b 45 59 20 61 6e 64 |g car of| KEY and|
|000003c0| 20 63 64 72 20 6f 66 20 | 56 41 4c 55 45 2e 0a 54 | cdr of |VALUE..T|
|000003d0| 68 65 20 72 65 74 75 72 | 6e 65 64 20 6c 69 73 74 |he retur|ned list|
|000003e0| 20 69 73 20 73 75 69 74 | 61 62 6c 65 20 61 73 20 | is suit|able as |
|000003f0| 61 6e 20 65 6c 65 6d 65 | 6e 74 20 6f 66 20 61 6e |an eleme|nt of an|
|00000400| 20 61 6c 69 73 74 2e 22 | 5d 29 0a 28 64 65 66 61 | alist."|]).(defa|
|00000410| 6c 69 61 73 20 27 61 68 | 65 61 64 73 79 6d 20 23 |lias 'ah|eadsym #|
|00000420| 5b 28 61 6c 69 73 74 29 | 20 22 08 40 40 87 22 20 |[(alist)| ".@@." |
|00000430| 5b 61 6c 69 73 74 5d 20 | 31 20 22 5c 0a 52 65 74 |[alist] |1 "\.Ret|
|00000440| 75 72 6e 20 74 68 65 20 | 6b 65 79 20 73 79 6d 62 |urn the |key symb|
|00000450| 6f 6c 20 61 74 20 74 68 | 65 20 68 65 61 64 20 6f |ol at th|e head o|
|00000460| 66 20 41 4c 49 53 54 2e | 22 5d 29 0a 28 64 65 66 |f ALIST.|"]).(def|
|00000470| 61 6c 69 61 73 20 27 61 | 6e 6f 74 2d 68 65 61 64 |alias 'a|not-head|
|00000480| 2d 70 20 23 5b 28 61 6c | 69 73 74 20 6b 65 79 29 |-p #[(al|ist key)|
|00000490| 20 22 c0 09 21 5c 6e 9a | 3f 87 22 20 5b 61 68 65 | "..!\n.|?." [ahe|
|000004a0| 61 64 73 79 6d 20 61 6c | 69 73 74 20 6b 65 79 5d |adsym al|ist key]|
|000004b0| 20 32 20 22 5c 0a 46 69 | 6e 64 20 6f 75 74 20 69 | 2 "\.Fi|nd out i|
|000004c0| 66 20 61 20 73 70 65 63 | 69 66 69 65 64 20 6b 65 |f a spec|ified ke|
|000004d0| 79 2d 76 61 6c 75 65 20 | 70 61 69 72 20 69 73 20 |y-value |pair is |
|000004e0| 6e 6f 74 20 61 74 20 74 | 68 65 20 68 65 61 64 20 |not at t|he head |
|000004f0| 6f 66 20 61 6e 20 61 6c | 69 73 74 2e 0a 54 68 65 |of an al|ist..The|
|00000500| 20 61 6c 69 73 74 20 74 | 6f 20 63 68 65 63 6b 20 | alist t|o check |
|00000510| 69 73 20 73 70 65 63 69 | 66 69 65 64 20 62 79 20 |is speci|fied by |
|00000520| 41 4c 49 53 54 20 61 6e | 64 20 74 68 65 20 6b 65 |ALIST an|d the ke|
|00000530| 79 2d 76 61 6c 75 65 20 | 70 61 69 72 20 69 73 20 |y-value |pair is |
|00000540| 74 68 65 0a 6f 6e 65 20 | 6d 61 74 63 68 69 6e 67 |the.one |matching|
|00000550| 20 74 68 65 20 73 75 70 | 70 6c 69 65 64 20 4b 45 | the sup|plied KE|
|00000560| 59 2e 20 20 52 65 74 75 | 72 6e 73 20 6e 69 6c 20 |Y. Retu|rns nil |
|00000570| 69 66 20 41 4c 49 53 54 | 20 69 73 20 6e 69 6c 2c |if ALIST| is nil,|
|00000580| 20 6f 72 20 69 66 0a 6b | 65 79 2d 76 61 6c 75 65 | or if.k|ey-value|
|00000590| 20 70 61 69 72 20 69 73 | 20 61 74 20 74 68 65 20 | pair is| at the |
|000005a0| 68 65 61 64 20 6f 66 20 | 74 68 65 20 61 6c 69 73 |head of |the alis|
|000005b0| 74 2e 20 20 52 65 74 75 | 72 6e 73 20 74 20 69 66 |t. Retu|rns t if|
|000005c0| 20 6b 65 79 2d 76 61 6c | 75 65 0a 70 61 69 72 20 | key-val|ue.pair |
|000005d0| 69 73 20 6e 6f 74 20 61 | 74 20 74 68 65 20 68 65 |is not a|t the he|
|000005e0| 61 64 20 6f 66 20 61 6c | 69 73 74 2e 20 20 41 4c |ad of al|ist. AL|
|000005f0| 49 53 54 20 69 73 20 6e | 6f 74 20 61 6c 74 65 72 |IST is n|ot alter|
|00000600| 65 64 2e 22 5d 29 0a 28 | 64 65 66 61 6c 69 61 73 |ed."]).(|defalias|
|00000610| 20 27 61 70 75 74 20 23 | 5b 28 61 6c 69 73 74 2d | 'aput #|[(alist-|
|00000620| 73 79 6d 62 6f 6c 20 6b | 65 79 20 26 6f 70 74 69 |symbol k|ey &opti|
|00000630| 6f 6e 61 6c 20 76 61 6c | 75 65 29 20 22 c0 09 5c |onal val|ue) "..\|
|00000640| 6e 5c 22 c3 1c 1d c6 0e | 07 09 5c 22 88 c8 0e 07 |n\".....|..\"....|
|00000650| 21 89 14 84 1d 00 0e 07 | 0d 4c 82 39 00 c9 0c 09 |!.......|.L.9....|
|00000660| 5c 22 83 2d 00 0e 07 0d | 0c a4 4c 82 39 00 5c 6e |\".-....|..L.9.\n|
|00000670| 83 38 00 0c 0d 40 a0 82 | 39 00 0c 2a 87 22 20 5b |.8...@..|9..*." [|
|00000680| 61 65 6c 65 6d 65 6e 74 | 20 6b 65 79 20 76 61 6c |aelement| key val|
|00000690| 75 65 20 6e 69 6c 20 61 | 6c 69 73 74 20 65 6c 65 |ue nil a|list ele|
|000006a0| 6d 20 61 73 6f 72 74 20 | 61 6c 69 73 74 2d 73 79 |m asort |alist-sy|
|000006b0| 6d 62 6f 6c 20 65 76 61 | 6c 20 61 6e 6f 74 2d 68 |mbol eva|l anot-h|
|000006c0| 65 61 64 2d 70 5d 20 34 | 20 22 5c 0a 49 6e 73 65 |ead-p] 4| "\.Inse|
|000006d0| 72 74 73 20 61 20 6b 65 | 79 2d 76 61 6c 75 65 20 |rts a ke|y-value |
|000006e0| 70 61 69 72 20 69 6e 74 | 6f 20 61 6e 20 61 6c 69 |pair int|o an ali|
|000006f0| 73 74 2e 0a 54 68 65 20 | 61 6c 69 73 74 20 69 73 |st..The |alist is|
|00000700| 20 72 65 66 65 72 65 6e | 63 65 64 20 62 79 20 41 | referen|ced by A|
|00000710| 4c 49 53 54 2d 53 59 4d | 42 4f 4c 2e 20 54 68 65 |LIST-SYM|BOL. The|
|00000720| 20 6b 65 79 2d 76 61 6c | 75 65 20 70 61 69 72 20 | key-val|ue pair |
|00000730| 69 73 20 6d 61 64 65 0a | 66 72 6f 6d 20 4b 45 59 |is made.|from KEY|
|00000740| 20 61 6e 64 20 6f 70 74 | 69 6f 6e 61 6c 6c 79 2c | and opt|ionally,|
|00000750| 20 56 41 4c 55 45 2e 20 | 52 65 74 75 72 6e 73 20 | VALUE. |Returns |
|00000760| 74 68 65 20 61 6c 74 65 | 72 65 64 20 61 6c 69 73 |the alte|red alis|
|00000770| 74 20 6f 72 20 6e 69 6c | 20 69 66 0a 41 4c 49 53 |t or nil| if.ALIS|
|00000780| 54 20 69 73 20 6e 69 6c | 2e 0a 0a 49 66 20 74 68 |T is nil|...If th|
|00000790| 65 20 6b 65 79 2d 76 61 | 6c 75 65 20 70 61 69 72 |e key-va|lue pair|
|000007a0| 20 72 65 66 65 72 65 6e | 63 65 64 20 62 79 20 4b | referen|ced by K|
|000007b0| 45 59 20 63 61 6e 20 62 | 65 20 66 6f 75 6e 64 20 |EY can b|e found |
|000007c0| 69 6e 20 74 68 65 20 61 | 6c 69 73 74 2c 20 61 6e |in the a|list, an|
|000007d0| 64 0a 56 41 4c 55 45 20 | 69 73 20 73 75 70 70 6c |d.VALUE |is suppl|
|000007e0| 69 65 64 20 6e 6f 6e 2d | 6e 69 6c 2c 20 74 68 65 |ied non-|nil, the|
|000007f0| 6e 20 74 68 65 20 76 61 | 6c 75 65 20 6f 66 20 4b |n the va|lue of K|
|00000800| 45 59 20 77 69 6c 6c 20 | 62 65 20 73 65 74 20 74 |EY will |be set t|
|00000810| 6f 20 56 41 4c 55 45 2e | 0a 49 66 20 56 41 4c 55 |o VALUE.|.If VALU|
|00000820| 45 20 69 73 20 6e 6f 74 | 20 73 75 70 70 6c 69 65 |E is not| supplie|
|00000830| 64 2c 20 6f 72 20 69 73 | 20 6e 69 6c 2c 20 74 68 |d, or is| nil, th|
|00000840| 65 20 6b 65 79 2d 76 61 | 6c 75 65 20 70 61 69 72 |e key-va|lue pair|
|00000850| 20 77 69 6c 6c 20 6e 6f | 74 20 62 65 0a 6d 6f 64 | will no|t be.mod|
|00000860| 69 66 69 65 64 2c 20 62 | 75 74 20 77 69 6c 6c 20 |ified, b|ut will |
|00000870| 62 65 20 6d 6f 76 65 64 | 20 74 6f 20 74 68 65 20 |be moved| to the |
|00000880| 68 65 61 64 20 6f 66 20 | 74 68 65 20 61 6c 69 73 |head of |the alis|
|00000890| 74 2e 20 49 66 20 74 68 | 65 20 6b 65 79 2d 76 61 |t. If th|e key-va|
|000008a0| 6c 75 65 0a 70 61 69 72 | 20 63 61 6e 6e 6f 74 20 |lue.pair| cannot |
|000008b0| 62 65 20 66 6f 75 6e 64 | 20 69 6e 20 74 68 65 20 |be found| in the |
|000008c0| 61 6c 69 73 74 2c 20 69 | 74 20 77 69 6c 6c 20 62 |alist, i|t will b|
|000008d0| 65 20 69 6e 73 65 72 74 | 65 64 20 69 6e 74 6f 20 |e insert|ed into |
|000008e0| 74 68 65 20 68 65 61 64 | 0a 6f 66 20 74 68 65 20 |the head|.of the |
|000008f0| 61 6c 69 73 74 20 28 77 | 69 74 68 20 76 61 6c 75 |alist (w|ith valu|
|00000900| 65 20 6e 69 6c 20 69 66 | 20 56 41 4c 55 45 20 69 |e nil if| VALUE i|
|00000910| 73 20 6e 69 6c 20 6f 72 | 20 6e 6f 74 20 73 75 70 |s nil or| not sup|
|00000920| 70 6c 69 65 64 29 2e 22 | 5d 29 0a 28 64 65 66 61 |plied)."|]).(defa|
|00000930| 6c 69 61 73 20 27 61 64 | 65 6c 65 74 65 20 23 5b |lias 'ad|elete #[|
|00000940| 28 61 6c 69 73 74 2d 73 | 79 6d 62 6f 6c 20 6b 65 |(alist-s|ymbol ke|
|00000950| 79 29 20 22 c0 09 5c 6e | 5c 22 88 c3 09 21 89 1c |y) "..\n|\"...!..|
|00000960| 84 11 00 c5 82 20 00 c6 | 0c 5c 6e 5c 22 83 1c 00 |..... ..|.\n\"...|
|00000970| 0c 82 20 00 09 0c 41 4c | 29 87 22 20 5b 61 73 6f |.. ...AL|)." [aso|
|00000980| 72 74 20 61 6c 69 73 74 | 2d 73 79 6d 62 6f 6c 20 |rt alist|-symbol |
|00000990| 6b 65 79 20 65 76 61 6c | 20 61 6c 69 73 74 20 6e |key eval| alist n|
|000009a0| 69 6c 20 61 6e 6f 74 2d | 68 65 61 64 2d 70 5d 20 |il anot-|head-p] |
|000009b0| 34 20 22 5c 0a 44 65 6c | 65 74 65 20 61 20 6b 65 |4 "\.Del|ete a ke|
|000009c0| 79 2d 76 61 6c 75 65 20 | 70 61 69 72 20 66 72 6f |y-value |pair fro|
|000009d0| 6d 20 74 68 65 20 61 6c | 69 73 74 2e 0a 41 6c 69 |m the al|ist..Ali|
|000009e0| 73 74 20 69 73 20 72 65 | 66 65 72 65 6e 63 65 64 |st is re|ferenced|
|000009f0| 20 62 79 20 41 4c 49 53 | 54 2d 53 59 4d 42 4f 4c | by ALIS|T-SYMBOL|
|00000a00| 20 61 6e 64 20 74 68 65 | 20 6b 65 79 2d 76 61 6c | and the| key-val|
|00000a10| 75 65 20 70 61 69 72 20 | 74 6f 20 72 65 6d 6f 76 |ue pair |to remov|
|00000a20| 65 0a 69 73 20 70 61 69 | 72 20 6d 61 74 63 68 69 |e.is pai|r matchi|
|00000a30| 6e 67 20 4b 45 59 2e 20 | 20 52 65 74 75 72 6e 73 |ng KEY. | Returns|
|00000a40| 20 74 68 65 20 61 6c 74 | 65 72 65 64 20 61 6c 69 | the alt|ered ali|
|00000a50| 73 74 2e 22 5d 29 0a 28 | 64 65 66 61 6c 69 61 73 |st."]).(|defalias|
|00000a60| 20 27 61 67 65 74 20 23 | 5b 28 61 6c 69 73 74 20 | 'aget #|[(alist |
|00000a70| 6b 65 79 20 26 6f 70 74 | 69 6f 6e 61 6c 20 6b 65 |key &opt|ional ke|
|00000a80| 79 6e 69 6c 2d 70 29 20 | 22 c0 09 21 1a 09 84 0c |ynil-p) |"..!....|
|00000a90| 00 c3 82 32 00 c4 c2 0d | 5c 22 88 c6 5c 6e 0d 5c |...2....|\"..\n.\|
|00000aa0| 22 83 1c 00 c3 82 32 00 | 5c 6e 40 41 86 32 00 0e |".....2.|\n@A.2..|
|00000ab0| 07 83 2b 00 c3 82 32 00 | 5c 6e 40 40 86 32 00 c3 |..+...2.|\n@@.2..|
|00000ac0| 29 87 22 20 5b 63 6f 70 | 79 2d 61 6c 69 73 74 20 |)." [cop|y-alist |
|00000ad0| 61 6c 69 73 74 20 63 6f | 70 79 20 6e 69 6c 20 61 |alist co|py nil a|
|00000ae0| 73 6f 72 74 20 6b 65 79 | 20 61 6e 6f 74 2d 68 65 |sort key| anot-he|
|00000af0| 61 64 2d 70 20 6b 65 79 | 6e 69 6c 2d 70 5d 20 33 |ad-p key|nil-p] 3|
|00000b00| 20 22 5c 0a 52 65 74 75 | 72 6e 73 20 74 68 65 20 | "\.Retu|rns the |
|00000b10| 76 61 6c 75 65 20 69 6e | 20 41 4c 49 53 54 20 74 |value in| ALIST t|
|00000b20| 68 61 74 20 69 73 20 61 | 73 73 6f 63 69 61 74 65 |hat is a|ssociate|
|00000b30| 64 20 77 69 74 68 20 4b | 45 59 2e 0a 4f 70 74 69 |d with K|EY..Opti|
|00000b40| 6f 6e 61 6c 20 4b 45 59 | 4e 49 4c 2d 50 20 64 65 |onal KEY|NIL-P de|
|00000b50| 73 63 72 69 62 65 73 20 | 77 68 61 74 20 74 6f 20 |scribes |what to |
|00000b60| 64 6f 20 69 66 20 74 68 | 65 20 76 61 6c 75 65 20 |do if th|e value |
|00000b70| 61 73 73 6f 63 69 61 74 | 65 64 20 77 69 74 68 0a |associat|ed with.|
|00000b80| 4b 45 59 20 69 73 20 6e | 69 6c 2e 20 20 49 66 20 |KEY is n|il. If |
|00000b90| 4b 45 59 4e 49 4c 2d 50 | 20 69 73 20 6e 6f 74 20 |KEYNIL-P| is not |
|00000ba0| 73 75 70 70 6c 69 65 64 | 20 6f 72 20 69 73 20 6e |supplied| or is n|
|00000bb0| 69 6c 2c 20 61 6e 64 20 | 74 68 65 20 76 61 6c 75 |il, and |the valu|
|00000bc0| 65 20 69 73 0a 6e 69 6c | 2c 20 74 68 65 6e 20 4b |e is.nil|, then K|
|00000bd0| 45 59 20 69 73 20 72 65 | 74 75 72 6e 65 64 2e 20 |EY is re|turned. |
|00000be0| 20 49 66 20 4b 45 59 4e | 49 4c 2d 50 20 69 73 20 | If KEYN|IL-P is |
|00000bf0| 6e 6f 6e 2d 6e 69 6c 2c | 20 74 68 65 6e 20 6e 69 |non-nil,| then ni|
|00000c00| 6c 20 77 6f 75 6c 64 20 | 62 65 0a 72 65 74 75 72 |l would |be.retur|
|00000c10| 6e 65 64 2e 0a 0a 49 66 | 20 6e 6f 20 6b 65 79 2d |ned...If| no key-|
|00000c20| 76 61 6c 75 65 20 70 61 | 69 72 20 6d 61 74 63 68 |value pa|ir match|
|00000c30| 69 6e 67 20 4b 45 59 20 | 63 6f 75 6c 64 20 62 65 |ing KEY |could be|
|00000c40| 20 66 6f 75 6e 64 20 69 | 6e 20 41 4c 49 53 54 2c | found i|n ALIST,|
|00000c50| 20 6f 72 20 41 4c 49 53 | 54 20 69 73 0a 6e 69 6c | or ALIS|T is.nil|
|00000c60| 20 74 68 65 6e 20 6e 69 | 6c 20 69 73 20 72 65 74 | then ni|l is ret|
|00000c70| 75 72 6e 65 64 2e 20 41 | 4c 49 53 54 20 69 73 20 |urned. A|LIST is |
|00000c80| 6e 6f 74 20 61 6c 74 65 | 72 65 64 2e 22 5d 29 0a |not alte|red."]).|
|00000c90| 28 64 65 66 61 6c 69 61 | 73 20 27 61 6d 61 6b 65 |(defalia|s 'amake|
|00000ca0| 20 23 5b 28 61 6c 69 73 | 74 2d 73 79 6d 62 6f 6c | #[(alis|t-symbol|
|00000cb0| 20 6b 65 79 6c 69 73 74 | 20 26 6f 70 74 69 6f 6e | keylist| &option|
|00000cc0| 61 6c 20 76 61 6c 75 65 | 6c 69 73 74 29 20 22 08 |al value|list) ".|
|00000cd0| 40 08 41 09 40 09 41 1a | 1b 1c 1d 0c 84 1a 00 c6 |@.A.@.A.|........|
|00000ce0| 0e 07 0d 0b 23 88 82 28 | 00 c8 0e 07 0c 5c 6e 23 |....#..(|.....\n#|
|00000cf0| 88 c6 0e 07 0d 0b 23 88 | 2c c9 0e 07 21 87 22 20 |......#.|,...!." |
|00000d00| 5b 6b 65 79 6c 69 73 74 | 20 76 61 6c 75 65 6c 69 |[keylist| valueli|
|00000d10| 73 74 20 76 61 6c 63 64 | 72 20 76 61 6c 63 61 72 |st valcd|r valcar|
|00000d20| 20 6b 65 79 63 64 72 20 | 6b 65 79 63 61 72 20 61 | keycdr |keycar a|
|00000d30| 70 75 74 20 61 6c 69 73 | 74 2d 73 79 6d 62 6f 6c |put alis|t-symbol|
|00000d40| 20 61 6d 61 6b 65 20 65 | 76 61 6c 5d 20 34 20 22 | amake e|val] 4 "|
|00000d50| 5c 0a 4d 61 6b 65 20 61 | 6e 20 61 73 73 6f 63 69 |\.Make a|n associ|
|00000d60| 61 74 69 6f 6e 20 6c 69 | 73 74 2e 0a 54 68 65 20 |ation li|st..The |
|00000d70| 61 73 73 6f 63 69 61 74 | 69 6f 6e 20 6c 69 73 74 |associat|ion list|
|00000d80| 20 69 73 20 61 74 74 61 | 63 68 65 64 20 74 6f 20 | is atta|ched to |
|00000d90| 74 68 65 20 61 6c 69 73 | 74 20 72 65 66 65 72 65 |the alis|t refere|
|00000da0| 6e 63 65 64 20 62 79 0a | 41 4c 49 53 54 2d 53 59 |nced by.|ALIST-SY|
|00000db0| 4d 42 4f 4c 2e 20 45 61 | 63 68 20 65 6c 65 6d 65 |MBOL. Ea|ch eleme|
|00000dc0| 6e 74 20 69 6e 20 74 68 | 65 20 4b 45 59 4c 49 53 |nt in th|e KEYLIS|
|00000dd0| 54 20 62 65 63 6f 6d 65 | 73 20 61 20 6b 65 79 20 |T become|s a key |
|00000de0| 61 6e 64 20 69 73 0a 61 | 73 73 6f 63 69 61 74 65 |and is.a|ssociate|
|00000df0| 64 20 77 69 74 68 20 74 | 68 65 20 76 61 6c 75 65 |d with t|he value|
|00000e00| 20 69 6e 20 56 41 4c 55 | 45 4c 49 53 54 20 77 69 | in VALU|ELIST wi|
|00000e10| 74 68 20 74 68 65 20 73 | 61 6d 65 20 69 6e 64 65 |th the s|ame inde|
|00000e20| 78 2e 20 49 66 0a 56 41 | 4c 55 45 4c 49 53 54 20 |x. If.VA|LUELIST |
|00000e30| 69 73 20 6e 6f 74 20 73 | 75 70 70 6c 69 65 64 20 |is not s|upplied |
|00000e40| 6f 72 20 69 73 20 6e 69 | 6c 2c 20 74 68 65 6e 20 |or is ni|l, then |
|00000e50| 65 61 63 68 20 6b 65 79 | 20 69 6e 20 4b 45 59 4c |each key| in KEYL|
|00000e60| 49 53 54 20 69 73 0a 61 | 73 73 6f 63 69 61 74 65 |IST is.a|ssociate|
|00000e70| 64 20 77 69 74 68 20 6e | 69 6c 2e 0a 0a 4b 45 59 |d with n|il...KEY|
|00000e80| 4c 49 53 54 20 61 6e 64 | 20 56 41 4c 55 45 4c 49 |LIST and| VALUELI|
|00000e90| 53 54 20 73 68 6f 75 6c | 64 20 68 61 76 65 20 74 |ST shoul|d have t|
|00000ea0| 68 65 20 73 61 6d 65 20 | 6e 75 6d 62 65 72 20 6f |he same |number o|
|00000eb0| 66 20 65 6c 65 6d 65 6e | 74 73 2c 20 62 75 74 0a |f elemen|ts, but.|
|00000ec0| 74 68 69 73 20 69 73 6e | 27 74 20 65 6e 66 6f 72 |this isn|'t enfor|
|00000ed0| 63 65 64 2e 20 20 49 66 | 20 56 41 4c 55 45 4c 49 |ced. If| VALUELI|
|00000ee0| 53 54 20 69 73 20 73 6d | 61 6c 6c 65 72 20 74 68 |ST is sm|aller th|
|00000ef0| 61 6e 20 4b 45 59 4c 49 | 53 54 2c 20 72 65 6d 61 |an KEYLI|ST, rema|
|00000f00| 69 6e 69 6e 67 0a 6b 65 | 79 73 20 61 72 65 20 61 |ining.ke|ys are a|
|00000f10| 73 73 6f 63 69 61 74 65 | 64 20 77 69 74 68 20 6e |ssociate|d with n|
|00000f20| 69 6c 2e 20 20 49 66 20 | 56 41 4c 55 45 4c 49 53 |il. If |VALUELIS|
|00000f30| 54 20 69 73 20 6c 61 72 | 67 65 72 20 74 68 61 6e |T is lar|ger than|
|00000f40| 20 4b 45 59 4c 49 53 54 | 2c 0a 65 78 74 72 61 20 | KEYLIST|,.extra |
|00000f50| 76 61 6c 75 65 73 20 61 | 72 65 20 69 67 6e 6f 72 |values a|re ignor|
|00000f60| 65 64 2e 20 20 52 65 74 | 75 72 6e 73 20 74 68 65 |ed. Ret|urns the|
|00000f70| 20 63 72 65 61 74 65 64 | 20 61 6c 69 73 74 2e 22 | created| alist."|
|00000f80| 5d 29 0a 28 70 72 6f 76 | 69 64 65 20 28 71 75 6f |]).(prov|ide (quo|
|00000f90| 74 65 20 61 73 73 6f 63 | 29 29 0a |te assoc|)). |
+--------+-------------------------+-------------------------+--------+--------+