/[slime]/slime/swank.lisp
ViewVC logotype

Diff of /slime/swank.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.400 by jsnellman, Mon Sep 18 21:56:13 2006 UTC revision 1.401 by mbaringer, Thu Sep 21 16:56:07 2006 UTC
# Line 3874  DSPEC is a string and LOCATION a source Line 3874  DSPEC is a string and LOCATION a source
3874        (ignore-errors (values (from-string name)))        (ignore-errors (values (from-string name)))
3875      (cond (error '())      (cond (error '())
3876            (t (loop for (dspec loc) in (find-definitions sexp)            (t (loop for (dspec loc) in (find-definitions sexp)
3877                     collect (list (to-string dspec) loc))))))                     unless (eql :error (first loc))
3878                         collect (list (to-string dspec) loc))))))
3879    
3880  (defun alistify (list key test)  (defun alistify (list key test)
3881    "Partition the elements of LIST into an alist.  KEY extracts the key    "Partition the elements of LIST into an alist.  KEY extracts the key
# Line 3939  The result is a list of the form ((LOCAT Line 3940  The result is a list of the form ((LOCAT
3940  (defslimefun xref (type symbol-name)  (defslimefun xref (type symbol-name)
3941    (let ((symbol (parse-symbol-or-lose symbol-name *buffer-package*)))    (let ((symbol (parse-symbol-or-lose symbol-name *buffer-package*)))
3942      (group-xrefs      (group-xrefs
3943       (ecase type       (sanitize-xrefs
3944         (:calls (who-calls symbol))        (ecase type
3945         (:calls-who (calls-who symbol))          (:calls (who-calls symbol))
3946         (:references (who-references symbol))          (:calls-who (calls-who symbol))
3947         (:binds (who-binds symbol))          (:references (who-references symbol))
3948         (:sets (who-sets symbol))          (:binds (who-binds symbol))
3949         (:macroexpands (who-macroexpands symbol))          (:sets (who-sets symbol))
3950         (:specializes (who-specializes symbol))          (:macroexpands (who-macroexpands symbol))
3951         (:callers (list-callers symbol))          (:specializes (who-specializes symbol))
3952         (:callees (list-callees symbol))))))          (:callers (list-callers symbol))
3953            (:callees (list-callees symbol)))))))
3954    
3955    (defun sanitize-xrefs (x)
3956      (remove-duplicates
3957       (remove-if (lambda (f)
3958                    (member f '(nil #+sbcl sb-c::step-form)))
3959                  x
3960                  :key #'car)
3961       :test (lambda (a b)
3962               (and (eq (first a) (first b))
3963                    (equal (second a) (second b))))))
3964    
3965    
3966  ;;;; Inspecting  ;;;; Inspecting

Legend:
Removed from v.1.400  
changed lines
  Added in v.1.401

  ViewVC Help
Powered by ViewVC 1.1.5