To make oneself familiar with someone else's code, it's often desirable to see what symbols are defined in a package. I've added a special inspector page for that purpose that will pop up if you inspect the package, and then click on the links to the external/internal symbols. The flags are the same as those that are presented in Fuzzy Completion.
Here's an snippet from all present symbols of #<PACKAGE "SWANK">:
All present symbols of package "SWANK" [type: %PACKAGE-SYMBOLS-CONTAINER] -------------------- A symbol is considered present in a package if it's "accessible in that package directly, rather than being inherited from another package." (CLHS glossary entry for `present')
Symbols: Flags: --------------------------------------------------- ------- %CONTAINER ------- %MAKE-FUZZY-MATCHING -f----- %PACKAGE-SYMBOLS-CONTAINER ---c--- %PACKAGE-SYMBOLS-CONTAINER- ------- %PACKAGE-SYMBOLS-CONTAINER-DESCRIPTION -f----- %PACKAGE-SYMBOLS-CONTAINER-P -f----- %PACKAGE-SYMBOLS-CONTAINER-SYMBOLS -f----- %PACKAGE-SYMBOLS-CONTAINER-TITLE -f----- &UNKNOWN-JUNK ------- *ACTIVE-THREADS* b------ *AFTER-INIT-HOOK* b------ ...
Hope you'll find this useful,
-T.
Index: ChangeLog =================================================================== RCS file: /project/slime/cvsroot/slime/ChangeLog,v retrieving revision 1.1105 diff -u -r1.1105 ChangeLog --- ChangeLog 8 Apr 2007 22:56:32 -0000 1.1105 +++ ChangeLog 9 Apr 2007 20:19:32 -0000 @@ -1,3 +1,11 @@ +2007-04-09 Tobias C. Rittweiler tcr@freebits.de + + * swank.lisp (inspect-for-emacs %package-symbols-container): + Revert Marco's change from 2007-04-08; he had the good idea of + adding a facility to jump to the relevant source line of a symbol, + but `M-.' is already bound to SLIME-FIND-DEFINITION in the + inspector, which is a nicer way of doing this alltogether. + 2007-04-09 Marco Baringer mb@bese.it
* swank.lisp (inspector-content-for-emacs): Look for refresh Index: swank.lisp =================================================================== RCS file: /project/slime/cvsroot/slime/swank.lisp,v retrieving revision 1.474 diff -u -r1.474 swank.lisp --- swank.lisp 8 Apr 2007 23:07:53 -0000 1.474 +++ swank.lisp 9 Apr 2007 20:19:37 -0000 @@ -4972,10 +4972,6 @@ (multiple-value-bind (symbol-string classification-string) (string-representations symbol) `((:value ,symbol ,symbol-string) ,classification-string - " " - (:action "[jump to source]" - , (let ((symbol symbol)) - (lambda () (ed-in-emacs symbol)))) (:newline) )))))))))
"Tobias C. Rittweiler" tcr@freebits.de writes:
To make oneself familiar with someone else's code, it's often desirable to see what symbols are defined in a package. I've added a special inspector page for that purpose that will pop up if you inspect the package, and then click on the links to the external/internal symbols. The flags are the same as those that are presented in Fuzzy Completion.
I added a button to that page to group the symbols with respect to their respective classification, e.g. on #<PACKAGE "SWANK">:
BOUNDP ---------------------------------------------------------------- *ACTIVE-THREADS* *AFTER-INIT-HOOK* *AUTO-ABBREVIATE-DOTTED-PACKAGES* *BUFFER-PACKAGE* *BUFFER-READTABLE* ...
CLASS ---------------------------------------------------------------- %PACKAGE-SYMBOLS-CONTAINER CONNECTION FUZZY-MATCHING KEYWORD-ARG OPTIONAL-ARG SWANK-ERROR
FUNCTION ---------------------------------------------------------------- %%MAKE-PACKAGE-SYMBOLS-CONTAINER %CONTAINER.DESCRIPTION %CONTAINER.GROUPING-KIND %CONTAINER.SYMBOLS ...
GENERIC-FUNCTION ---------------------------------------------------------------- ALL-SLOTS-FOR-INSPECTOR COMPUTE-ENRICHED-DECODED-ARGLIST EXTRA-KEYWORDS ...
MACRO ---------------------------------------------------------------- ADD-HOOK DEFINE-SPECIAL DEFINE-STEPPER-FUNCTION DEFSLIMEFUN ...
...
Happy Browsing,
-T.
2007-04-17 Tobias C. Rittweiler <INSERT-EMAIL-HERE>
* swank.lisp: Instead of just having all the symbols of a package listed alphabetically in the inspector page recently introduced for that purpose, add a button to that page to group them by their classification.
(%package-symbols-container): New slot GROUPING-KIND. (%make-package-symbols-container): New function, wraps around %%MAKE-PACKAGE-SYMBOLS-CONTAINER, which will actually create the structure. We need this, to make GROUPING-DEFAULT an entirely internal affair.
(make-symbols-listing): New generic function to dispatch on GROUPING-KIND. (make-symbols-listing :symbol): Just the stuff that was priorly wired into INSPECT-FOR-EMACS (%PACKAGE-SYMBOLS-CONTAINER). (make-symbols-listing :classification): New; returns the passed symbols grouped by their classification. (inspect-for-emacs %package-symbols-container): Most code split off into MAKE-SYMBOLS-LISTING.