[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
USERATOMS-HOOKS
- To: (BUG LISP) at MIT-MC
- Subject: USERATOMS-HOOKS
- From: EB at MIT-MC (Edward Barton)
- Date: Fri, 23 Nov 79 20:03:00 GMT
- Original-date: 23 NOV 1979 1503-EST
Consider the following file as compiled on MC with XC:
(eval-when (compile)
(defun :-hook (x)
(let ((temp))
(cond ((not (atom x)) nil)
((eq (car (setq temp (explode x))) ':)
(ncons `(quote ,(implode (append '(o b $)
(cdr temp))))))
(t nil))))
(push ':-hook useratoms-hooks))
(defun foo (x) 1)
(defun foo1 (x) :z)
(setq ob$z 'win)
(defun :foo (x) 2)
It seems to me that the FASL file should achieve the same effect, in
this case, as
(defun foo (x) 1) ; no problem here, of course
(defun foo1 (x) ob$z)
(defun ob$foo (x) 2)
In fact what happens is that I get "OB$Z unbound variable" on
loading the FASL file. (If I were to put an additional QUOTE
in the NCONS or if I were to set OB$Z to something, I would get
file not in fasload format at load time.)
If I omit the FOO1 defun, I get "OB$FOO unbound variable" on
loading. In that case, if I set OB$FOO to, say, WRONG, the effect
is as if I had said (defun wrong (x) 2) instead of the
:foo defun.
Is all this really the way it's supposed to work?