[slime-cvs] CVS slime/contrib

CVS User trittweiler trittweiler at common-lisp.net
Sat Jan 10 10:09:47 UTC 2009


Update of /project/slime/cvsroot/slime/contrib
In directory cl-net:/tmp/cvs-serv16704/contrib

Modified Files:
	swank-fancy-inspector.lisp ChangeLog 
Log Message:
	* swank-fancy-inspector.lisp (emacs-inspect [package]): Also
	display link to show all inherited symbols of a package.


--- /project/slime/cvsroot/slime/contrib/swank-fancy-inspector.lisp	2008/04/17 15:21:51	1.15
+++ /project/slime/cvsroot/slime/contrib/swank-fancy-inspector.lisp	2009/01/10 10:09:47	1.16
@@ -438,7 +438,7 @@
 
 (defmethod emacs-inspect ((%container %package-symbols-container))
   (with-struct (%container. title description symbols grouping-kind) %container
-            `(,title (:newline) 
+            `(,title (:newline) (:newline)
 	      , at description
               (:newline)
               "  " ,(ecase grouping-kind
@@ -459,18 +459,23 @@
         (package-use-list     (package-use-list package))
         (package-used-by-list (package-used-by-list package))
         (shadowed-symbols     (package-shadowing-symbols package))
-        (present-symbols      '()) (present-symbols-length  0)
-        (internal-symbols     '()) (internal-symbols-length 0)
-        (external-symbols     '()) (external-symbols-length 0))
+        (present-symbols      '()) (present-symbols-length   0)
+        (internal-symbols     '()) (internal-symbols-length  0)
+        (inherited-symbols    '()) (inherited-symbols-length 0)
+        (external-symbols     '()) (external-symbols-length  0))
 
     (do-symbols* (sym package)
       (let ((status (symbol-status sym package)))
-        (when (not (eq status :inherited))
-          (push sym present-symbols) (incf present-symbols-length)
-          (if (eq status :internal)
-              (progn (push sym internal-symbols) (incf internal-symbols-length))                
-              (progn (push sym external-symbols) (incf external-symbols-length))))))
-    
+        (when (eq status :inherited)
+          (push sym inherited-symbols) (incf inherited-symbols-length)
+          (go :continue))
+        (push sym present-symbols) (incf present-symbols-length)
+        (cond ((eq status :internal)
+               (push sym internal-symbols) (incf internal-symbols-length))
+              (t
+               (push sym external-symbols) (incf external-symbols-length))))
+      :continue)
+
     (setf package-nicknames    (sort (copy-list package-nicknames)    #'string<)
           package-use-list     (sort (copy-list package-use-list)     #'string< :key #'package-name)
           package-used-by-list (sort (copy-list package-used-by-list) #'string< :key #'package-name)
@@ -478,7 +483,8 @@
     
     (setf present-symbols      (sort present-symbols  #'string<)  ; SORT + STRING-LESSP
           internal-symbols     (sort internal-symbols #'string<)  ; conses on at least
-          external-symbols     (sort external-symbols #'string<)) ; SBCL 0.9.18.
+          external-symbols     (sort external-symbols #'string<)  ; SBCL 0.9.18.
+          inherited-symbols    (sort inherited-symbols #'string<))
 
     
      `(""                               ; dummy to preserve indentation.
@@ -540,6 +546,12 @@
                              "entry of `internal' because it's assumed to be more"    (:newline)
                              "useful this way."                                       (:newline)))
             (:newline)
+            ,(display-link "inherited" inherited-symbols  inherited-symbols-length
+                          :title (format nil "All inherited symbols of package \"~A\"" package-name)
+                          :description
+                          '("A symbol is considered inherited in a package if it" (:newline)
+                            "was made accessible via USE-PACKAGE."                (:newline)))
+            (:newline)
             ,(display-link "shadowed" shadowed-symbols (length shadowed-symbols)
                            :title (format nil "All shadowed symbols of package \"~A\"" package-name)
                            :description nil))))))
--- /project/slime/cvsroot/slime/contrib/ChangeLog	2009/01/07 09:21:44	1.164
+++ /project/slime/cvsroot/slime/contrib/ChangeLog	2009/01/10 10:09:47	1.165
@@ -1,3 +1,8 @@
+2009-01-10  Tobias C. Rittweiler  <tcr at freebits.de>
+
+	* swank-fancy-inspector.lisp (emacs-inspect [package]): Also
+	display link to show all inherited symbols of a package.
+
 2009-01-07  Helmut Eller  <heller at common-lisp.net>
 
 	* slime-repl.el (slime-mode-map): Bind C-c~ not ~.





More information about the slime-cvs mailing list