]> code.delx.au - gnu-emacs/blobdiff - lisp/obsolete/assoc.el
Update copyright year to 2015
[gnu-emacs] / lisp / obsolete / assoc.el
index 5d213d193b3013c0e3a9aed6393697b7fb6235d7..cbf4c819c5e86b72e96a69da7840dd30d1f3dcfb 100644 (file)
@@ -1,6 +1,6 @@
 ;;; 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
@@ -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))))