From f5593c7cfd9b970673e06792c64867bdf88970d3 Mon Sep 17 00:00:00 2001
From: ram <ram>
Date: Thu, 29 Nov 1990 14:35:37 +0000
Subject: [PATCH] Fixed environment stuff to use the correct environment
 format.

---
 pcl/walk.lisp | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/pcl/walk.lisp b/pcl/walk.lisp
index 520e4d1f2..c26c164a6 100644
--- a/pcl/walk.lisp
+++ b/pcl/walk.lisp
@@ -810,8 +810,8 @@
 
 ;;; In CMU Common Lisp, the environment (well, the function/macro part of
 ;;; the environment) is represented as a list of entries, with each entry
-;;; being of the form (name type . fn) where type is either macro or
-;;; function.
+;;; being of the form (name . thing), where thing is either
+;;; (macro . <interpreted-function) or a C::FUNCTIONAL structure.
 
 #+:CMU
 (progn
@@ -834,24 +834,25 @@
     (c::make-lexenv
      :functions
      (append (mapcar #'(lambda (f)
-			 (list (car f) 'function))
+			 (cons (car f) (c::make-functional)))
 		     functions)
 	     (mapcar #'(lambda (m)
-			 (list* (car m) 'lisp::macro (cadr m)))
+			 (list* (car m) 'c::macro
+				(coerce (cadr m) 'function)))
 		     macros)))))
 
 (defun environment-function (env fn)
   (when env
-    (let ((entry (assoc fn (c::lexenv-functions env) :test #'eq)))
-      (and entry 
-	   (eq (cadr entry) 'function)
-	   (cddr entry)))))
+    (let ((entry (assoc fn (c::lexenv-functions env) :test #'equal)))
+      (and entry
+	   (c::functional-p (cdr entry))
+	   (cdr entry)))))
 
 (defun environment-macro (env macro)
   (when env
     (let ((entry (assoc macro (c::lexenv-functions env) :test #'eq)))
       (and entry 
-	   (eq (cadr entry) 'lisp::macro)
+	   (eq (cadr entry) 'c::macro)
 	   (cddr entry)))))
 
 ); end of #+:CMU
-- 
GitLab