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

broken magic



(defun foo (x)
  (print (list 'foo-expr x))
  (car x))
FOO 

(defmacro foo (x)
  (print (list 'foo-macro x))
  `(car ,x))
FOO 

(foo '(a . b))
(FOO-MACRO (QUOTE (A . B))) 
A 

(funcall 'foo '(a . b))
(FOO-EXPR (A . B))		;Excellent! Just what I wanted!
A 

(apply 'foo '((a . b)))
;IMPROPER USE OF MACRO - EVAL	;OOPS!

;BKPT *RSET-TRAP


I find that APPLY is the the ONLY function that won't cooperate with
me here.  FUNCALL, LEXPR-FUNCALL, all the MAPping functions and the
uuolinker all know to ignore a MACRO property if they can find
something better.  Could someone twist APPLY's arm a little and get
him to agree?  thanx.