Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!ncar!gatech!udel!princeton!phoenix!eliot From: eliot@phoenix.Princeton.EDU (Eliot Handelman) Newsgroups: comp.lang.lisp Subject: Re: Question about INTERN Message-ID: <5823@idunno.Princeton.EDU> Date: 31 Jan 91 02:32:10 GMT References: <5783@idunno.Princeton.EDU> <4037@skye.ed.ac.uk> <1991Jan30.225106.26561@Think.COM> Sender: news@idunno.Princeton.EDU Organization: Princeton University, New Jersey Lines: 14 In article <1991Jan30.225106.26561@Think.COM> barmar@think.com (Barry Margolin) writes: ; ; ;(defun get-slot-value (obj slot) ; "Return the value of the specified slot in obj. ;Assumes it is a structure whose accessors use the default naming scheme." ; (when (symbolp obj) ; (setq obj (symbol-value obj))) ; (eval `(,(intern (format nil "~a-~a" (type-of obj) slot)) ; ',obj))) Of course, the real error might be something like interning the accessor in the wrong package.