Path: utzoo!attcan!uunet!cs.utexas.edu!know!sdd.hp.com!ucsd!rutgers!cmcl2!phri!marob!cowan From: cowan@marob.masa.com (John Cowan) Newsgroups: comp.lang.lisp Subject: INTERN in Common Lisp and "old" Lisp Message-ID: <2725F2EA.6996@marob.masa.com> Date: 24 Oct 90 20:00:41 GMT Organization: The Logical Language Group, Inc. Lines: 23 How does one do in Common Lisp what INTERN used to do? The INTERN function of Common Lisp accepts a string and a package (the current package by default) and generates a symbol with the specified printname which is accessible from the specified package. This is a good and worthy thing to do. However, it is not the "traditional" INTERN, which took an "uninterned" (i.e. package-less) symbol, such as GENSYM generates, and made it "interned in a package". In CLtL1 (I don't have CLtL:2) there is a note that "In MacLisp, INTERN accepted a symbol as well as a string, extracting the print name of the symbol, but this leads to difficulties about what to do if there is another symbol with the same print name." However, there may be occasions when I want to generate a symbol with GENSYM or MAKE-SYMBOL or what have you, so that the package slot = NIL, and then set the package slot to the value of some package. There does not seem to be any way to do this. Since we can change a symbol 's package slot >to< NIL using UNINTERN, there should be some way to undo this (UNUNINTERN? SET-PACKAGE? (SETF (PACKAGE #:FOO) "LISP")?) -- cowan@marob.masa.com (aka ...!hombre!marob!cowan) e'osai ko sarji la lojban