[slime-cvs] CVS slime

CVS User trittweiler trittweiler at common-lisp.net
Sun Feb 7 11:44:41 UTC 2010


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

Modified Files:
	ChangeLog swank.lisp 
Log Message:
	* swank.lisp (xref-doit): Declare eql-specializing parameter
	ignorable, as some implementations complain about them not being
	used.


--- /project/slime/cvsroot/slime/ChangeLog	2010/02/01 14:51:25	1.1977
+++ /project/slime/cvsroot/slime/ChangeLog	2010/02/07 11:44:41	1.1978
@@ -1,3 +1,9 @@
+2010-02-07  Tobias C. Rittweiler <tcr at freebits.de>
+
+	* swank.lisp (xref-doit): Declare eql-specializing parameter
+	ignorable, as some implementations complain about them not being
+	used.
+
 2010-02-01  Mark Harig <idirectscm at aim.com>
 
 	* slime.el: Added missing pieces to make `slime-cycle-connections'
--- /project/slime/cvsroot/slime/swank.lisp	2010/01/30 15:44:50	1.687
+++ /project/slime/cvsroot/slime/swank.lisp	2010/02/07 11:44:41	1.688
@@ -1989,7 +1989,7 @@
            (check-type *buffer-package* package)
            (check-type *buffer-readtable* readtable)
            ;; APPLY would be cleaner than EVAL. 
-           ;;(setq result (apply (car form) (cdr form)))
+           ;; (setq result (apply (car form) (cdr form)))
            (setq result (with-slime-interrupts (eval form)))
            (run-hook *pre-reply-hook*)
            (setq ok t))
@@ -3114,28 +3114,25 @@
     (unless error
       (mapcar #'xref>elisp (find-definitions sexp)))))
 
+;;; Generic function so contribs can extend it.
 (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)
+    (declare (ignore type thing))
     :not-implemented))
 
+(macrolet ((define-xref-action (xref-type handler)
+             `(defmethod xref-doit ((type (eql ,xref-type)) thing)
+                (declare (ignorable type))
+                (funcall ,handler thing))))
+  (define-xref-action :calls        #'who-calls)
+  (define-xref-action :calls-who    #'calls-who)
+  (define-xref-action :references   #'who-references)
+  (define-xref-action :binds        #'who-binds)
+  (define-xref-action :macroexpands #'who-macroexpands)
+  (define-xref-action :specializes  #'who-specializes)
+  (define-xref-action :callers      #'list-callers)
+  (define-xref-action :callees      #'list-callees))
+
 (defslimefun xref (type name)
   (multiple-value-bind (sexp error) (ignore-errors (from-string name))
     (unless error





More information about the slime-cvs mailing list