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

Diff of /slime/swank.lisp

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

revision 1.475 by mbaringer, Mon Apr 16 14:24:35 2007 UTC revision 1.476 by mbaringer, Tue Apr 17 20:06:22 2007 UTC
# Line 3055  The time is measured in microseconds." Line 3055  The time is measured in microseconds."
3055    
3056  (defun swank-compiler (function)  (defun swank-compiler (function)
3057    (clear-compiler-notes)    (clear-compiler-notes)
3058    (with-simple-restart (abort "Abort SLIME compilation.")    (multiple-value-bind (result usecs)
3059      (multiple-value-bind (result usecs)        (with-simple-restart (abort "Abort SLIME compilation.")
3060          (handler-bind ((compiler-condition #'record-note-for-condition))          (handler-bind ((compiler-condition #'record-note-for-condition))
3061            (measure-time-interval function))            (measure-time-interval function)))
3062        (list (to-string result)      ;; WITH-SIMPLE-RESTART returns (values nil t) if its restart is invoked;
3063              (format nil "~,2F" (/ usecs 1000000.0))))))      ;; unfortunately the SWANK protocol doesn't support returning multiple
3064        ;; values, so we gotta convert it explicitely to a list in either case.
3065        (if (and (not result) (eq usecs 't))
3066            (list nil nil)
3067            (list (to-string result)
3068                  (format nil "~,2F" (/ usecs 1000000.0))))))
3069    
3070  (defslimefun compile-file-for-emacs (filename load-p)  (defslimefun compile-file-for-emacs (filename load-p)
3071    "Compile FILENAME and, when LOAD-P, load the result.    "Compile FILENAME and, when LOAD-P, load the result.
# Line 4973  See `methods-by-applicability'.") Line 4978  See `methods-by-applicability'.")
4978                    (multiple-value-bind (symbol-string classification-string)                    (multiple-value-bind (symbol-string classification-string)
4979                        (string-representations symbol)                        (string-representations symbol)
4980                      `((:value ,symbol ,symbol-string) ,classification-string                      `((:value ,symbol ,symbol-string) ,classification-string
                       " "  
                       (:action "[jump to source]"  
                                , (let ((symbol symbol))  
                                    (lambda () (ed-in-emacs symbol))))  
4981                        (:newline)                        (:newline)
4982                        )))))))))                        )))))))))
4983    

Legend:
Removed from v.1.475  
changed lines
  Added in v.1.476

  ViewVC Help
Powered by ViewVC 1.1.5