RE: delivery level 2 discards functions that are used only inside eval
Your suggestion didn't work. The package IS kept, just not the symbols as I explained before. Only enumerating them explicitly using :keep-symbols works. > RTM: look at section 5.1.3.3 "Symbols, functions, and packages" in the > delivery documentation. If you want to keep all the symbols in a named > package, then you should consider the :packages-to-keep keyword. > > - nick > > I have a function > > (defun foo (x) > ...) > > which is not used anywhere in the code. > Suppose that in runtime the program reads the expression > (foo 3) from a text > file into a variable z (or even (setf z (read-from-string > "(foo 3)"))), and > there is a call to > > (eval z) > > In delivery level 2 I get an error: undefined function FOO. > One way around it that I found is: > > (defun bar () > (list #'foo)) > > and to call (bar) from another function (I'm sure there > are similar ways). > > But is there a more elegant way? All the functions that I > want to use in the > text file are from the same package - perhaps this can help? > > Thanks, > Iddo > >