All Manuals > LispWorks User Guide and Reference Manual > 7 Dspecs: Tools for Handling Definitions > 7.3 Dspec namespaces

NextPrevUpTopContentsIndex

7.3.2 Dspec aliases

You can add new ways of making existing definitions and use the dspec system to track these definitions. This is what happens when your defining form expands into a system-provided form. The macro define-dspec-alias is used to inform the dspec system of this.

For example if your definer is:

(defmacro my-defun ((name &rest args) &body body)
   `(defun ,name ,args ,@body))

then you would define the form of dspecs for my-defun definitions like this:

(dspec:define-dspec-alias my-defun (name)
  `(defun ,name))

Note: in general you should not include the lambda list in the dspec, because it is not needed to locate the definition later.

Note: to make source location work you will also need a define-form-parser definition for my-defun. This is illustrated in Using pre-defined form parsers.


LispWorks User Guide and Reference Manual - 21 Dec 2011

NextPrevUpTopContentsIndex