Finding definitions created using my own defining macros
I have a macro that is essentially a wrapper for DEFMETHOD,
and I want to be able to use the 'Find Source' and
'Find Source for Dspec' editor commands to find definitions
that I've created with it.
A simpler case, which I have working, is a wrapper for
DEFPARAMETER:
(dspec:define-dspec-alias my-defparameter (name)
`(defparameter ,name))
(defmacro my-defparameter (name value)
`(top-level-form (my-defparameter ,name)
(defparameter ,name ,value)))
If I then compile this:
(my-defparameter fred 100)
and then evaluate
(editor:find-source-for-dspec-command
nil
'(my-defparameter fred))
the definition of FRED is found.
Moving on to the DEFMETHOD wrapper:
This looks to me like it might be the right thing to do:
(dspec:define-dspec-alias my-defmethod (name arg-types)
`(defmethod ,name ,arg-types))
(defmacro my-defmethod (name args &body body)
`(top-level-form (my-defmethod ,name
,(mapcar #'second args))
(defmethod ,name ,args ,@body)))
But with
(my-defmethod foo ((x number)) 32)
and
(editor:find-source-for-dspec-command
nil
'(my-defmethod foo (number)))
I get this: Cannot find (METHOD FOO (NUMBER))
What am I doing wrong?