Lennart Borgman (gmail) wrote: > Lennart Borgman (gmail) wrote: >> Johan Bockgård wrote: >>> "Lennart Borgman (gmail)" writes: >>> >>>> Johan Bockgård wrote: >>>>> "Lennart Borgman (gmail)" writes: >>>>> >>>>>> If there for example is something like this >>>>>> >>>>>> (defstruct ert-stats >>>>>> (selector (assert nil))) >>>>>> >>>>>> then a defstruct selector function `ert-stats-selector' is >>>>>> defined. It >>>>>> would be nice to go to that function directly from the link in >>>>>> describe-function', but currently the position in the file is not >>>>>> found. >>>>> Indeed, defstruct should put a `definition-name' property on the names >>>>> it constructs. Like >>>>> >>>>> (put 'ert-stats-selector 'definition-name 'ert-stats) >>>> Yes, something like that. Is 'definition-name special in some way or >>>> could/should it be something else? >>> >>> Try C-h f again after adding the property above. >> >> Hey, that is the black box game again ... ;-) >> >> Yes, you are right, but I do not understand how it works. I guess C-h >> f searches the buffer for the "definition-name". >> >> So this looks like more or less a bug. >> >> I tried to look at defstruct to see where to add 'definition-name. >> There seems to be 4 uses of `defun' and `defsubst*'. Should not all >> this 4 be adding 'definition-name? > > > Here is a patch for that. Should be wrapped a bit, but it is easier > seeing what I have done if it is like this. Should the (put ... > 'definition-name ...) be before or after the defmacro* and defun in the > code? Sorry, attached the patch.