Request for help: top-level-form
Unable to parse email body. Email id is 981
Unable to parse email body. Email id is 981
> From: "Nick Levine" <ndl@ravenbrook.com> > I have a macro that looks something like this: > > (defmacro def-wombat (name) > (let* ((setf-p (consp name)) > (underlying-name (if setf-p (cadr name) name)) > (modified-name (intern (format nil "FROB-~a" > underlying-name)))) > `(progn > ... > ,(if setf-p > `(defun (setf ,modified-name) (new-value) > ...) > `(defun ,modified-name nil > ...))))) > > I want meta-dot on name to work, so I tried replacing the progn with > (top-level-form ,name ...) > > I then edit foo.lisp, which contains a (def-wombat wibble), click on > the wibble and go meta-dot. I get > Cannot find (DEFUN WIBBLE) in foo.lisp > > What am I doing wrong? You need to mention DEF-WOMBAT within the LW:TOP-LEVEL-FORM. Try this: `(lw:top-level-form (def-wombat ,name) ...)