[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [spr8404] compiling methods

>> (eval-when (load eval compile)
>>   (defvar *my-readtable* (copy-readtable *readtable*))
>>   (defun apply-restart()
>>     (setq debugging::*ti-verbose* nil)
>>     (if (boundp '*my-readtable*)
>>         (setq *readtable* *my-readtable*)))
>>   (excl:dumplisp :name "apply" 
>>                  :restart-function #'apply-restart 
>>                  :checkpoint nil))

Ah, yes; *readtable*!

The basic problem is that the restart function is being executed
before, and therefore outside of the context of, the initial top-level
listener.  The variable *readtable* is one of those "globals" that are
not truly global with respect to multiprocewssing, and so it gets
rebound for each process.

You can work around this in several ways.  Instead of using setq, you
can use tpl:setq-default (described in the user guide, page 2-16).
Or, you can remove *readtable* from the alist described on page 2-18.
Or, if you are using multiprocessing and want the original readtable
for normal CL operation in other processes, you can simply setq the
readtable in the desired process before you do the dumplisp.

Let me know if one of these methods does not solve your problem.

Duane Rettig, Franz Inc.        1995 University Avenue, Suite 275
duane@Franz.COM (internet)      Berkeley, CA  94704
uunet!franz!duane (uucp)        Phone: (510) 548-3600; FAX: (510) 548-8253