LispWorks User Guide and Reference Manual > 7 Dspecs: Tools for Handling Definitions > 7.9 Users of location information

NextPrevUpTopContentsIndex

7.9.1 Finding definitions in the LispWorks editor

Returning to our example definer

 (defmacro parameterdef  (value name)
  `(defparameter ,name ,value))
  1. Load a file foo.lisp containing
  2. (parameterdef 42 *foo*)

  3. Now use Expression > Find Source on the symbol *foo* . Notice that LispWorks knows which file the definition is in, but cannot find the defining top level form.
  4. Also notice that the Definitions tab of the Editor tool does not display the definition of *foo* . This is because the Editor does not recognise parameterdef as a definer. When the LispWorks editor looks at the definitions in a buffer, it needs to know the dspecs that each defining form will generate when evaluated. You can tell the editor how to parse a defining form to generate the dspec by using define-form-parser.
  5. Now evaluate these forms to associate a parser with parameterdef and inform the dspec system that parameterdef is another way of naming a defparameter dspec:
  6. (dspec:define-form-parser parameterdef (value name)
      `(parameterdef ,name))
     
    (dspec:define-dspec-alias parameterdef (name)
      `(defparameter ,name))
  7. Now use Expression > Find Source on the symbol *foo* again. Notice that the source of the definition of *foo* is displayed correctly in the text tab of the Editor tool, and that the Definitions tab displays the definition as
(parameterdef *foo*)
LispWorks User Guide and Reference Manual - 22 Dec 2009

NextPrevUpTopContentsIndex