X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/cdccfc0d1c8960af4d5f38450acfa583549d29a7..cbee283dd7dd655124e81a6bd555506476180b5d:/lisp/emacs-lisp/assoc.el?ds=sidebyside diff --git a/lisp/emacs-lisp/assoc.el b/lisp/emacs-lisp/assoc.el index 428471a16d..8e2bdf2403 100644 --- a/lisp/emacs-lisp/assoc.el +++ b/lisp/emacs-lisp/assoc.el @@ -1,20 +1,27 @@ ;;; assoc.el --- insert/delete/sort functions on association lists +;; Copyright (C) 1996, 2001, 2002, 2003, 2004, 2005, +;; 2006, 2007, 2008 Free Software Foundation, Inc. + ;; Author: Barry A. Warsaw ;; Keywords: extensions -;; This software is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY. No author or distributor accepts -;; responsibility to anyone for the consequences of using it or for -;; whether it serves any particular purpose or works at all, unless he -;; says so in writing. +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. -;; This software was written as part of the supercite author's -;; official duty as an employee of the United States Government and is -;; thus in the public domain. You are free to use that particular -;; software as you wish, but WITHOUT ANY WARRANTY WHATSOEVER. It -;; would be nice, though if when you use any of this code, you give -;; due credit to the author. +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: @@ -23,7 +30,7 @@ ;;; Code: -(defun asort (assoc-symbol key) +(defun asort (alist-symbol key) "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 @@ -57,7 +64,7 @@ pair is not at the head of alist. ALIST is not altered." (defun aput (alist-symbol key &optional value) "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 +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 @@ -131,4 +138,5 @@ extra values are ignored. Returns the created alist." (provide 'assoc) +;; arch-tag: 3e58bd89-d912-4b74-a0dc-6ed9735922bc ;;; assoc.el ends here