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

Diff of /slime/swank.lisp

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

revision 1.687 by sboukarev, Sat Jan 30 15:44:50 2010 UTC revision 1.688 by trittweiler, Sun Feb 7 11:44:41 2010 UTC
# Line 1989  Errors are trapped and invoke our debugg Line 1989  Errors are trapped and invoke our debugg
1989             (check-type *buffer-package* package)             (check-type *buffer-package* package)
1990             (check-type *buffer-readtable* readtable)             (check-type *buffer-readtable* readtable)
1991             ;; APPLY would be cleaner than EVAL.             ;; APPLY would be cleaner than EVAL.
1992             ;;(setq result (apply (car form) (cdr form)))             ;; (setq result (apply (car form) (cdr form)))
1993             (setq result (with-slime-interrupts (eval form)))             (setq result (with-slime-interrupts (eval form)))
1994             (run-hook *pre-reply-hook*)             (run-hook *pre-reply-hook*)
1995             (setq ok t))             (setq ok t))
# Line 3114  DSPEC is a string and LOCATION a source Line 3114  DSPEC is a string and LOCATION a source
3114      (unless error      (unless error
3115        (mapcar #'xref>elisp (find-definitions sexp)))))        (mapcar #'xref>elisp (find-definitions sexp)))))
3116    
3117    ;;; Generic function so contribs can extend it.
3118  (defgeneric xref-doit (type thing)  (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))  
3119    (:method (type thing)    (:method (type thing)
3120        (declare (ignore type thing))
3121      :not-implemented))      :not-implemented))
3122    
3123    (macrolet ((define-xref-action (xref-type handler)
3124                 `(defmethod xref-doit ((type (eql ,xref-type)) thing)
3125                    (declare (ignorable type))
3126                    (funcall ,handler thing))))
3127      (define-xref-action :calls        #'who-calls)
3128      (define-xref-action :calls-who    #'calls-who)
3129      (define-xref-action :references   #'who-references)
3130      (define-xref-action :binds        #'who-binds)
3131      (define-xref-action :macroexpands #'who-macroexpands)
3132      (define-xref-action :specializes  #'who-specializes)
3133      (define-xref-action :callers      #'list-callers)
3134      (define-xref-action :callees      #'list-callees))
3135    
3136  (defslimefun xref (type name)  (defslimefun xref (type name)
3137    (multiple-value-bind (sexp error) (ignore-errors (from-string name))    (multiple-value-bind (sexp error) (ignore-errors (from-string name))
3138      (unless error      (unless error

Legend:
Removed from v.1.687  
changed lines
  Added in v.1.688

  ViewVC Help
Powered by ViewVC 1.1.5