]> code.delx.au - gnu-emacs/blobdiff - lisp/obsolete/assoc.el
Update copyright year to 2015
[gnu-emacs] / lisp / obsolete / assoc.el
index d0738dfeb2c30a96c90e383c1de71d0992ef0927..cbf4c819c5e86b72e96a69da7840dd30d1f3dcfb 100644 (file)
@@ -1,10 +1,10 @@
 ;;; assoc.el --- insert/delete functions on association lists  -*- lexical-binding: t -*-
 
-;; Copyright (C) 1996, 2001-201 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: Barry A. Warsaw <bwarsaw@cen.com>
 ;; Keywords: extensions
-;; Obsolete-since: 24.2
+;; Obsolete-since: 24.3
 
 ;; This file is part of GNU Emacs.
 
@@ -102,14 +102,14 @@ 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."
-  (defvar copy)
-  (let ((copy (copy-alist alist)))
+  (defvar assoc--copy)
+  (let ((assoc--copy (copy-alist alist)))
     (cond ((null alist) nil)
-         ((progn (asort 'copy key)
-                 (anot-head-p copy key)) nil)
-         ((cdr (car copy)))
+         ((progn (asort 'assoc--copy key) ; dynamic binding
+                 (anot-head-p assoc--copy key)) nil)
+         ((cdr (car assoc--copy)))
          (keynil-p nil)
-         ((car (car copy)))
+         ((car (car assoc--copy)))
          (t nil))))