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

macro documentation



In System 78.22, ZMail 38.4, microcode 841, 60Hz, on Lisp Machine One:

Currently, (FUNCTION-DOCUMENTATION 'FOO) is generally useless if FOO is a 
macro, because DEFMACRO does not check for a documentation string.
How about having:

(DEFMACRO FOO (ARG1 ARG2)
  "Some documentation..."
  ...macro-body...)

turn into:

(COMPILER-LET ...
  (MACRO FOO (SI:*MACROARG*)
	 "Some documentation..."	; Put here and FUNCTION-DOCUMENTATION will find it.
	 (AND (OR (< (LENGTH SI:*MACROARG*) 3.)...) ...)
	 ((LAMBDA (ARG1)
	    ((LAMBDA (ARG2)
	       (PROGN
		 ;; This is where "Some documentation..." is now.
		 ...macro-body...))
	     ...)) ...)))