X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=alist.el;h=4ac31695e92ceb871d866800b2346eadfc43446b;hb=774c18d282ffe474551d515ac329ddc3daf26ea4;hp=fbd409addf5d053d54d04d3a154d53abed933455;hpb=1a3728fd8d581e1f6c49a09f20203a84446c5690;p=elisp%2Fapel.git diff --git a/alist.el b/alist.el index fbd409a..4ac3169 100644 --- a/alist.el +++ b/alist.el @@ -1,8 +1,8 @@ ;;; alist.el --- utility functions about association-list -;; Copyright (C) 1993,1994,1995,1996,1998 Free Software Foundation, Inc. +;; Copyright (C) 1993,1994,1995,1996,1998,2000 Free Software Foundation, Inc. -;; Author: MORIOKA Tomohiko +;; Author: MORIOKA Tomohiko ;; Keywords: alist ;; This file is part of APEL (A Portable Emacs Library). @@ -97,9 +97,24 @@ its value regard as nil." ) +;;; @ association-vector-list +;;; + +;;;###autoload +(defun vassoc (key avlist) + "Search AVLIST for a vector whose first element is equal to KEY. +See also `assoc'." + (let (v) + (while (and (setq v (car avlist)) + (not (equal key (aref v 0)))) + (setq avlist (cdr avlist))) + v)) + + ;;; @ end ;;; -(provide 'alist) +(require 'product) +(product-provide (provide 'alist) (require 'apel-ver)) ;;; alist.el ends here