[slime-cvs] CVS slime

CVS User trittweiler trittweiler at common-lisp.net
Thu Dec 17 10:30:32 UTC 2009


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

Modified Files:
	swank.lisp slime.el ChangeLog 
Log Message:
	* slime.el (slime-edit-uses-xrefs): New variable. For contribs to
	extend.
	(slime-edit-uses): Use it.

	* swank.lisp (xref-doit): Now a generic functions. For contribs to
	extend.

	* swank-asdf.lisp (who-depends-on): Make defslimefun.
	(xref-doit [:depends-on]): New method to make :depends-on valid
	xref request.

	* slime-asdf.el (slime-who-depends-on-rpc): New.
	(slime-who-depends-on): New interactive function.
	(slime-asdf-init): Make `slime-edit-uses' perform a :depends-on
	request, and bind `C-c C-w d' to `slime-who-depends-on'.


--- /project/slime/cvsroot/slime/swank.lisp	2009/12/17 10:15:19	1.679
+++ /project/slime/cvsroot/slime/swank.lisp	2009/12/17 10:30:32	1.680
@@ -3291,17 +3291,27 @@
     (unless error
       (mapcar #'xref>elisp (find-definitions sexp)))))
 
-(defun xref-doit (type symbol)
-  (ecase type
-    (:calls (who-calls symbol))
-    (:calls-who (calls-who symbol))
-    (:references (who-references symbol))
-    (:binds (who-binds symbol))
-    (:sets (who-sets symbol))
-    (:macroexpands (who-macroexpands symbol))
-    (:specializes (who-specializes symbol))
-    (:callers (list-callers symbol))
-    (:callees (list-callees symbol))))
+(defgeneric xref-doit (type thing)
+  (:method ((type (eql :calls)) thing)
+    (who-calls thing))
+  (:method ((type (eql :calls-who)) thing)
+    (calls-who thing))
+  (:method ((type (eql :references)) thing)
+    (who-references thing))
+  (:method ((type (eql :binds)) thing)
+    (who-binds thing))
+  (:method ((type (eql :sets)) thing)
+    (who-sets thing))
+  (:method ((type (eql :macroexpands)) thing)
+    (who-macroexpands thing))
+  (:method ((type (eql :specializes)) thing)
+    (who-specializes thing))
+  (:method ((type (eql :callers)) thing)
+    (list-callers thing))
+  (:method ((type (eql :callees)) thing)
+    (list-callees thing))
+  (:method (type thing)
+    :not-implemented))
 
 (defslimefun xref (type name)
   (multiple-value-bind (sexp error) (ignore-errors (from-string name))
--- /project/slime/cvsroot/slime/slime.el	2009/12/10 23:15:42	1.1256
+++ /project/slime/cvsroot/slime/slime.el	2009/12/17 10:30:32	1.1257
@@ -2604,6 +2604,7 @@
   (interactive)
   (slime-compile-file t))
 
+;;; FIXME: This should become a DEFCUSTOM
 (defvar slime-compile-file-options '()
   "Plist of additional options that C-c C-k should pass to Lisp.
 Currently only :fasl-directory is supported.")
@@ -3871,17 +3872,18 @@
            (slime-show-xrefs file-alist 'definition name
                              (slime-current-package))))))
 
+(defvar slime-edit-uses-xrefs 
+  '(:calls :macroexpands :binds :references :sets :specializes))
+
 ;;; FIXME. TODO: Would be nice to group the symbols (in each
 ;;;              type-group) by their home-package.
 (defun slime-edit-uses (symbol)
   "Lookup all the uses of SYMBOL."
   (interactive (list (slime-read-symbol-name "Edit Uses of: ")))
-  (slime-xrefs '(:calls :macroexpands
-                 :binds :references :sets
-                 :specializes) 
+  (slime-xrefs slime-edit-uses-xrefs
                symbol
                #'(lambda (xrefs type symbol package snapshot)
-                   (cond 
+                   (cond
                      ((null xrefs)
                       (message "No xref information found for %s." symbol))
                      ((and (slime-length= xrefs 1)          ; one group
@@ -3891,7 +3893,7 @@
                         (slime-pop-to-location loc)))
                      (t
                       (slime-push-definition-stack)
-                      (slime-show-xref-buffer xrefs type symbol 
+                      (slime-show-xref-buffer xrefs type symbol
                                               package snapshot))))))
 
 (defun slime-analyze-xrefs (xrefs)
@@ -5022,7 +5024,7 @@
                              :complained)))))))
 
 (defun slime-aggregate-compilation-results (results)
-  `(:complilation-result
+  `(:compilation-result
     ,(reduce #'append (mapcar #'slime-compilation-result.notes results))
     ,(every #'slime-compilation-result.successp results)
     ,(reduce #'+ (mapcar #'slime-compilation-result.duration results))))
--- /project/slime/cvsroot/slime/ChangeLog	2009/12/17 10:15:19	1.1943
+++ /project/slime/cvsroot/slime/ChangeLog	2009/12/17 10:30:32	1.1944
@@ -1,7 +1,16 @@
 2009-12-17  Tobias C. Rittweiler <tcr at freebits.de>
 
+	* slime.el (slime-edit-uses-xrefs): New variable. For contribs to
+	extend.
+	(slime-edit-uses): Use it.
+
+	* swank.lisp (xref-doit): Now a generic functions. For contribs to
+	extend.
+
+2009-12-17  Tobias C. Rittweiler <tcr at freebits.de>
+
 	* swank.lisp (with-top-level-restart): Bind local special.
-	(top-level-restart-p): Check for it; this tells us if where's in
+	(top-level-restart-p): Check for it; this tells us if we're in
 	the dynamic extent of with-top-level-restart.
 	(handle-requests): Use it.
 





More information about the slime-cvs mailing list