;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Tue May 2 20:13:12 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/assoc.el ;;; emacs version 19.28.90.69. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "`/gd/gnu/emacs/19.0/lisp/assoc.el' was compiled for Emacs 19")) #@278 Move a specified key-value pair to the head of an alist. The alist is referenced by ALIST-SYMBOL. Key-value pair to move to head is one matching KEY. Returns the sorted list and doesn't affect the order of any other key-value pair. Side effect sets alist to new sorted list. (defalias 'asort #[(alist-symbol key) "ΑΒΓ!!Δ\"L‡" [alist-symbol sort copy-alist eval #[(a b) "@ š‡" [a key] 2]] 5 (#$ . 480)]) #@126 Makes a list of a cons cell containing car of KEY and cdr of VALUE. The returned list is suitable as an element of an alist. (defalias 'aelement #[(key value) " BC‡" [key value] 2 (#$ . 895)]) #@45 Return the key symbol at the head of ALIST. (defalias 'aheadsym #[(alist) "@@‡" [alist] 1 (#$ . 1095)]) #@335 Find out if a specified key-value pair is not at the head of an alist. The alist to check is specified by ALIST and the key-value pair is the one matching the supplied KEY. Returns nil if ALIST is nil, or if key-value pair is at the head of the alist. Returns t if key-value pair is not at the head of alist. ALIST is not altered. (defalias 'anot-head-p #[(alist key) "ΐ !\nš?‡" [aheadsym alist key] 2 (#$ . 1207)]) #@605 Inserts a key-value pair into an alist. The alist is referenced by ALIST-SYMBOL. The key-value pair is made from KEY and optionally, VALUE. Returns the altered alist or nil if ALIST is nil. If the key-value pair referenced by KEY can be found in the alist, and VALUE is supplied non-nil, then the value of KEY will be set to VALUE. If VALUE is not supplied, or is nil, the key-value pair will not be modified, but will be moved to the head of the alist. If the key-value pair cannot be found in the alist, it will be inserted into the head of the alist (with value nil if VALUE is nil or not supplied). (defalias 'aput #[(alist-symbol key &optional value) "ΐ \n\"ΓΖ \"ˆΘ!‰„ L‚9Ι\f \"ƒ- \f€L‚9\nƒ8\f @ ‚9\f*‡" [aelement key value nil alist elem asort alist-symbol eval anot-head-p] 4 (#$ . 1633)]) #@160 Delete a key-value pair from the alist. Alist is referenced by ALIST-SYMBOL and the key-value pair to remove is pair matching KEY. Returns the altered alist. (defalias 'adelete #[(alist-symbol key) "ΐ \n\"ˆΓ !‰„Ε‚ Ζ\f\n\"ƒ\f‚ \fAL)‡" [asort alist-symbol key eval alist nil anot-head-p] 4 (#$ . 2456)]) #@394 Returns the value in ALIST that is associated with KEY. Optional KEYNIL-P describes what to do if the value associated with KEY is nil. If KEYNIL-P is not supplied or is nil, and the value is nil, then KEY is returned. If KEYNIL-P is non-nil, then nil would be returned. If no key-value pair matching KEY could be found in ALIST, or ALIST is nil then nil is returned. ALIST is not altered. (defalias 'aget #[(alist key &optional keynil-p) "ΐ ! „\fΓ‚2ΔΒ \"ˆΖ\n \"ƒΓ‚2\n@A†2ƒ+Γ‚2\n@@†2Γ)‡" [copy-alist alist copy nil asort key anot-head-p keynil-p] 3 (#$ . 2774)]) #@559 Make an association list. The association list is attached to the alist referenced by ALIST-SYMBOL. Each element in the KEYLIST becomes a key and is associated with the value in VALUELIST with the same index. If VALUELIST is not supplied or is nil, then each key in KEYLIST is associated with nil. KEYLIST and VALUELIST should have the same number of elements, but this isn't enforced. If VALUELIST is smaller than KEYLIST, remaining keys are associated with nil. If VALUELIST is larger than KEYLIST, extra values are ignored. Returns the created alist. (defalias 'amake #[(alist-symbol keylist &optional valuelist) "@A @ A\f„Ζ #ˆ‚(Θ\f\n#ˆΖ #ˆ,Ι!‡" [keylist valuelist valcdr valcar keycdr keycar aput alist-symbol amake eval] 4 (#$ . 3359)]) (provide (quote assoc))