sb-introspect:find-definition-sources-by-name gives only top-level form locations

Bug #1473147 reported by Jinwoo Lee on 2015-07-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Definitions can exist not only in top-level forms but also in non-top-level ones, such as:

  (defvar *foo* ...)
  (defun bar (...) ...)

When using sb-introspect:find-definition-sources-by-name to find the definitions of *FOO* or BAR, it gives the location of the enclosing top-level form, i.e. EVAL-WHEN, not the one of DEFVAR or DEFUN. This happens all forms that can contain definitions, such as PROGN, LOCALLY, LET, SYMBOL-MACRO, etc.

This affects Slime too. When using "M-x slime-edit-definition" (M-.) in Slime for those definitions, it also goes to the enclosing top-level forms.

This happens for version 1.2.9 but I believe this happens at HEAD too.

Stas Boukarev (stassats) wrote :

Got fixed in f91fd41798ae389c3d304b9180ea9ef409ba0033

Changed in sbcl:
status: New → Fix Committed
Jinwoo Lee (jinwoo68) wrote :

Awesome. Thanks for the quick fix, Stas!

Stas Boukarev (stassats) wrote :

Quick? It's been known to be broken for years.

Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers