[slime-cvs] CVS slime/contrib

heller heller at common-lisp.net
Sat Mar 8 08:42:23 UTC 2008


Update of /project/slime/cvsroot/slime/contrib
In directory clnet:/tmp/cvs-serv17669/contrib

Modified Files:
	ChangeLog swank-fancy-inspector.lisp 
Log Message:
Don't blindly override the inspect method for functions.

* swank-fancy-inspector.lisp (emacs-inspect function): Define this
method only if the backend hasn't defined one.
(inspect-function): New function.

--- /project/slime/cvsroot/slime/contrib/ChangeLog	2008/03/02 22:41:45	1.96
+++ /project/slime/cvsroot/slime/contrib/ChangeLog	2008/03/08 08:42:23	1.97
@@ -1,3 +1,11 @@
+2008-03-08  Helmut Eller  <heller at common-lisp.net>
+
+	Don't blindly override the inspect method for functions.
+
+	* swank-fancy-inspector.lisp (emacs-inspect function): Define this
+	method only if the backend hasn't defined one.
+	(inspect-function): New function.
+
 2008-03-02  Tobias C. Rittweiler  <tcr at freebits.de>
 
 	M-. now works on presentations. 
--- /project/slime/cvsroot/slime/contrib/swank-fancy-inspector.lisp	2008/02/10 08:31:21	1.11
+++ /project/slime/cvsroot/slime/contrib/swank-fancy-inspector.lisp	2008/03/08 08:42:23	1.12
@@ -87,15 +87,19 @@
 	  (t 
 	   (list label ": " '(:newline) "  " docstring '(:newline))))))
 
-(defmethod emacs-inspect ((f function))
-  (append 
-	   (label-value-line "Name" (function-name f))
-	   `("Its argument list is: " 
-	     ,(inspector-princ (arglist f)) (:newline))
-	   (docstring-ispec "Documentation" f t)
-	   (if (function-lambda-expression f)
-	       (label-value-line "Lambda Expression"
-				 (function-lambda-expression f)))))
+(unless (find-method #'emacs-inspect '() (list (find-class 'function)) nil)
+  (defmethod emacs-inspect ((f function))
+    (inspect-function f)))
+
+(defun inspect-function (f)
+  (append
+   (label-value-line "Name" (function-name f))
+   `("Its argument list is: " 
+     ,(inspector-princ (arglist f)) (:newline))
+   (docstring-ispec "Documentation" f t)
+   (if (function-lambda-expression f)
+       (label-value-line "Lambda Expression"
+			 (function-lambda-expression f)))))
 
 (defun method-specializers-for-inspect (method)
   "Return a \"pretty\" list of the method's specializers. Normal




More information about the slime-cvs mailing list