Index: slime.el
===================================================================
RCS file: /project/slime/cvsroot/slime/slime.el,v
retrieving revision 1.896
diff -u -r1.896 slime.el
--- slime.el	27 Jan 2008 15:34:27 -0000	1.896
+++ slime.el	2 Feb 2008 20:12:33 -0000
@@ -565,7 +574,7 @@
     (" " slime-space :inferior t)
     ("\C-f" slime-describe-function :prefixed t :inferior t :sldb t)
     ("\M-d" slime-disassemble-symbol :prefixed t :inferior t :sldb t)
-    ("\C-t" slime-toggle-trace-fdefinition :prefixed t :sldb t)
+    ("\C-t" slime-trace-fdefinition :prefixed t :sldb t)
     ("\C-u" slime-undefine-function :prefixed t)
     ("\C-m" slime-macroexpand-1 :prefixed t :inferior t)
     ("\M-m" slime-macroexpand-all :prefixed t :inferior t)
@@ -5580,14 +5588,15 @@
   (interactive)
   (slime-eval `(swank:untrace-all)))
 
-(defun slime-toggle-trace-fdefinition (&optional using-context-p)
+(defun slime-trace-fdefinition (&optional disable-trace)
   "Toggle trace."
   (interactive "P")
-  (let* ((spec (if using-context-p
-                  (slime-extract-context)
-                 (slime-symbol-name-at-point)))
-         (spec (slime-trace-query spec)))
-    (message "%s" (slime-eval `(swank:swank-toggle-trace ,spec)))))
+  (message "%s" (slime-eval
+                 `(swank:swank-toggle-trace
+                   ,(slime-trace-query (slime-extract-context))
+                   ,(if (eql nil disable-trace)
+                        't
+                        'nil)))))
 
 (defun slime-trace-query (spec)
   "Ask the user which function to trace; SPEC is the default.
@@ -7969,7 +7986,7 @@
        [ "Macroexpand Once..."     slime-macroexpand-1 ,C ]
        [ "Macroexpand All..."      slime-macroexpand-all ,C ]
        [ "Create Trace Buffer"     slime-redirect-trace-output ,C ]
-       [ "Toggle Trace..."         slime-toggle-trace-fdefinition ,C ]
+       [ "Toggle Trace..."         slime-trace-fdefinition ,C ]
        [ "Untrace All"             slime-untrace-all ,C]
        [ "Disassemble..."          slime-disassemble-symbol ,C ]
        [ "Inspect..."              slime-inspect ,C ])
Index: swank-backend.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank-backend.lisp,v
retrieving revision 1.126
diff -u -r1.126 swank-backend.lisp
--- swank-backend.lisp	10 Sep 2007 15:39:05 -0000	1.126
+++ swank-backend.lisp	2 Feb 2008 20:12:34 -0000
@@ -1004,7 +991,7 @@
 (definterface receive ()
   "Return the next message from current thread's mailbox.")
 
-(definterface toggle-trace (spec)
+(definterface toggle-trace (spec enable)
   "Toggle tracing of the function(s) given with SPEC.
 SPEC can be:
  (setf NAME)                            ; a setf function
Index: swank-openmcl.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank-openmcl.lisp,v
retrieving revision 1.120
diff -u -r1.120 swank-openmcl.lisp
--- swank-openmcl.lisp	22 Oct 2007 08:19:58 -0000	1.120
+++ swank-openmcl.lisp	2 Feb 2008 20:12:37 -0000
@@ -741,21 +755,21 @@
     (:class
      (describe (find-class symbol)))))
 
-(defimplementation toggle-trace (spec)
+(defimplementation toggle-trace (spec enable)
   "We currently ignore just about everything."
-  (ecase (car spec)
-    (setf
-     (ccl::%trace spec))
-    (:defmethod
-     (ccl::%trace (second spec)))
-    (:defgeneric
-     (ccl::%trace (second spec)))
-    (:call
-     (toggle-trace (third spec)))
-    ;; mb: FIXME: shouldn't we warn that we're not doing anything for
-    ;; these two?
-    (:labels nil)
-    (:flet nil))
+  (flet ((%trace (spec)
+           (if enable
+               (ccl::%trace spec)
+               (ccl::%untrace spec))))
+    (ecase (car spec)
+      (setf (%trace spec))
+      (:defmethod (%trace (second spec)))
+      (:defgeneric (%trace (second spec)))
+      (:call (toggle-trace (third spec) enable))
+      ;; mb: FIXME: shouldn't we warn that we're not doing anything for
+      ;; these two?
+      (:labels nil)
+      (:flet nil)))
   t)
 
 ;;; XREF
Index: swank-openmcl.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank-openmcl.lisp,v
retrieving revision 1.120
diff -u -r1.120 swank-openmcl.lisp
--- swank-openmcl.lisp	22 Oct 2007 08:19:58 -0000	1.120
+++ swank-openmcl.lisp	2 Feb 2008 20:12:37 -0000
@@ -784,19 +798,13 @@
 
 ;;;; Inspection
 
-(defclass openmcl-inspector (backend-inspector) ())
-
-(defimplementation make-default-inspector ()
-  (make-instance 'openmcl-inspector))
-
 (defimplementation describe-primitive-type (thing)
   (let ((typecode (ccl::typecode thing)))
     (if (gethash typecode *value2tag*)
 	(string (gethash typecode *value2tag*))
 	(string (nth typecode '(tag-fixnum tag-list tag-misc tag-imm))))))
 
-(defmethod inspect-for-emacs ((o t) (inspector backend-inspector))
-  (declare (ignore inspector))
+(defmethod inspect-for-emacs ((o t))
   (let* ((i (inspector::make-inspector o))
 	 (count (inspector::compute-line-count i))
 	 (lines 
@@ -814,18 +822,18 @@
                 (pprint o s)))
             lines)))
 
-(defmethod inspect-for-emacs :around ((o t) (inspector backend-inspector))
+(defmethod inspect-for-emacs :around ((o t))
   (if (or (uvector-inspector-p o)
           (not (ccl:uvectorp o)))
       (call-next-method)
       (multiple-value-bind (title content)
           (call-next-method)
         (values
-         title
-         (append content
-                 `((:newline)
-                   (:value ,(make-instance 'uvector-inspector :object o)
-                           "Underlying UVECTOR")))))))
+          title
+          (append content
+                  `((:newline)
+                    (:value ,(make-instance 'uvector-inspector :object o)
+                            "Underlying UVECTOR")))))))
 
 (defclass uvector-inspector ()
   ((object :initarg :object)))
@@ -834,8 +842,7 @@
   (:method ((object t)) nil)
   (:method ((object uvector-inspector)) t))
 
-(defmethod inspect-for-emacs ((uv uvector-inspector) 
-                              (inspector backend-inspector))
+(defmethod inspect-for-emacs ((uv uvector-inspector))
   (with-slots (object)
       uv
     (values (format nil "The UVECTOR for ~S." object)
@@ -855,8 +862,7 @@
 		(cellp (ccl::closed-over-value-p value)))
 	   (list label (if cellp (ccl::closed-over-value value) value))))))
 
-(defmethod inspect-for-emacs ((c ccl::compiled-lexical-closure) (inspector t))
-  (declare (ignore inspector))
+(defmethod inspect-for-emacs ((c ccl::compiled-lexical-closure))
   (values
    (format nil "A closure: ~a" c)
    `(,@(if (arglist c)
Index: swank-sbcl.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank-sbcl.lisp,v
retrieving revision 1.187
diff -u -r1.187 swank-sbcl.lisp
--- swank-sbcl.lisp	17 Jan 2008 05:53:44 -0000	1.187
+++ swank-sbcl.lisp	2 Feb 2008 20:12:38 -0000
@@ -1278,13 +1271,13 @@
 ;; (trace (method <name> <qualifier>? (<specializer>+)))
 ;; <name> can be a normal name or a (setf name)
 
-(defun toggle-trace-aux (fspec &rest args)
-  (cond ((member fspec (eval '(trace)) :test #'equal)
-         (eval `(untrace ,fspec))
-         (format nil "~S is now untraced." fspec))
-        (t
+(defun toggle-trace-aux (fspec &rest args &key enable)
+  (cond (enable
          (eval `(trace ,@(if args `(:encapsulate nil) (list)) ,fspec ,@args))
-         (format nil "~S is now traced." fspec))))
+         (format nil "~S is now traced." fspec))
+        (t
+         (eval `(untrace ,fspec))
+         (format nil "~S is now untraced." fspec))))
 
 (defun process-fspec (fspec)
   (cond ((consp fspec)
@@ -1296,17 +1289,17 @@
         (t
          fspec)))
 
-(defimplementation toggle-trace (spec)
+(defimplementation toggle-trace (spec enable)
   (ecase (car spec)
     ((setf)
-     (toggle-trace-aux spec))
+     (toggle-trace-aux spec enable))
     ((:defmethod)
-     (toggle-trace-aux `(sb-pcl::fast-method ,@(rest (process-fspec spec)))))
+     (toggle-trace-aux `(sb-pcl::fast-method ,@(rest (process-fspec spec))) :enable enable))
     ((:defgeneric)
-     (toggle-trace-aux (second spec) :methods t))
+     (toggle-trace-aux (second spec) :methods t :enable enabel))
     ((:call)
      (destructuring-bind (caller callee) (cdr spec)
-       (toggle-trace-aux callee :wherein (list (process-fspec caller)))))))
+       (toggle-trace-aux callee :wherein (list (process-fspec caller)) :enable enable)))))
 
 ;;; Weak datastructures
 
Index: swank.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank.lisp,v
retrieving revision 1.523
diff -u -r1.523 swank.lisp
--- swank.lisp	20 Dec 2007 10:33:37 -0000	1.523
+++ swank.lisp	2 Feb 2008 20:12:41 -0000
@@ -2605,16 +2608,16 @@
 (defun tracedp (fspec)
   (member fspec (eval '(trace))))
 
-(defslimefun swank-toggle-trace (spec-string)
+(defslimefun swank-toggle-trace (spec-string &optional (enable t))
   (let ((spec (from-string spec-string)))
     (cond ((consp spec) ; handle complicated cases in the backend
-           (toggle-trace spec))
-          ((tracedp spec)
-	   (eval `(untrace ,spec))
-	   (format nil "~S is now untraced." spec))
-	  (t
+           (toggle-trace spec enable))
+          (enable
            (eval `(trace ,spec))
-	   (format nil "~S is now traced." spec)))))
+	   (format nil "~S is now traced." spec))
+	  (t
+           (eval `(untrace ,spec))
+	   (format nil "~S is now untraced." spec)))))
 
 (defslimefun untrace-all ()
   (untrace))
