Hi,
On Mar 16, 2006, at 12:18 PM, Marco Baringer wrote:
- Make find-definitions a little more flexible with an around
method: if the symbol isn't in the current package, the around method goes on to look in all the packages too. (I haven't added similar logic to symbol completion but will someday).
won't this make (find-definitions foo:test) returns definitions for bar:test as well? do we really want this?
I may not have have been clear enough. Let me see if I do better with an example. Suppose i have two packages foo and bar and a function named test in each of them. Here are some scenarios:
* I am in package foo and search for test: the regular find- definitions finds the definition and I jump to foo::test directly. * I am in package bar and search for test. Again, I jump directly to bar::test. * I am in package xxx and search for test. This time, find- definitions finds nothing so it goes to the around method and finds two definitions and gives me the choices of foo::test and bar::test. * I am in package xxx and search for foo::test. Find-definitions finds the single definition, the around method is not used and i jump to foo::test. * I am in package bar and search for foo::test. results are as in package xxx. * I am in package xxx and search for foo:test (single #:). Neither the regular find-definitions nor the around method finds anything and i get the "no known definitions" message.
since the around method only fires if the regular finds nothing, it only changes behavior when the current symbol doesn't have a package prefix and isn't in the current package...
HTH,